LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 03-04-2008, 05:37 PM   #1
rbanks
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Rep: Reputation: 0
Question 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
 
Old 03-11-2008, 12:28 AM   #2
mether
Member
 
Registered: Mar 2007
Distribution: RHEL, Fedora, Open Suse
Posts: 151

Rep: Reputation: 31
I am not sure how you have created the RAID devices. You mentioned that the sdb disk is already active its hard to port it to a RAID device. If you have successfully added the sdb disk to md device do let me know the method .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM, raid1 and scsi failure Ezplan Linux - Server 1 05-18-2007 01:59 AM
RAID1 LVM disk failure - can't restore ngibsonn Linux - Software 2 03-13-2007 07:49 PM
create a Raid1 Mirrored LVM? Suse 10.2 carl0ski Linux - Hardware 0 12-26-2006 03:23 AM
How configuring lilo with raid1 and lvm on mandriva 2007 gibe Linux - Server 1 11-16-2006 05:56 PM
RAID1+LVM: data keeps getting corrupted Chojin Linux - Software 4 10-22-2006 09:55 AM


All times are GMT -5. The time now is 08:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration