* [gentoo-user] [OT] moving mountpoint to folder
@ 2005-12-13 20:33 michael higgins
2005-12-13 20:46 ` Richard Fish
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: michael higgins @ 2005-12-13 20:33 UTC (permalink / raw
To: gentoo-user
Hello, all.
Some time ago, I moved my /usr/lib folder to a separate partition to net some space on /. Now, I want to fix my partitions on that second drive, so I've moved all the linux folders to / again. (The /usr/lib files are in a folder called /usr/lib2 for now.)
The problem I've come across this time is that so many things are using files in /usr/lib, I can't unmount it. Stopping all services leaves me with my login being the only thing still hanging the umount.
So, my question is, does anyone know what will happen if I try to umount -l, remove the /usr/lib mountpoint, and rename /usr/lib2 to /usr/lib? It would seem that there'd be no problem as long as I don't need to log into a new shell? Going the other way wasn't a problem, as I just renamed the old folder and mounted the partition on a new one.
Any suggestions appreciated.
--
|\ /| | | ~ ~
| \/ | |---| `|` ?
| |ichael | |iggins \^ /
michael_higgins[at]evolone[dot]org
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] [OT] moving mountpoint to folder
2005-12-13 20:33 [gentoo-user] [OT] moving mountpoint to folder michael higgins
@ 2005-12-13 20:46 ` Richard Fish
2005-12-13 21:12 ` Dale
2005-12-13 21:02 ` Glenn Enright
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Richard Fish @ 2005-12-13 20:46 UTC (permalink / raw
To: gentoo-user
On 12/13/05, michael higgins <linux@evolone.com> wrote:
> Hello, all.
> So, my question is, does anyone know what will happen if I try to umount -l, remove the /usr/lib mountpoint, and rename /usr/lib2 to /usr/lib? It would seem that there'd be no problem as long as I don't need to log into a new shell? Going the other way wasn't a problem, as I just renamed the old folder and mounted the partition on a new one.
That should work, I think. If nothing else, you should be able to
boot with init=/bin/bash to get a really basic environment with
nothing mounted or running.
-Richard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] [OT] moving mountpoint to folder
2005-12-13 20:33 [gentoo-user] [OT] moving mountpoint to folder michael higgins
2005-12-13 20:46 ` Richard Fish
@ 2005-12-13 21:02 ` Glenn Enright
2005-12-13 21:08 ` [gentoo-user] " Boyd Stephen Smith Jr.
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Glenn Enright @ 2005-12-13 21:02 UTC (permalink / raw
To: gentoo-user
On Wednesday 14 December 2005 09:33, michael higgins wrote:
> So, my question is, does anyone know what will happen if I try to umount
> -l, remove the /usr/lib mountpoint, and rename /usr/lib2 to /usr/lib? It
> would seem that there'd be no problem as long as I don't need to log into a
> new shell? Going the other way wasn't a problem, as I just renamed the old
> folder and mounted the partition on a new one.
>
> Any suggestions appreciated.
If you are willing to take the system down for a few minutes, try booting with
a copy of knopix or your gentoo livecd, and doing your filesystem mods that
way. Then you can be more comfortable with the sanity of your os. after all
there is so much important stuff in there.
Or maybee drop to single user mode, that may work.
--
Your responsibility as a parent is not as great as you might imagine. You
need not supply the world with the next conqueror of disease or major motion
picture star. If your child simply grows up to be someone who does not use
the word "collectible" as a noun, you can consider yourself an unqualified
success.
-- Fran Lebowitz, "Social Studies"
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: [OT] moving mountpoint to folder
2005-12-13 20:33 [gentoo-user] [OT] moving mountpoint to folder michael higgins
2005-12-13 20:46 ` Richard Fish
2005-12-13 21:02 ` Glenn Enright
@ 2005-12-13 21:08 ` Boyd Stephen Smith Jr.
2005-12-13 21:50 ` [gentoo-user] Re: [OT] moving mountpoint to folder [solved] michael higgins
2005-12-13 21:09 ` [gentoo-user] [OT] moving mountpoint to folder Michael Kjorling
2005-12-13 22:16 ` Francesco Riosa
4 siblings, 1 reply; 8+ messages in thread
From: Boyd Stephen Smith Jr. @ 2005-12-13 21:08 UTC (permalink / raw
To: gentoo-user
On Tuesday 13 December 2005 03:33 pm, michael higgins wrote:
> Some time ago, I moved my /usr/lib folder to a separate partition to
> net some space on /. Now, I want to fix my partitions on that second
> drive, so I've moved all the linux folders to / again. (The /usr/lib
> files are in a folder called /usr/lib2 for now.)
>
> Does anyone know what will happen if I try to
> umount -l, remove the /usr/lib mountpoint, and rename /usr/lib2 to
> /usr/lib?
Should be fine as long as nothing starts any more processes (that need
libraries in /usr/lib) between the 'umount' and the 'mv'. Also, you
system may still be accessing the partition you've umount-d (since you
used -l) so you really won't be safe modifying it (deleting the
partition, etc.)
> Any suggestions appreciated.
You may be able to go down to single user mode with
init 1
and stop any remaining services, which might free up your /usr/lib.
If that doesn't work you may be able to use 'fuser' to kill the
processes accessing /usr/lib forcefully. You can get a list of the
processes with
fuser -mv /usr/lib
Altenatively:
mount -o bind / /mnt
rm /mnt/usr/lib
mv /mnt/usr/lib2 /mnt/usr/lib
umount /mnt
vim /etc/fstab
/* Remove the line that mounts /usr/lib */
After you reboot the offending partition should no longer be mounted,
but this is really not much better than umount -l.
--
Boyd Stephen Smith Jr.
bss03@volumehost.com
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] [OT] moving mountpoint to folder
2005-12-13 20:33 [gentoo-user] [OT] moving mountpoint to folder michael higgins
` (2 preceding siblings ...)
2005-12-13 21:08 ` [gentoo-user] " Boyd Stephen Smith Jr.
@ 2005-12-13 21:09 ` Michael Kjorling
2005-12-13 22:16 ` Francesco Riosa
4 siblings, 0 replies; 8+ messages in thread
From: Michael Kjorling @ 2005-12-13 21:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
On 2005-12-13 12:33 -0800, linux@evolone.com wrote:
> So, my question is, does anyone know what will happen if I try to
> umount -l, remove the /usr/lib mountpoint, and rename /usr/lib2 to
> /usr/lib? It would seem that there'd be no problem as long as I
> don't need to log into a new shell? Going the other way wasn't a
> problem, as I just renamed the old folder and mounted the partition
> on a new one.
If it was me, I'd probably simply reboot from a live CD (the Gentoo
installation CD comes to mind), make the changes that cannot be done
while the system is running normally, and reboot.
--
Michael Kjörling, michael@kjorling.com - http://michael.kjorling.com/
* ASCII Ribbon Campaign: Against HTML Mail, Proprietary Attachments *
* ..... No bird soars too high if he soars with his own wings ..... *
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] [OT] moving mountpoint to folder
2005-12-13 20:46 ` Richard Fish
@ 2005-12-13 21:12 ` Dale
0 siblings, 0 replies; 8+ messages in thread
From: Dale @ 2005-12-13 21:12 UTC (permalink / raw
To: gentoo-user
Richard Fish wrote:
>On 12/13/05, michael higgins <linux@evolone.com> wrote:
>
>
>>Hello, all.
>>So, my question is, does anyone know what will happen if I try to umount -l, remove the /usr/lib mountpoint, and rename /usr/lib2 to /usr/lib? It would seem that there'd be no problem as long as I don't need to log into a new shell? Going the other way wasn't a problem, as I just renamed the old folder and mounted the partition on a new one.
>>
>>
>
>That should work, I think. If nothing else, you should be able to
>boot with init=/bin/bash to get a really basic environment with
>nothing mounted or running.
>
>-Richard
>
>
>
Or you may try doing it from the CD. That is how I move things around,
just to make sure I don't get one of those pisky file is busy or locked
things.
Dale
:-)
--
To err is human, I'm most certainly human.
I have four rigs:
1: Home built; Abit NF7 ver 2.0 w/ AMD 2500+ CPU, 1GB of ram and right now two 80GB hard drives.
2: Home built; Iwill KK266-R w/ AMD 1GHz CPU, 256MBs of ram and a 4GB drive.
3: Home built; Gigabyte GA-71XE4 w/ 800MHz CPU, 128MBs of ram and a 2.5GB drive.
4: Compaq Proliant 6000 Server w/ Quad 200MHz CPUs, 128MBs of ram and a 4.3GB SCSI drive.
All run Gentoo, all run folding. #1 is my desktop, 2, 3, and 4 are set up as servers.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Re: [OT] moving mountpoint to folder [solved]
2005-12-13 21:08 ` [gentoo-user] " Boyd Stephen Smith Jr.
@ 2005-12-13 21:50 ` michael higgins
0 siblings, 0 replies; 8+ messages in thread
From: michael higgins @ 2005-12-13 21:50 UTC (permalink / raw
To: gentoo-user
On Tue, 13 Dec 2005 16:08:17 -0500
"Boyd Stephen Smith Jr." <bss03@volumehost.com> wrote:
> On Tuesday 13 December 2005 03:33 pm, michael higgins wrote:
> > Some time ago, I moved my /usr/lib folder to a separate partition to
> > net some space on /. Now, I want to fix my partitions on that second
> > drive, so I've moved all the linux folders to / again. (The /usr/lib
> > files are in a folder called /usr/lib2 for now.)
> >
> > Does anyone know what will happen if I try to
> > umount -l, remove the /usr/lib mountpoint, and rename /usr/lib2 to
> > /usr/lib?
>
> Should be fine as long as nothing starts any more processes (that need
> libraries in /usr/lib) between the 'umount' and the 'mv'. Also, you
> system may still be accessing the partition you've umount-d (since you
> used -l) so you really won't be safe modifying it (deleting the
> partition, etc.)
>
> > Any suggestions appreciated.
>
> You may be able to go down to single user mode with
> init 1
> and stop any remaining services, which might free up your /usr/lib.
> If that doesn't work you may be able to use 'fuser' to kill the
> processes accessing /usr/lib forcefully. You can get a list of the
> processes with
> fuser -mv /usr/lib
>
> Altenatively:
> mount -o bind / /mnt
> rm /mnt/usr/lib
> mv /mnt/usr/lib2 /mnt/usr/lib
> umount /mnt
> vim /etc/fstab
> /* Remove the line that mounts /usr/lib */
>
> After you reboot the offending partition should no longer be mounted,
> but this is really not much better than umount -l.
>
Well, after all that, it just worked. After stopping the services (named, cupsd, postfix, apache2) the fuser -mv command showed nothing in the way. Unmounted cleanly and moved the folder. Edited fstab, started services, off to the next task: tweaking partitions. I may just be able to use parted now, I think.
Thanks for the backup, folks!
--
|\ /| | | ~ ~
| \/ | |---| `|` ?
| |ichael | |iggins \^ /
michael_higgins[at]evolone[dot]org
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] [OT] moving mountpoint to folder
2005-12-13 20:33 [gentoo-user] [OT] moving mountpoint to folder michael higgins
` (3 preceding siblings ...)
2005-12-13 21:09 ` [gentoo-user] [OT] moving mountpoint to folder Michael Kjorling
@ 2005-12-13 22:16 ` Francesco Riosa
4 siblings, 0 replies; 8+ messages in thread
From: Francesco Riosa @ 2005-12-13 22:16 UTC (permalink / raw
To: gentoo-user
michael higgins wrote:
> Hello, all.
>
> Some time ago, I moved my /usr/lib folder to a separate partition to net some space on /. Now, I want to fix my partitions on that second drive, so I've moved all the linux folders to / again. (The /usr/lib files are in a folder called /usr/lib2 for now.)
>
> The problem I've come across this time is that so many things are using files in /usr/lib, I can't unmount it. Stopping all services leaves me with my login being the only thing still hanging the umount.
>
> So, my question is, does anyone know what will happen if I try to umount -l, remove the /usr/lib mountpoint, and rename /usr/lib2 to /usr/lib? It would seem that there'd be no problem as long as I don't need to log into a new shell? Going the other way wasn't a problem, as I just renamed the old folder and mounted the partition on a new one.
>
> Any suggestions appreciated.
>
Already solved but waiting for something to finish so here's my version:
#mkdir /mnt/tmp
#mount -obind / /mnt/tmp
#cp -a /usr/lib/* /mnt/tmp/usr/lib
#umount /mnt/tmp
#rm -r /mnt/tmp
#umount -l /usr/lib/
At this point restart as much services as possible is a good idea (but
not really needed).
The trick is done by "bind" option _not_ binding mounted subdirectory
(i.e. after step 2 /mnt/tmp/usr/lib should be empty) as opposite of
"rbind" that bind also all mounted subdirectoryes (and is useful
sometimes with /dev)
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-12-13 22:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-13 20:33 [gentoo-user] [OT] moving mountpoint to folder michael higgins
2005-12-13 20:46 ` Richard Fish
2005-12-13 21:12 ` Dale
2005-12-13 21:02 ` Glenn Enright
2005-12-13 21:08 ` [gentoo-user] " Boyd Stephen Smith Jr.
2005-12-13 21:50 ` [gentoo-user] Re: [OT] moving mountpoint to folder [solved] michael higgins
2005-12-13 21:09 ` [gentoo-user] [OT] moving mountpoint to folder Michael Kjorling
2005-12-13 22:16 ` Francesco Riosa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox