1 |
michael higgins wrote: |
2 |
> Hello, all. |
3 |
> |
4 |
> 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.) |
5 |
> |
6 |
> 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. |
7 |
> |
8 |
> 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. |
9 |
> |
10 |
> Any suggestions appreciated. |
11 |
> |
12 |
Already solved but waiting for something to finish so here's my version: |
13 |
|
14 |
#mkdir /mnt/tmp |
15 |
#mount -obind / /mnt/tmp |
16 |
#cp -a /usr/lib/* /mnt/tmp/usr/lib |
17 |
#umount /mnt/tmp |
18 |
#rm -r /mnt/tmp |
19 |
#umount -l /usr/lib/ |
20 |
|
21 |
At this point restart as much services as possible is a good idea (but |
22 |
not really needed). |
23 |
|
24 |
The trick is done by "bind" option _not_ binding mounted subdirectory |
25 |
(i.e. after step 2 /mnt/tmp/usr/lib should be empty) as opposite of |
26 |
"rbind" that bind also all mounted subdirectoryes (and is useful |
27 |
sometimes with /dev) |
28 |
|
29 |
|
30 |
-- |
31 |
gentoo-user@g.o mailing list |