Skip to contentSkip to conversation

Preparation advice?

DISCUSSION Ewan Grantham 4 participants 10 messages Nov 27, 2004 – Nov 29, 2004 5 messages not in the archive MD RAID

lore
Share & tools
lore
#0 lore raw

Am about to venture into the MD world. I have 4 250-Gig HDs, 1 on IDE1, 1 on IDE2, 1 on the internal firewire port, 1 on a PCI Firewire card. So I think I have my failure points reasonably spread :-)

Since two of these are external drives, any special considerations? I am running a Debian from a Knoppix 3.6 HD Install with a 2.4.27 kernel. I just updated the mdadm package using synaptic to 1.7, which I assume is the best version to run. My OS/Boot Disk is seperate, so I don't have to worry about that, but would like to have the array come up when the system does. Pointers to FAQs on any of this would also be appreciated.

Thanks in advance,
Ewan

#1 lore raw
Quoted 3 lines · Ewan Grantham

Am about to venture into the MD world. I have 4 250-Gig HDs, 1 on IDE1, 1 on IDE2, 1 on the internal firewire port, 1 on a PCI Firewire card. So I think I have my failure points reasonably spread :-)

Sounds like a bit of a homebrew bits & pieces box... :)

Quoted 1 line

Since two of these are external drives, any special considerations?

Make sure their power and data cables, and on/off switches are secure...

Quoted 7 lines

I
am running a Debian from a Knoppix 3.6 HD Install with a 2.4.27 kernel. I just updated the mdadm package using synaptic to 1.7, which I assume is the best version to run. My OS/Boot Disk is seperate, so I don't have to worry about that, but would like to have the array come up when the system does. Pointers to FAQs on any of this would also be appreciated.

Read the Software RAID FAQ on

http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html

It's got basic instructions for both the older raidtools and the newer mdadm.

What is your boot disk connected to? Hopefully not the same controller as one of your RAID disks...

And might you not want to make the bood drive mirrored also?

Anyway, for the big array, assuming you just want one big ~750GB array (RAID 5 gives N-1 capacity) partition each drive the same way with one partition for the whole disk, then mark each partition with type FD and build the array. Make sure the kernel has RAID built-in to it, or the RAID modules are loaded at boot time and off you go. Once it's built, make a mount point for it and put an entry in the /etc/fstab for it and it'll be there for all time....

Gordon

#2 lore raw
Quoted 1 line · Gordon Henderson

Sounds like a bit of a homebrew bits & pieces box... :)

Well, it started out as a Compaq Presario, but as time has gone on...

Quoted 6 lines

Read the Software RAID FAQ on

http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html

It's got basic instructions for both the older raidtools and the newer mdadm.

Is that going to ever be updated? I saw that site, as well as the helpful chapter extract for using MDADM on O'Reilly, and noticed both were from about 2002. I understand that the tools still work basically the same way, but wonder if "our" understanding of RAID hasn't come along a bit since then. And there are other topics that would be nice to address - that I will be asking about shortly :-)

Quoted 1 line

And might you not want to make the bood drive mirrored also?

My boot drive is OS only. Idea has been (from past experience) to not have anything on the boot drive that I wouldn't mind wiping for a reinstall.

Quoted 7 lines

Anyway, for the big array, assuming you just want one big ~750GB array (RAID 5 gives N-1 capacity) partition each drive the same way with one partition for the whole disk, then mark each partition with type FD and build the array. Make sure the kernel has RAID built-in to it, or the RAID modules are loaded at boot time and off you go. Once it's built, make a mount point for it and put an entry in the /etc/fstab for it and it'll be there for all time....

Currently building md0 as RAID 5 with chunk of 128 since all the examples seem to indicate that is "better" than the 64 default.

Created a mount point /mnt/md0, but do I edit /etc/fstab or another file since fstab seems to be generated on boot?

Also, once the build of md0 is complete, I assume I need to format my new "drive". Any suggestions as to ext2 or ext3 or reiser or ...

Array will be used to capture and edit home videos - to the extent that would influence folks suggestions.

Thanks again,
Ewan

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 6 lines · David Greaves
Quoted 5 lines

Created a mount point /mnt/md0, but do I edit /etc/fstab or another file since fstab seems to be generated on boot?

edit /etc/fstab

Well, I must be missing this at the FAQ sites, but when I edit /etc/fstab do I leave the entries in for the component devices, or do I remove those and just put in the /dev/md0 entry?

Thanks again,
Ewan

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Well, there's nothing wrong with /etc/fstab etc but you do have an odd report from mdadm. Back to the list... :)

Ewan's running 2.4.27 and may have an inconsistency with mdadm counting the number of raid devices.

Quoted 2 lines · Ewan Grantham

also send me the output from:
mdadm --detail /dev/md0

/dev/md0:

       Version : 00.90.00

Creation Time : Sat Nov 27 07:32:34 2004
Raid Level : raid5
Array Size : 735334656 (701.27 GiB 752.98 GB)
Device Size : 245111552 (233.76 GiB 250.99 GB)
Raid Devices : 4
Total Devices : 5
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Sat Nov 27 14:14:24 2004
State : dirty
Active Devices : 4
Working Devices : 4
Failed Devices : 1
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 128K

UUID : 525b6c6e:836b8598:b3778337:0be081e8
Events : 0.2

Number Major Minor RaidDevice State

      0       8       33        0      active sync   /dev/sdc1
      1       8       49        1      active sync   /dev/sdd1
      2       3       65        2      active sync   /dev/hdb1
      3      22       65        3      active sync   /dev/hdd1
Quoted 31 lines
Quoted 5 lines

I wonder if you have an older version of mdadm?
mdadm -V
can you upgrade to 1.7 ?

mdadm - v1.7.0 - 11 August 2004

Quoted 3 lines

What command did you use to create the array?

mdadm --create --verbose /dev/md0 --level=5 -c128

       --raid-devices=4  /dev/sdc1 /dev/sdd1 /dev/hdb1 /dev/hdd1
Quoted 3 lines

What kernel version are you running?

2.4.27

Quoted 3 lines

Have you put data on the array yet? (if not we may blat and rebuild it)

Quoted 7 lines

Yes, but nothing I can't live without at this point. More a matter of the time it takes - about 6 hours. But would rather take another 6 hours than be likely to lose what I have on there...

Let me know if there's something else I should look at/do...

what does
cat /proc/mdstat
say?

David

#10 lore raw
Quoted 2 lines · David Greaves

Ewan's running 2.4.27 and may have an inconsistency with mdadm counting the number of raid devices.

...

Quoted 17 lines

/dev/md0:

        Version : 00.90.00
  Creation Time : Sat Nov 27 07:32:34 2004
     Raid Level : raid5
     Array Size : 735334656 (701.27 GiB 752.98 GB)
    Device Size : 245111552 (233.76 GiB 250.99 GB)

Raid Devices : 4
Total Devices : 5
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Sat Nov 27 14:14:24 2004
State : dirty
Active Devices : 4
Working Devices : 4
Failed Devices : 1
Spare Devices : 0

...

Quoted 3 lines

what does
cat /proc/mdstat
say?

As noted above, I'm getting an "interesting" discrepancy between the 4 devices I specified in my create and the results from mdadm. The device seems to be working fine after transferring and playing several files, but I find the "failed devices" bit particularly concerning. Haven't found any way to get mdadm to tell me which device it thinks has failed.

As for the command above, I get:
Personalities : [raid5]
read_ahead 1024 sectors
md0 : active raid5 hdd1[3] hdb1[2] sdd1[1] sdc1[0]

      735334656 blocks level 5, 128k chunk, algorithm 2 [4/4] [UUUU]

unused devices: <none>

Which is what I would have expected. Any ideas?

#11 lore raw

This is normal (IMO) for a 2.4 kernel.
I think it has been fixed in the 2.6 kernel. But I have never used the newer kernel, so I can't confirm that. It may have been a newer version of mdadm, not the kernel, not sure.

My numbers are much worse!
I have 14 disks and 1 spare.
Raid Devices : 14
Total Devices : 13

Active Devices : 14
Working Devices : 12
Failed Devices : 1
Spare Devices : 1

Number Major Minor RaidDevice State
0 8 49 0 active sync /dev/sdd1
1 8 161 1 active sync /dev/sdk1
2 8 65 2 active sync /dev/sde1
3 8 177 3 active sync /dev/sdl1
4 8 81 4 active sync /dev/sdf1
5 8 193 5 active sync /dev/sdm1
6 8 97 6 active sync /dev/sdg1
7 8 209 7 active sync /dev/sdn1
8 8 113 8 active sync /dev/sdh1
9 8 225 9 active sync /dev/sdo1
10 8 129 10 active sync /dev/sdi1
11 8 241 11 active sync /dev/sdp1
12 8 145 12 active sync /dev/sdj1
13 8 33 13 active sync /dev/sdc1
14 65 1 14 /dev/sdq1

Guy

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ewan Grantham
Sent: Sunday, November 28, 2004 8:37 AM
To: David Greaves
Cc: [email protected]
Subject: Re: Preparation advice?

Quoted 2 lines · David Greaves

Ewan's running 2.4.27 and may have an inconsistency with mdadm counting the number of raid devices.

...

Quoted 17 lines

/dev/md0:

        Version : 00.90.00
  Creation Time : Sat Nov 27 07:32:34 2004
     Raid Level : raid5
     Array Size : 735334656 (701.27 GiB 752.98 GB)
    Device Size : 245111552 (233.76 GiB 250.99 GB)

Raid Devices : 4
Total Devices : 5
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Sat Nov 27 14:14:24 2004
State : dirty
Active Devices : 4
Working Devices : 4
Failed Devices : 1
Spare Devices : 0

...

Quoted 3 lines

what does
cat /proc/mdstat
say?

As noted above, I'm getting an "interesting" discrepancy between the 4 devices I specified in my create and the results from mdadm. The device seems to be working fine after transferring and playing several files, but I find the "failed devices" bit particularly concerning. Haven't found any way to get mdadm to tell me which device it thinks has failed.

As for the command above, I get:
Personalities : [raid5]
read_ahead 1024 sectors
md0 : active raid5 hdd1[3] hdb1[2] sdd1[1] sdc1[0]

      735334656 blocks level 5, 128k chunk, algorithm 2 [4/4] [UUUU]

unused devices: <none>

Which is what I would have expected. Any ideas?
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#12 lore raw
Quoted 4 lines · Guy

This is normal (IMO) for a 2.4 kernel.
I think it has been fixed in the 2.6 kernel. But I have never used the newer kernel, so I can't confirm that. It may have been a newer version of mdadm, not the kernel, not sure.

A rather different definition of normal - but for a computer system I guess I shouldn't be that surprised :-)

I'm not overly inclined to move to the 2.6 kernel at the moment as my experience with IEEE1394 under 2.6 has been very mixed. I think it's because it's easier to see what's happening "under the hood" with the 2.4 code.

Since I gather you haven't seen any lost data from this, then I'm going to start filling up. Did a couple test captures today without any dropped frames, so I'm feeling a bit more comfortable that this is going to work.

Assuming I bought some more drives in the future, would I be better off getting another firewire card or two, or going with USB 2?

Thanks again for all the help and advice,
Ewan

#13 lore raw

I have not had any corruption or any other problems, other than when a disk fails. Even then, never had data loss. I just ignore the bogus numbers.

Guy

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ewan Grantham
Sent: Sunday, November 28, 2004 6:33 PM
To: Guy
Cc: David Greaves; [email protected]
Subject: Re: Preparation advice?

Quoted 3 lines · Guy

This is normal (IMO) for a 2.4 kernel.
I think it has been fixed in the 2.6 kernel. But I have never used the newer kernel, so I can't confirm that. It may have been a newer version

of

Quoted 1 line

mdadm, not the kernel, not sure.

A rather different definition of normal - but for a computer system I guess I shouldn't be that surprised :-)

I'm not overly inclined to move to the 2.6 kernel at the moment as my experience with IEEE1394 under 2.6 has been very mixed. I think it's because it's easier to see what's happening "under the hood" with the 2.4 code.

Since I gather you haven't seen any lost data from this, then I'm going to start filling up. Did a couple test captures today without any dropped frames, so I'm feeling a bit more comfortable that this is going to work.

Assuming I bought some more drives in the future, would I be better off getting another firewire card or two, or going with USB 2?

Thanks again for all the help and advice,
Ewan
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#14 lore raw
In reply to Ewan Grantham
Quoted 13 lines · Ewan Grantham
Quoted 1 line · Gordon Henderson

Sounds like a bit of a homebrew bits & pieces box... :)

Well, it started out as a Compaq Presario, but as time has gone on...

Quoted 6 lines

Read the Software RAID FAQ on

http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html

It's got basic instructions for both the older raidtools and the newer mdadm.

Quoted 6 lines

Is that going to ever be updated? I saw that site, as well as the helpful chapter extract for using MDADM on O'Reilly, and noticed both were from about 2002. I understand that the tools still work basically the same way, but wonder if "our" understanding of RAID hasn't come along a bit since then. And there are other topics that would be nice to address - that I will be asking about shortly :-)

Er, I'm sure if you want to volenteer to update it your thoughts will be taken on-board :)

Quoted 5 lines
Quoted 1 line

And might you not want to make the bood drive mirrored also?

My boot drive is OS only. Idea has been (from past experience) to not have anything on the boot drive that I wouldn't mind wiping for a reinstall.

Fair-enough, but with 4 big disks, taking a GB to put the OS on, and have it RAID1'd over the 4 disks might just save you that half-days agony if the boot disk ever fails..

Quoted 2 lines

Currently building md0 as RAID 5 with chunk of 128 since all the examples seem to indicate that is "better" than the 64 default.

"Better" really depends on what you might be using it for - but it sounds like it might be OK if all you are doing is streaming large files... The only realy way to work out is to benchmark the array with something thats as close to your application as possible.

Remember that you can reflect the chunk size in the ext2/3 strip size... (And maybe for other filesystems too)

Quoted 2 lines

Created a mount point /mnt/md0, but do I edit /etc/fstab or another file since fstab seems to be generated on boot?

I don't know any distros that denetate this at boot time, but I only really know Debian and a bit of deadrat these days. Traditionally you would edit this file to add in your array under some mount point of your choosing.

Quoted 2 lines

Also, once the build of md0 is complete, I assume I need to format my new "drive". Any suggestions as to ext2 or ext3 or reiser or ...

You can format is while it's building. However, in-light of the recent threads on drive failures, etc. it's well worth your time to run badblocks on it overnight with both read and write tests just to make sure that every block can be actually written and read back again, although just waiting for the raid5 to sync will do some of this, but not everything. If you have the time, I'd recomend you do it.

Also make sure you have the right drivers loaded in the kernel - it's worth while doing a gross speed test on each device using hdparm to check this - eg. hdparm -Tt /dev/sad1 etc.

I'd build the array, wait for it to sync, run badblocks -sw -p99 -c8192 on it overnight, then mkfs it with your favouring filesystem.

Holy wars have been fought over lesser issues than filesystem choice, so you might as well toss a coin, or stick to something you know and like. A journalling filesystem (eg. ext3, xfs, reiser) may impose some latency on long streaming writes which is what you are after, but only benchmarking will tell you this.

Personally, I'd stick to ext2 or 3, having used it for many years now, but I might have a look at XFS again, which I looked at some 12-18 months back but didn't really have good results with it.

Quoted 2 lines

Array will be used to capture and edit home videos - to the extent that would influence folks suggestions.

Enjoy!

Gordon