1 |
Philip Webb writes: |
2 |
|
3 |
> 120513 Alex Schuster wrote: |
4 |
> > I'm using the new udev with a separate /usr partition ... |
5 |
> > after an unclean shutdown |
6 |
> > -- reading files in /proc/<pid>/ was not a good idea -- |
7 |
> > /usr wants to be fsck'ed. But it is already mounted at that stage. |
8 |
> > Maybe I should just enlarge my root partition and move /usr there |
9 |
> |
10 |
> Did you see my description of how I did that ? -- see list 120506 . |
11 |
> The actual process took me 2 h 30 m , but preparations spread out |
12 |
> longer. Everything else is working just as before, |
13 |
> but I don't have to bother ever about Initramfs (whatever that is : |
14 |
> smile), & can update Udev without any worries when it becomes stable. |
15 |
> HTH |
16 |
|
17 |
I saw that, but here it will be much easier. All is on LVM here, so this should do it: |
18 |
|
19 |
# enlarge root partition |
20 |
lvresize -L +17G /dev/weird/root |
21 |
cryptsetup resize root |
22 |
resize2fs /dev/mapper/root |
23 |
|
24 |
# make sure /usr is not being written to. For other partitions, I'd |
25 |
# create an LVM snapshot |
26 |
mount -o remount,ro /usr |
27 |
|
28 |
# mount root to another place, without mounts like /usr showing up there |
29 |
mkdir /tmp/bindroot |
30 |
mount -o bind / /tmp/bindroot |
31 |
|
32 |
# copy data over |
33 |
rsync -ax /usr /tmp/bindroot/ |
34 |
|
35 |
# remove /usr stuff from fstab and dmcrypt |
36 |
sed "/\/dev\/weird\/usr/ d" /etc/fstab |
37 |
sed -i "/^target=usr2$/{N;N:N:d}" /etc/conf.d/dmcrypt |
38 |
|
39 |
# done! |
40 |
reboot |
41 |
|
42 |
No need for downtime except for the reboot, I guess I cannot unmount /usr |
43 |
otherwise. |
44 |
|
45 |
Wonko |