[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ReiserFS + 2.4.4



Here is what I did step by step on 2 separate computers to change over to
reiserfs.

First of all you must have a partition large enough to hold everything.  Lets
say you have 4 partitions and part4 is big enough to hold everything.
Lets say the 4 partitions are mounted as /boot, swap, /, /var.   You may have
more that this but you can just extrapolate from this.  So here is what the
partition table would look like:
part1  /boot
part2  swap
part3  /
part4  /var
The first thing to do is copy the /var partition over to the / partition so that
you get a spare partition.  (hopefully you have enough space to do this on /).
Then you will be able to make part4 spare.
So here is what you would do:
stop the daemons which are accessing /var - sysklogd etc.  Then unmount /var.  I
had trouble finding all the necessary daemons to stop to do this so what I did
was edit /etc/fstab and make part4 mount on /newdisk instead of /var, make a dir
called /newdisk and then reboot.  Now this will cause all the logging daemons
etc. to complain at startup but the system will still boot and you will still be
able to login OK and all the /var stuff will be mounted as /newdisk.
then copy over the /newdisk stuff onto /var  (Nb. you have to copy over each of
the separate subdirectories in /newdisk separately otherwise you will end up
with something like /var/newdisk/subdirectories when what you want is
/var/subdirectories
So you just do:
cp -avx /newdisk/backups /var/
cp -avx /newdisk/cache /var/
cp -avx /newdisk/lib /var/
..... you get the idea.
You now have a spare partition (part4) which you can umount and mkreiserfs.
umount /newdisk
mkreiserfs /dev/ide/host0/bus0/target0/lun0/part4  (if you use devfs notation)
edit /etc/fstab and change it so that part4 mounts as reiserfs, something like:
/dev/ide/host0/bus0/target0/lun0/part4 /newdisk reiserfs defaults        0  0
mount /newdisk  (now reiserfs)
Now since part4 is large enough to hold everything you can just copy everything
over to it.
cp -avx / /newdisk
Edit /newdisk/etc/fstab and change things so that / mounts on part4 as reiserfs
and part3 is left unmounted.
Edit /newdisk/etc/lilo.conf
change root to: /dev/ide/host0/bus0/target0/lun0/part4
Don't need to change the other stuff cause it is better to leave /boot as is
(ext2)
Update the mbr and map etc for lilo (for the new boot configuration) with this:
/sbin/lilo -C /newdisk/etc/lilo.conf
Then reboot
Now running reiserfs with partitions as follows:
    /boot on part1  (ext2)
    swap on part2
    / on part4  (reiserfs)
Then you can
mkreiserfs /dev/ide/host0/bus0/target0/lun0/part3
edit /etc/fstab and change it so that part3 mounts as reiserfs on /newdisk
mount /newdisk
then copy over the /var stuff onto /newdisk  (Nb. you have to copy over each of
the separate subdirectories in /var separately again as explained above.
cp -avx /var/backups /newdisk/
cp -avx /var/cache /newdisk/
cp -avx /var/lib /newdisk/
..... and so on.
Then just do rm -rf /var
mkdir /var
edit /etc/fstab and change the part3 line so that it mounts as /var instead of
/newdisk
reboot.

Now you should have:
part1  /boot (ext2)
part2  swap
part3  /var (reiserfs)
part4  / (reiserfs)

You will probably have other partitions than this, eg /home, /usr.  If your /var
partition is not big enough to hold everything then perhaps one of these other
ones is.  Just change the above so that you use this other one instead.

Hope that helps a little.

Cheers.

Mark.



Reply to: