1 |
Everyone knows about the problem of /usr on a separate partition. |
2 |
My 2003 machine + my netbook have /usr on the same partition as / , |
3 |
but by regular desktop machine (2007) had /usr on an LVM partition. |
4 |
I plan to build a new machine later in the year |
5 |
& didn't want to have to learn re Initramfs, Drakut etc |
6 |
& be stuck with an odd-ball machine as stand-by for the next so-many years, |
7 |
so I decided to put /usr on the same partition as / . |
8 |
Since / is on /dev/sda3 , which didn't have enough space for both, |
9 |
that meant a major re-organisation of the hard drive. |
10 |
I've now completed that job & am surprised how straightforward it was, |
11 |
so in case anyone else is wondering what to do, here's an outline. |
12 |
|
13 |
First of course, be careful & pay attention to what you're doing ! |
14 |
It took me 5 days altogether from beginning to end. |
15 |
|
16 |
(1) back up everything, incl /boot + / : |
17 |
I bought 48 GB USB sticks to store the system + my personal files ; |
18 |
make sure you 'cp -a' at every stage : the '-a' flag is vital. |
19 |
It's much slower copying to USB than copying back to HDD ; |
20 |
always 'umount' the USB before removing it ! |
21 |
-- I have a bad dir on 1 stick as a result of forgetting that. |
22 |
|
23 |
(2) check the back-up files, try out System Rescue |
24 |
& test copying to/from USB after booting SR. |
25 |
|
26 |
(3) design the new partition layout & the new LVM layout. |
27 |
|
28 |
(4) when you're satisfied everything is ready |
29 |
-- part of the reason it takes 5 days is that you need to sleep on it -- , |
30 |
boot from System Rescue : I used 2.6.0 , which is impressively powerful. |
31 |
I've marked the places where "your mileage my vary". |
32 |
|
33 |
Then (a) make a final back-up of constantly changing stuff, in my case |
34 |
~/Mail /var/log + a special dir in which I kept news items + pictures, |
35 |
which I grab from my daily read of the press (YMMV). |
36 |
(b) use LVM to deactivate + remove LVs, then the VG ( /dev/sda5 : YMMV); |
37 |
(c) use Gparted to resize /dev/sda3 + recreate /dev/sda4 - /dev/sd9 (YMMV); |
38 |
(d) use LVM to recreate the VG + LVs ; |
39 |
(e) use 'resize_reiserfs' (YMMV) to extend the formatting of /dev/sda3 |
40 |
& 'mkreiserfs' to format the recreated partitions ; |
41 |
(f) copy /usr from USB to /dev/sda3 ; |
42 |
(g) copy /var /var/log from USB to the new LV (YMMV); |
43 |
(h) copy /home etc ditto : I needed my LV of pictures |
44 |
to get the desktop background, which is stored there (YMMV); |
45 |
(i) install a new /etc/fstab : edit it under a new name before starting SR, |
46 |
then copy it into place at this point, keeping a copy of the old one. |
47 |
|
48 |
(5) reboot & copy the rest of your data to the new LVs. |
49 |
|
50 |
I was amazed that after doing the above procedure carefully, |
51 |
the system came back & everything is now working normally, incl Portage. |
52 |
|
53 |
YMMV, so make sure you design your own procedure to fit your own needs. |
54 |
|
55 |
HTH a few users. |
56 |
|
57 |
-- |
58 |
========================,,============================================ |
59 |
SUPPORT ___________//___, Philip Webb |
60 |
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto |
61 |
TRANSIT `-O----------O---' purslowatchassdotutorontodotca |