Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
changing filesystem type & moving gentoo on raid
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
n506
n00b
n00b


Joined: 13 Feb 2007
Posts: 2

PostPosted: Sat Jul 24, 2010 11:30 am    Post subject: changing filesystem type & moving gentoo on raid Reply with quote

Hi all, i'm somewhat newbie at subject and i need advice

what i have
2 hard disks
1. / on reizerfs
/boot on ext2
2. /home on reizerfs

now i have 1 additional large hdd and i want to mirror both old hdds to new one with changing fs to ext3

what steps should i take?

thanx
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Sat Jul 24, 2010 12:27 pm    Post subject: Reply with quote

n506,

Rebuild your kernel with raid1 support
On your new drive, make partitions the same size as the ones you want to mirror.
Set the partition type to 0xfd

Donate these new partitions to degraded raid1 sets using mdadm.
Degraded means the raid set has bits missing. They will later be filled by the partitions on your old drive.
make filesystems on the /dev/mdX nodes ... thats your degraded raid sets.
Copy your install to the raid sets. Do not use dd for this.
cp-a, tar, rsync ... anything that preserves permissions works.
Its best of you boot with a liveCD for the copy as you must not copy /dev, /proc and /sys from a 'live' root.
On the raid, fix /etc/fstab, so it refers to the raid volumes
In both /boot/grub.conf files copy your current boot stanza below your existing on and change the copy to use root=/dev/md... so it uses the raid for root.
Install grub to the MBR of your new drive.

You now have your old install intact and unchanged. A copy of your old install on a degraded raid sets on your new drive.
You should be able to boot either install from your old boot drive.
By setting your new drive to be the boot drive in your BIOS, you should still be able to boot both installs.

When that works, you are ready for the destructive step.

Boot into your degraded raid install and add your old partitions to your new raid sets to bring them up to strength.
This may take some time to complete as the raids will resync. That is the system will copy the data from the degraded raid to the partitions you have just added.
Progress will be shown in /proc/mdstat.
Lastly, change the partition types on your old drives to 0xfd.

You need not keep the same partition sizes on the raid install, as you will be copying the file content of your old install, you can make the partitions on the raid set different sizes if you wish. That will require a little planning as you need to match partition sizes across your raid and the old hard drives.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum