Raid1 + LVM on fc6 (some assistance needed)
I ran across the thread, "Existing LVM filesystem to software RAID 0 (mirroring)" and saw that it was quite similar to what I am trying to do. The original poster didn't post his outcome so I hope that means success. I have 2 identical seagate 120g ata disks on a running system. The sdb disk is the active disk and the sda disk can be manipulated however I want to. I want to set up a raid1 to mirror the sdb disk. The main thing is that I want to cause as little disruption on sdb as possible and I am just not familiar with most of the lvm commands, or mdadm commands for that matter, although I have been able to create two raid array /dev/md0 and /dev/md1, which is what I believe I need with this setup. I decided to stop at this point and post this for suggestions on the proper way to proceed. My setup is currently like the following. Any help would be appreciated.
[root@localhost ~]# fdisk -l
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 fd Linux raid autodetect
/dev/sda2 14 14593 117113850 fd Linux raid autodetect
Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 14593 117113850 8e Linux LVM
Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/md1: 119.9 GB, 119924457472 bytes
2 heads, 4 sectors/track, 29278432 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md1 doesn't contain a valid partition table
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup01-LogVol00
107G 80G 22G 79% /
/dev/sdb1 99M 18M 76M 20% /boot
tmpfs 506M 0 506M 0% /dev/shm
[root@localhost ~]# cat /etc/mdadm.conf
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=c6fd5698:b976df7f:b2c25c31:740a24c9
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=5185e26d:7275e924:550164b9:3326281b
[root@localhost ~]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup01/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.22.14-72.fc6)
root (hd1,0)
kernel /vmlinuz-2.6.22.14-72.fc6 ro root=/dev/VolGroup01/LogVol00 rhgb quiet
initrd /initrd-2.6.22.14-72.fc6.img
title Fedora Core (2.6.22.9-61.fc6)
root (hd1,0)
kernel /vmlinuz-2.6.22.9-61.fc6 ro root=/dev/VolGroup01/LogVol00 rhgb quiet
initrd /initrd-2.6.22.9-61.fc6.img
[root@localhost ~]# cat /etc/fstab
/dev/VolGroup01/LogVol00 / ext3 defaults 1 1
LABEL=/boot1 /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/VolGroup01/LogVol01 swap swap defaults 0 0
[root@localhost ~]# cat /etc/mtab
/dev/mapper/VolGroup01-LogVol00 / ext3 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/sdb1 /boot ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
|