LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-08-2008, 03:23 PM   #1
s.a.
LQ Newbie
 
Registered: Jan 2008
Posts: 3

Rep: Reputation: 0
Unhappy Software RAID1 on non-partitioned drives


Hello,

I shot myself in the foot by creating software raid1 on non-partitioned drives:

mdadm --create --verbose /dev/md1 --level=1 --raid-devices=2 /dev/sdb /dev/sdd
pvcreate /dev/md1


And then extending an existing Volume Group to that array:

vgextend VolGroup00 /dev/md1
lvextend -L649G /dev/VolGroup00/LogVol05
ext2online /dev/VolGroup00/LogVol05


I did this almost 3 months ago, the system is live now and I can't do a roll-back.

If I reboot it, I'll be screwed, cause the array md1 won't be autodetected and the Volume Group won't come up = kernel panic.

So what are my options now? I mean besides backing up all the stuff and rebuilding the server or creating proper raid partitions on larger drives and moving the raid mirrors to these partitions.

Any way to force the soft raid configuration on boot?
Or maybe make md1 smaller so I can move the mirror to the partitioned drive of the same size?

P.S. Running CentOS 4.6.
 
Old 01-09-2008, 11:43 AM   #2
mether
Member
 
Registered: Mar 2007
Distribution: RHEL, Fedora, Open Suse
Posts: 151

Rep: Reputation: 31
The setup you using is quite general. I dont see any point why it will fail on reboot. MD will come up automatically after reboot. Also if you look at the rc.sysinit it will first initialize the RAId and then LVM. As a upfront precaution u can check the initrd file for modules of md in it.
 
Old 01-09-2008, 12:02 PM   #3
s.a.
LQ Newbie
 
Registered: Jan 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the input mether.

If I understand correctly the raid gets autodetected by scanning partition tables on all available drives looking for type "fd" (linux raid).

But I don't have any partitions:

[~]# fdisk -l /dev/sdb
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table

[~]# fdisk -l /dev/sdd
Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdd doesn't contain a valid partition table


Disks sdb and sdd are two mirrors for md1:

[~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdd[1] sdb[0]
488386496 blocks [2/2] [UU]
md0 : active raid1 sdc1[1] sda2[0]
244091520 blocks [2/2] [UU]
unused devices: <none>


What if I put "mdadm --assemble /dev/md1 /dev/sdb /dev/sdd" into rc.sysinit somewhere before lvm initialization? Will that work?
 
Old 01-15-2008, 11:58 AM   #4
mether
Member
 
Registered: Mar 2007
Distribution: RHEL, Fedora, Open Suse
Posts: 151

Rep: Reputation: 31
Hello S.a,

The think is you can add the device names in /etc/mdadm.conf, which I think is a much better place. Adding the entry you mentioned to rc.sysinit is not really the best idea. Check link below :

http://kbase.redhat.com/faq/FAQ_79_7689.shtm

Last edited by mether; 01-15-2008 at 12:04 PM.
 
Old 01-15-2008, 05:26 PM   #5
KnightHawk
Member
 
Registered: Aug 2005
Posts: 128

Rep: Reputation: 15
Just to go along with mether. That is in fact the solution creating the mdadm.conf file. That will ensure it will find it, even if the scan fails.
 
Old 01-16-2008, 10:30 AM   #6
s.a.
LQ Newbie
 
Registered: Jan 2008
Posts: 3

Original Poster
Rep: Reputation: 0
I tried doing this on a virtual machine (I did same disk/raid/partition layout as on the server with problem) and it didn't work.

My "/" partition is a part of volume group, which is spanned across two software raid1 arrays md0 (which is fine) and md1 (which doesn't get detected):

[~]# pvdisplay
--- Physical volume ---
PV Name /dev/md0
VG Name VolGroup00
PV Size 232.78 GB / not usable 2.62 MB
Allocatable yes (but full)
PE Size (KByte) 32768
Total PE 7449
Free PE 0
Allocated PE 7449
PV UUID qWT0N3-QEgL-X9yL-m7vR-VST0-DEdT-aADNUP

--- Physical volume ---
PV Name /dev/md1
VG Name VolGroup00
PV Size 465.76 GB / not usable 11.94 MB
Allocatable yes (but full)
PE Size (KByte) 32768
Total PE 14904
Free PE 0
Allocated PE 14904
PV UUID lWO2fY-SnOF-6sGf-lo0T-gRvk-0z6I-s9XH


So I don't think it even gets to check the config file.
And putting stuff into rc.sysinit didn't work either.

Any more ideas?
 
Old 01-16-2008, 11:36 AM   #7
mether
Member
 
Registered: Mar 2007
Distribution: RHEL, Fedora, Open Suse
Posts: 151

Rep: Reputation: 31
Hello S.a,

Cant find the exact link but I believe that adding the MD module before anything can help you. Please check the man for mkinitrd .. If i recall it right its something like "--with" option.
 
Old 01-16-2008, 11:40 AM   #8
mether
Member
 
Registered: Mar 2007
Distribution: RHEL, Fedora, Open Suse
Posts: 151

Rep: Reputation: 31
Just got it..check it :

http://kbase.redhat.com/faq/FAQ_43_4370.shtm

It will be helpful if you can provide me the sysreport and initrd files from your system. Either mail me or provide them from some link.

Last edited by mether; 01-16-2008 at 11:41 AM.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to know the command which shows all non-partitioned & partitioned hard drive saidul Linux - Newbie 2 12-04-2007 04:02 PM
Mirroring 2 drives - one already partitioned. PAarcher Linux - Newbie 6 01-28-2005 02:28 PM
raid1 on mandrake 10 with 2x SATA drives karelvdm Mandriva 0 09-07-2004 08:27 AM
red hat and large partitioned hard drives theCopin Linux - Newbie 5 10-28-2003 12:57 PM
How do I format other partitioned drives? p.z Linux - Hardware 4 08-26-2003 01:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:34 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration