Existing LVM filesystem to software RAID 0 (mirroring)
Hi there,
I am using FC6 with LVM for a while, and would like to use a software RAID 0(mirroring) with LVM to protect my disk. Could anyone suggest how to proceed for this changes? Existing my df config. is as below: Filesystem Size Used Avail Use% Mounted on /dev/mapper/rootvg-vg00 229G 17G 202G 8% / /dev/hda1 190M 46M 135M 26% /boot none 474M 0 474M 0% /dev/shm Thx |
Quote:
Are you adding a new disk or are both disks already in use? If you are adding a new disk for the raid array, conversion on-the-fly is almost easy. Otherwise, it depends. You might want to post the output of Code:
fdisk -l |
The new mirror you create must equal the size of your current LVM volume size.
Assuming VolGroup00 is your volume group. Assuming /dev/sda is a 1 disk volume group part of your LVM. Assuming /dev/sdb is your new disk your going to use as your mirror. Code:
mdadm -C /dev/md0 -l 1 -n 2 /dev/sdb missing |
Quote:
Actually, I only have a IDE disk at my server, and would like to have some questions to ask: 1. If I install a new disk, does it need to be the same(model, capacity) to the existing one for RAID 1 support? 2. For the data backup, can anyone suggest or point to me how to do for this setup? I try to use Ghost 8.3 for disk cloning, but, it seem it cannot support on LVM partition. Millions thanks to all!!! thx |
1. No, the second mirrored disk must be equal or larger in capacity than your previous disk. They dont need to be the same model (on linux they dont even need to be using the same disk protocol). One could be IDE, one could be iSCSI. Providing the disk is equal or greater than your current setup thats all that would matter.
2. Use tar. Since in unix everything is a file you can normally get away with a file by file backup routine - At recovery time you can reformat to ext3 / reiser, recover your data back onto your partition, add the pseudo directories (dev, sys, prc). Finally just grub-install onto the disk again and your raring to go from where you left off. |
Thanks for your valuable advice.
Apart the LVM filesystem, I also have another /boot and /dev/shm filesystems. How can I use the RAID 1 to protect it as well? Code:
Filesystem Size Used Avail Use% Mounted on |
/dev/shm is temporary - its not necessary to raid it.
To do boot assuming /dev/hda1 is your existing boot partition data assuming /dev/hdb1 is your mirrored disk Code:
mdadm -C -l 1 -n 2 /dev/md1 missing /dev/hdb1 Reboot. Pray. Assuming no liability again etc. |
Quote:
The info. is as below: 1. VG name: rootvg 2. original disk volume group: /dev/hda2 3. new disk volume group: /dev/sda2 It seem all the steps have been finished without any error, and it seem the Linux functions are ok. Thus, when I try to restart my Linux box, it seem it cannot find the new LVM partition at the boot time. Code:
Logging initialised at Wed Apr 23 00:57:01 2008 Million thanks, |
vgextend leads to kernel panic at boot
Quote:
Probably it is necessary to perform "vgcfgbackup" after vgextend; I haven't yet tried. Let's make a deal: the first of us who finds the solution is requested to inform the other one, OK! Alder |
All times are GMT -5. The time now is 05:44 PM. |