LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   how do you create software raid on rh8 using lvm (https://www.linuxquestions.org/questions/red-hat-31/how-do-you-create-software-raid-on-rh8-using-lvm-603316/)

xender69 11-29-2007 01:43 PM

how do you create software raid on rh8 using lvm
 
hi, I want to create a software raid on using /dev/sdb and /dev/sdc. /dev/sdc has a volume group created using LVM. Will the following entry in /etc/raidtab work?

[root@toc43linux etc]# vi raidtab
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
chunk-size 64k
persistent-superblock 1
nr-spare-disks 0
device /dev/sdb
raid-disk 0
device /dev/sdc
raid-disk 1

Thanks in advance for any help or suggestions.

Micro420 11-29-2007 04:49 PM

I'm assuming you mean Fedora Core 8? You can create LVM in conjunction with RAID. You can either do it through the command line using pvcreate, vgcreate, and lvcreate. Or, you can use the GUI system-config-lvm. Just point it towards your /dev/md0

xender69 11-30-2007 11:57 AM

Hi,
No, I'm using redhat 8.

Thanks.

Micro420 11-30-2007 12:58 PM

I've never used RedHat8, but I'm assuming the standard commands of pvcreate, vgcreate, and lvcreate are there. Maybe the GUI of system-config-lvm is also there.

inescapeableus 12-02-2007 12:58 AM

If you are using Redhat 8 I would immediately update to a new revision which would be RHEL 5 or Fedora.

xender69 12-03-2007 02:06 PM

Guys,
I'm not sure if everything I did worked or not, could someone take a look and see if software raid is actually working or not. Thanks:

/etc/raidtab:

raiddev /dev/md0
raid-level 1
nr-raid-disks 2
chunk-size 64k
persistent-superblock 1
nr-spare-disks 0
device /dev/sda
raid-disk 0
device /dev/sdb
raid-disk 1
______________________________________________________________________

[root@iLOAccess root]# fdisk -l

Disk /dev/sda: 18.2 GB, 18210036736 bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 267 2040255 82 Linux swap
/dev/sda3 268 2213 15631245 83 Linux

Disk /dev/sdb: 18.2 GB, 18210036736 bytes
255 heads, 63 sectors/track, 2213 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 267 2040255 82 Linux swap
/dev/sdb3 268 2213 15631245 83 Linux

______________________________________________________________________

[root@iLOAccess root]# cat /proc/partitions
major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq

8 0 17783239 sda 4265 8537 101426 14920 919 1718 21146 49660 0 17070 64580
8 1 104391 sda1 14 74 176 90 1 0 2 0 0 90 90
8 2 2040255 sda2 13 41 168 60 0 0 0 0 0 60 60
8 3 15631245 sda3 4234 8398 101026 14750 918 1718 21144 49660 0 16920 64410
8 16 17783239 sdb 45 227 544 200 0 0 0 0 0 200 200
8 17 104391 sdb1 11 49 120 30 0 0 0 0 0 30 30
8 18 2040255 sdb2 19 105 248 40 0 0 0 0 0 40 40
8 19 15631245 sdb3 11 49 120 120 0 0 0 0 0 120 120


I rebooted the system and everything came up fine. How do I know if the raid is working? Thanks.

Micro420 12-03-2007 04:19 PM

Looks like you have a RAID1 set up. try cat /proc/mdstat. Did you create your LVM? what does lvscan or lvdisplay show?


All times are GMT -5. The time now is 02:22 PM.