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