Convert to SW RAID with LVM2 on existing disk
I just got a Dell 2850 workstation coming in with RHEL 4 installed. It has two identical disk, /dev/sda & /dev/sdb. The system is installed in /dev/sda, & unfortunately (or fortunately?) it has LVM2 installed already.
Now I planned to convert the system to SW RAID-1 configuration. And I planned to follow the simple way as suggested in the RedHat knowledge base, which basically uses one single command to create RAID. Please refer to kbase of redhat, FAQ_43_2812
Can I change the PV to the RAID device without losing the data? Or, what's the proper procedure to be taken here to accomplish the task?
I had also been thinking of a new installation of the system, which might make the life easier. But there is one concern: I'm not sure whether the RHEL4 has all the right & updated drivers for Dell 2850?
Any suggestion will be greatly appreciated.
For reference, I copied the output of Fdisk/lvs/pvs here.
I guess there is no easy way to work around here. There are two options in my humble mind.
Option A, move system/data to one part of the disk; keep it; create RAID on the unused part; move all system/data to RAID; create new RAID on the rest of the disk; steps are like following:
1. Shrink LV, then shrink LVG; -- easy
2. Shrink PV, free up unused PE; -- Doable, with risk;
3. Shrink partition size; -- Doable, with bigger risk;
4. create new partition & new RAID device; -- easy;
5. copy system/data to RAID; --easy
6. create new RAID on the old part of disk; --easy
7. create new PV and add to VG -- easy
I tried this option and stop in step 2, no further with step 3. because I found it too trouble some. So I essentially turn to the Option B, which turn out to be easy & fast.
Option B, reinstall the system. :)
Hope this experience can be helpful for those who looking for similar solutions.
|All times are GMT -5. The time now is 09:21 AM.|