Skip to contentSkip to conversation

raidreconfig advice

DISCUSSION Max Waterman 4 participants 5 messages Mar 12, 2005 – Jul 28, 2005 MD RAID

lore
Share & tools
lore
#0 lore raw

OK, I am going to try to expand the capacity of my raid5 array and I want to make sure I've got it right.

So, first thing to check is that they are identical drives. I figure fdisk is enough :

foreach disk ( cat /proc/diskstats | perl -ne '{ /((hd|sd)[a-z])\s+/; print "$1\n" if ( $1 ) }' ) foreach? /sbin/fdisk -l /dev/$disk
foreach? end

Disk /dev/hda: snip...

Disk /dev/hdg: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track, 24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/hdg doesn't contain a valid partition table

Disk /dev/hdi: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track, 24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/hdi doesn't contain a valid partition table

Disk /dev/hdk: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track, 24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/hdk doesn't contain a valid partition table

Disk /dev/sda: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track, 24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sda doesn't contain a valid partition table

Disk /dev/sdb: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track, 24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track, 24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdd: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track, 24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn't contain a valid partition table [mwaterman@localhost /proc]$

My current RAID5 is on hd[gik] (hdm is RMAd), plus /dev/sdd as a spare.

I have sd[ab] as a RAID0 containing a backup.

This leaves me with sdc which I can try to add. If that goes OK, I'll trash the backup and add sd[ab] too.

1) Do the disks look identical (they're all WD2000, but some are PATA and some SATA).

2) Where do I get raidreconfig from? Google wasn't much help.

3) Are there any instructions for raidreconfig? I understand is uses some non-mdadm config files as from/to input.

4) I use xfs. Has anyone used xfs_growfs?

Thanks.

Max.

#1 lore raw
Quoted 2 lines

4) I use xfs. Has anyone used xfs_growfs?

Yes - it's been flawless.
I've used it on lvm2 over md

David

#2 lore raw

Re: raidreconf advice

thanks.

Also, I note that the tool is called raidreconf, not raidreconfig, as I had in my original email.

Max.

Quoted 8 lines · David Greaves
Quoted 2 lines

4) I use xfs. Has anyone used xfs_growfs?

Yes - it's been flawless.
I've used it on lvm2 over md

David

#3 lore raw
In reply to Max Waterman
Quoted 1 line · Max Waterman

OK, I am going to try to expand the capacity of my raid5 array and I want to make sure I've got it right.

Not a bad idea, as its all or nothing...

Quoted 7 lines

Disk /dev/hdg: 200.0 GB, 200049647616 bytes Disk /dev/hdi: 200.0 GB, 200049647616 bytes Disk /dev/hdk: 200.0 GB, 200049647616 bytes Disk /dev/sda: 200.0 GB, 200049647616 bytes Disk /dev/sdb: 200.0 GB, 200049647616 bytes Disk /dev/sdc: 200.0 GB, 200049647616 bytes Disk /dev/sdd: 200.0 GB, 200049647616 bytes

They certainly all looked the same (including the C/H/S counts)

Quoted 1 line

This leaves me with sdc which I can try to add. If that goes OK, I'll trash the backup and add sd[ab] too.

I'd be very wary of this, for two reasons. One, you have the backup during the add for a reason. If anything goes wrong, there goes your data. Second, where would you ever back your raid up to? What about fs corruption?

The rule of thumb with databases is to always have enough contiguous scratch space to dump and restore your biggest table. With large RAID, you should always be able to dump and restore your largest raid device, imho. Its a bunch more disk yes, but you'll need it at some point, I promise. Many future tears can be averted...

Quoted 1 line

2) Where do I get raidreconfig from? Google wasn't much help.

I saw you noticed it raidreconf - you should be set there

Quoted 1 line

3) Are there any instructions for raidreconfig? I understand is uses some non-mdadm config files as from/to input.

the man page is great - honest. Two conf files (current and future) and you're set

The last question should be an open-ended "is there anything else"?

1) Run a long SMART test on all drives first. Imagine if you get a bad block during the reconfig...
2) Validate your backup (just in case)
3) ?? It takes a long time to do, be patient I guess
4) You could use the script I posted earlier that sets up a loopback device practice raid set to practice perhaps (if you really wanted)

Good luck-
-Mike

#4 lore raw
Quoted 18 lines · Mike Hardy
Quoted 1 line · Max Waterman

OK, I am going to try to expand the capacity of my raid5 array and I want to make sure I've got it right.

Not a bad idea, as its all or nothing...

Quoted 7 lines

Disk /dev/hdg: 200.0 GB, 200049647616 bytes Disk /dev/hdi: 200.0 GB, 200049647616 bytes Disk /dev/hdk: 200.0 GB, 200049647616 bytes Disk /dev/sda: 200.0 GB, 200049647616 bytes Disk /dev/sdb: 200.0 GB, 200049647616 bytes Disk /dev/sdc: 200.0 GB, 200049647616 bytes Disk /dev/sdd: 200.0 GB, 200049647616 bytes

Quoted 8 lines

They certainly all looked the same (including the C/H/S counts)

Quoted 1 line

This leaves me with sdc which I can try to add. If that goes OK, I'll trash the backup and add sd[ab] too.

I'd be very wary of this, for two reasons. One, you have the backup during the add for a reason. If anything goes wrong, there goes your data. Second, where would you ever back your raid up to? What about fs corruption?

The rule of thumb with databases is to always have enough contiguous scratch space to dump and restore your biggest table. With large RAID, you should always be able to dump and restore your largest raid device, imho. Its a bunch more disk yes, but you'll need it at some point, I promise. Many future tears can be averted...

I'm not worried about losing my data enough to make regular backups.
I recently thought I'd lost all my data - it wasn't that much of a shock. I since discovered I hadn't lost it all, so all is well.

I've made a backup onto a spare array, plus onto one of the 200GB disks which I will use as a spare later.

Quoted 5 lines
Quoted 2 lines

3) Are there any instructions for raidreconfig? I understand is uses some non-mdadm config files as from/to input.

the man page is great - honest. Two conf files (current and future) and you're set

Yeah, but I don't know how to use raidconf files. I use mdadm. I currently have in my mdadm.conf :

DEVICE /dev/hd[egik]
ARRAY /dev/md0 level=raid5 num-devices=4 devices=/dev/hd[egik]

I think my target mdadm.conf would be :

DEVICE /dev/hd[egik] /dev/sd[abc]
ARRAY /dev/md0 level=raid5 num-devices=7
devices=/dev/hd[egik],/dev/sd[abc]

What are these in raidtab(5) terms?

Max.