View Full Version : Convert ext3 to resierfs (debian linux)
natmweiss
2005-05-07, 20:34 PM
I'm setup with a dual hard drive Debian server 2.4.18 kernel. Fresh install. I've got a 80MB hda1 boot partition, 1GB hda2 swap partition and everything else on a 77GB hda3 partition. The other hard drive is un-formatted.
How do I convert from ext3 to resierfs?
Is there a convert utility? Or can I format the blank drive resierfs and just copy everything over somehow?
ScotchMoose
2005-05-10, 15:06 PM
This is a link to instructions I used to repartition my single drive server. Not exactly the same thing you want to do. This is a stern warning - don't try this unless you are comfortable with fdisk and have some experience moving filesystems around. That said, an extra hard drive would make the process much easier. The difference is you don't have to use the swap partition, but you will need to know how to configure grub to boot from hdb.
http://www.xmlvalidation.com/repartion_server.0.html
I have a test server in the same room with me and I went through the process on that machine before I tried it on the remote server. And I still needed to get the SB staff to help me reboot when I put a typo in grub's menu.lst file.
This is not for the faint of heart.
Maybe you don't need reiserfs for / , I use it for /var and /home, now that I have repartitioned, but I keep ext3 (also a good journaling fs) for root. You could even move /var and or /home to the 2nd HDD use reiserfs there, and never even need to reboot.
Good Luck,
natmweiss
2005-05-11, 02:16 AM
Nice howto! I will post again here if I go through with the re-partition.
How difficult is it to setup RAID 1 mirroring?
natmweiss
2005-05-11, 02:38 AM
My /etc/fstab has /boot on hda1 and / on hda3. Can I just leave hda1 alone and:
1. Format my blank drive as reiserfs (/dev/hdaX)
2. Mount it as /mnt
3. Copy the entire contents of / to /mnt
4. Change /etc/fstab so / is mounted on /dev/hdaX instead of /dev/hda3
5. Reboot
6. Format the contents of /dev/hda3 as resierfs
Will this work?
ScotchMoose
2005-05-11, 11:39 AM
Nice howto! I will post again here if I go through with the re-partition.
How difficult is it to setup RAID 1 mirroring?
I don't know how to use hardware RAID on a remote server. It is possible to use LVM and software RAID to mirror logical partitions remotely. But I have no idea how you could recover if hda fails. Without physical access, or a high level of on-site support, I don't think RAID makes sense. It will take you less time to write a backup script. And when you need to restore it will be a much simpler process.
ScotchMoose
2005-05-11, 11:59 AM
My /etc/fstab has /boot on hda1 and / on hda3. Can I just leave hda1 alone and:
1. Format my blank drive as reiserfs (/dev/hdaX)
2. Mount it as /mnt
3. Copy the entire contents of / to /mnt
4. Change /etc/fstab so / is mounted on /dev/hdaX instead of /dev/hda3
5. Reboot
6. Format the contents of /dev/hda3 as resierfs
Will this work?
No.
You would also need to modify /boot/grub/menu.lst, add an entry so if some thing goes wrong SB will be able to pick a working entry from the grub menu and get your machine booted.
And don't change /etc/fstab, change /mnt/etc/fstab, after you copy the filesytem.
Use the tar command from that how-to for the copy, it knows to skip device nodes and links to other volumes.
And please don't blame me if the machine will not boot. Try it on a test machine first!
If you don't have a test machine I would limit myself to working on the second HDD. You can play with partitions, LVM, software RAID, keep a backup image of the root filesystem, just about anything, all without touching that primary hard drive.
Good Luck,
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.