Mailing List Archive

no /usr , no problem
Everyone knows about the problem of /usr on a separate partition.
My 2003 machine + my netbook have /usr on the same partition as / ,
but by regular desktop machine (2007) had /usr on an LVM partition.
I plan to build a new machine later in the year
& didn't want to have to learn re Initramfs, Drakut etc
& be stuck with an odd-ball machine as stand-by for the next so-many years,
so I decided to put /usr on the same partition as / .
Since / is on /dev/sda3 , which didn't have enough space for both,
that meant a major re-organisation of the hard drive.
I've now completed that job & am surprised how straightforward it was,
so in case anyone else is wondering what to do, here's an outline.

First of course, be careful & pay attention to what you're doing !
It took me 5 days altogether from beginning to end.

(1) back up everything, incl /boot + / :
I bought 48 GB USB sticks to store the system + my personal files ;
make sure you 'cp -a' at every stage : the '-a' flag is vital.
It's much slower copying to USB than copying back to HDD ;
always 'umount' the USB before removing it !
-- I have a bad dir on 1 stick as a result of forgetting that.

(2) check the back-up files, try out System Rescue
& test copying to/from USB after booting SR.

(3) design the new partition layout & the new LVM layout.

(4) when you're satisfied everything is ready
-- part of the reason it takes 5 days is that you need to sleep on it -- ,
boot from System Rescue : I used 2.6.0 , which is impressively powerful.
I've marked the places where "your mileage my vary".

Then (a) make a final back-up of constantly changing stuff, in my case
~/Mail /var/log + a special dir in which I kept news items + pictures,
which I grab from my daily read of the press (YMMV).
(b) use LVM to deactivate + remove LVs, then the VG ( /dev/sda5 : YMMV);
(c) use Gparted to resize /dev/sda3 + recreate /dev/sda4 - /dev/sd9 (YMMV);
(d) use LVM to recreate the VG + LVs ;
(e) use 'resize_reiserfs' (YMMV) to extend the formatting of /dev/sda3
& 'mkreiserfs' to format the recreated partitions ;
(f) copy /usr from USB to /dev/sda3 ;
(g) copy /var /var/log from USB to the new LV (YMMV);
(h) copy /home etc ditto : I needed my LV of pictures
to get the desktop background, which is stored there (YMMV);
(i) install a new /etc/fstab : edit it under a new name before starting SR,
then copy it into place at this point, keeping a copy of the old one.

(5) reboot & copy the rest of your data to the new LVs.

I was amazed that after doing the above procedure carefully,
the system came back & everything is now working normally, incl Portage.

YMMV, so make sure you design your own procedure to fit your own needs.

HTH a few users.

SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca