why partition arrays?
As the Debian mdadm maintainer, I am often subjected to questions about partitionable arrays; people seem to want to use them in favour of normal arrays. I don't understand why.
There's possibly an argument to be made about flexibility when it comes to resizing partitions within the array, but even most MD array types can be resized now.
There's possibly an argument about saving space because of fewer sectors used/wasted with superblock information, but I am not going to buy that.
Why would anyone want to create a partitionable array and put partitions in it, rather than creating separate arrays for each filesystem? Intuitively, this makes way more sense as then the partitions are independent of each other; one array can fail and the rest still works -- part of the reason why you partition in the first place.
Would anyone help me answer this FAQ?
(btw: [0] and [1] are obviously for public consumption; they are available under the terms of the artistic licence 2.0)
0. http://svn.debian.org/wsvn/pkg-mdadm/mdadm/trunk/debian/FAQ?op=file&rev=0&sc=0
1. http://svn.debian.org/wsvn/pkg-mdadm/mdadm/trunk/debian/README.recipes?op=file&rev=0&sc=0
Signature · 10 lines
martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck spamtraps: [email protected] "the liar at any rate recognises that recreation, not instruction, is the aim of conversation, and is a far more civilised being than the blockhead who loudly expresses his disbelief in a story which is told simply for the amusement of the company." -- oscar wilde
Quoted 8 lines · martin f krafft
Why would anyone want to create a partitionable array and put partitions in it, rather than creating separate arrays for each filesystem? Intuitively, this makes way more sense as then the partitions are independent of each other; one array can fail and the rest still works -- part of the reason why you partition in the first place.
Would anyone help me answer this FAQ?
There are a couple reasons I can think.
First, not all md types make sense to be split up, aka multipath. For those types, when a disk fails, the *entire* disk is considered to be failed, but with different arrays you won't fail over to the next path until each md array has attempted to access the bad path. This can have obvious bad consequences for certain array types that do automatic failover from one port to another (you can end up getting the array in a loop of switching ports repeatedly to satisfy the fact that one array failed over during a path down, then the path came back up, and another array stayed on the old path because it didn't send any commands during the path down time period).
Second, convenience. Assume you have a 6 disk raid5 array. If a disk fails and you are using a partitioned md array, then all the partitions on the disk will already be handled without using that disk. No need to manually fail any still active array members from other arrays.
Third, safety. Again with the raid5 array. If you use multiple arrays on a single disk, and that disk fails, but it only failed on one array, then you now need to manually fail that disk from the other arrays before shutting down or hot swapping the disk. Generally speaking, that's not a big deal, but people do occasionally have fat finger syndrome and this is a good opportunity for someone to accidentally fail the wrong disk, and when you then go to remove the disk you create a two disk failure instead of one and now you are in real trouble.
Forth, to respond to what you wrote about independent of each other -- part of the reason why you partition. I would argue that's not true. If your goal is to salvage as much use from a failing disk as possible, then OK. But, generally speaking, people that have something of value on their disks don't want to salvage any part of a failing disk, they want that disk gone and replaced immediately. There simply is little to no value in an already malfunctioning disk. They're too cheap and the data stored on them too valuable to risk loosing something in an effort to further utilize broken hardware. This of course is written with the understanding that the latest md raid code will do read error rewrites to compensate for minor disk issues, so anything that will throw a disk out of an array is more than just a minor sector glitch.
Quoted 6 lines
(btw: [0] and [1] are obviously for public consumption; they are available under the terms of the artistic licence 2.0)
0. http://svn.debian.org/wsvn/pkg-mdadm/mdadm/trunk/debian/FAQ?op=file&rev=0&sc=0
1. http://svn.debian.org/wsvn/pkg-mdadm/mdadm/trunk/debian/README.recipes?op=file&rev=0&sc=0
Signature · 6 lines
Doug Ledford <[email protected]> GPG KeyID: CFBFF194 http://people.redhat.com/dledford Infiniband specific RPMs available at http://people.redhat.com/dledford/Infiniband
also sprach Doug Ledford <[email protected]> [2006.10.18.1526 +0200]:
Quoted 1 line
There are a couple reasons I can think.
Thanks for your elaborate response. If you don't mind, I shall link to it from the FAQ.
I have one other question: do partitionable and traditional arrays actually differ in format? Put differently: can I assemble a traditional array as a partitionable one simply by specifying:
mdadm --create ... /dev/md0 ...
mdadm --stop /dev/md0
mdadm --assemble --auto=part ... /dev/md0 ...
? Or do the superblocks actually differ?
Thanks,
Signature · 8 lines
martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck spamtraps: [email protected] the images rushed around his mind and tried to find somewhere to settle down and make sense. -- douglas adams, "the hitchhiker's guide to the galaxy"
Quoted 5 lines · martin f krafft
also sprach Doug Ledford <[email protected]> [2006.10.18.1526 +0200]:
Quoted 1 line
There are a couple reasons I can think.
Thanks for your elaborate response. If you don't mind, I shall link to it from the FAQ.
Sure.
Quoted 9 lines
I have one other question: do partitionable and traditional arrays actually differ in format? Put differently: can I assemble a traditional array as a partitionable one simply by specifying:
mdadm --create ...
/dev/md0...
mdadm --stop/dev/md0
mdadm --assemble --auto=part .../dev/md0...? Or do the superblocks actually differ?
Neil would be more authoritative about what would differ in the superblocks, but yes, it is possible to do as you listed above. In fact, if you create a partitioned array, and your mkinitrd doesn't restart it as a partitioned array, you'll wonder how to mount your filesystems since the system will happily start that originally partitioned array as non partitioned.
Signature · 6 lines
Doug Ledford <[email protected]> GPG KeyID: CFBFF194 http://people.redhat.com/dledford Infiniband specific RPMs available at http://people.redhat.com/dledford/Infiniband
Quoted 5 lines · martin f krafft
Why would anyone want to create a partitionable array and put partitions in it, rather than creating separate arrays for each filesystem? Intuitively, this makes way more sense as then the partitions are independent of each other; one array can fail and the rest still works -- part of the reason why you partition in the
Intuitively, especially the independence is a really mixed blessing.
First: If a disk fails somehow, md usually makes sure there is no further access to it which could probably worsen the situation, i.e. freeze busses, controllers, etc. Yes, this is a bit softened with the new read-error-correction code, but IMHO still valid - and gets IMHO even more and more valid with cheaper and cheaper controllers. With multiple raids over partitions the disk is still a candidate to be accessed subsequently.
Second: Bigger independence does also mean bigger concurrency. RAID1 for example tries to equalize reads and directs reads to the mirror with it's heads "closest" to the read-position (how good the "close" estimation will ever be). Since partitions are somehow connected together (especially by the disk's heads), concurrent access to multiple RAIDs could torpedize this optimization. Perhaps this got a bit better in 2.6, I don't know, in 2.4 you can watch this very well.
regards
Mario
Signature · 3 lines
But after a while I learned the trick of speaking fast. You don't have
to think any faster; just use twice as many words to say everything.
-- Paul Graham