Skip to contentSkip to conversation

LVM writes on raw disk of ATA RAID Mirror

linux-lvm Ewen McNeill 4 participants 4 messages Apr 30, 2003 – May 2, 2003 1 message not in the archive

lore
Share & tools
lore

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

#1 lore raw

In message <[email protected]>, Andrew Reche

Quoted 3 lines · nberg
Quoted 1 line

[LVM 1.0.x; vgscan finds parts of RAID arrays and uses those instead]

vgscan has similar problems with MD devices in a software RAID10 (but not RAID1) configuration. [...]

Interesting. I've been told, and found in the source, that there were some hacks in LVM to make LVM and md work in some common situations (basically there's a loop after the first device scan which tries to eliminate some of the duplicates; and there's a /* FIXME */ comment immediately before that loop). It seems that you've found one of the situations where these hacks are too limited.

Quoted 4 lines

I was trying to hack vgscan to get my setup working but I needed the box working ASAP so time dictated that I use the KludgeMethod(tm). Someone on the list recommended that I move /dev/md0 before I run my vgscan. [....]

That is really quite ugly :-) I suspect something like that might work for the ataraid case too, right up to the point that someone runs vgscan for some reason without going through the "hide things from vgscan so it doesn't get it wrong" ritual -- at which point (with a little prompting) it silently swaps over to using part of the RAID array, and the RAID array gets out of sync, and then on next reboot it swaps back to using the RAID array, and the partitions are corrupt.

I'm afraid that's a little too much potential excitement for my liking!

I've been told that LVM 2 has some support where you can say what devices to scan (and what devices not to scan). I've not looked at LVM 2 yet, so I don't know how fine grained it is, but it might suit your situation.

However after all this investigation I can't help thinking that the LVM vgscan approach is broken by design, particularly to be run automatically on startup. The idea that one can somehow look through all the connected devices and guess which one to use, and then automatically use those guesses on the assumption they'll always be right, just seems to be asking for trouble. Static configuration files, and having these things under manual control, seems a far more reliable way to approach the situation.

For now this ataraid system will be built without LVM, as it seems the only way to be sure that the RAID array will actually always be used.

Thanks for your comments,

Ewen

#2 lore raw
Quoted 2 lines · Ewen McNeill

I've been told that LVM 2 has some support where you can say what devices to scan (and what devices not to scan).

LVM2 offers selection by device type (i.e. the names that appear in /proc/devices giving block device major numbers) and regular-expression based selection by device name.

Alasdair

Signature · 1 line
[email protected]
#3 lore raw
In reply to Ewen McNeill

I forgot to mention that I move the md0 entry back into place after I run vgscan. It's worked quite well and across numerous reboots.

It is VERY ugly, but it "Works For Me(TM)" :)

Quoted 53 lines · Ewen McNeill

In message <[email protected]>, Andrew Reche

Quoted 3 lines · nberg
Quoted 1 line

[LVM 1.0.x; vgscan finds parts of RAID arrays and uses those instead]

vgscan has similar problems with MD devices in a software RAID10 (but not RAID1) configuration. [...]

Interesting. I've been told, and found in the source, that there were some hacks in LVM to make LVM and md work in some common situations (basically there's a loop after the first device scan which tries to eliminate some of the duplicates; and there's a /* FIXME */ comment immediately before that loop). It seems that you've found one of the situations where these hacks are too limited.

Quoted 4 lines

I was trying to hack vgscan to get my setup working but I needed the box working ASAP so time dictated that I use the KludgeMethod(tm). Someone on the list recommended that I move /dev/md0 before I run my vgscan. [....]

That is really quite ugly :-) I suspect something like that might work for the ataraid case too, right up to the point that someone runs vgscan for some reason without going through the "hide things from vgscan so it doesn't get it wrong" ritual -- at which point (with a little prompting) it silently swaps over to using part of the RAID array, and the RAID array gets out of sync, and then on next reboot it swaps back to using the RAID array, and the partitions are corrupt.

I'm afraid that's a little too much potential excitement for my liking!

I've been told that LVM 2 has some support where you can say what devices to scan (and what devices not to scan). I've not looked at LVM 2 yet, so I don't know how fine grained it is, but it might suit your situation.

However after all this investigation I can't help thinking that the LVM vgscan approach is broken by design, particularly to be run automatically on startup. The idea that one can somehow look through all the connected devices and guess which one to use, and then automatically use those guesses on the assumption they'll always be right, just seems to be asking for trouble. Static configuration files, and having these things under manual control, seems a far more reliable way to approach the situation.

For now this ataraid system will be built without LVM, as it seems the only way to be sure that the RAID array will actually always be used.

Thanks for your comments,

Ewen

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Signature · 2 lines
Andrew Rechenberg <[email protected]>
Infrastrucutre Team, Sherman Financial Group
#4 lore raw

[linux-lvm] LVM, GFS, and clustered mail servers

This is a little off the typical discussion found on the list, and I apologize in advance for the slight interruption.

I'm looking for anyone who has used LVM and Sistina's GFS to implement a
clustered mail server environment using commodity PCs. I use the term cluster
here, somewhat loosely, to describe multiple machines providing the same or similar service(s), in this case mail services (pop, imap, webmail, smtp). I'm particularly interested in your use of LVM/GFS in implementing a shared mail store/filesystem.

If you have such a setup, and could spare a few moments, I'd like to pick your brain on your cluster configuration and experiences. Feel free to reply to the list or directly.

Some of the things I'd like to know are:

Describe your config, number of machines, adapters, disk subsystems (manufacturer would be helpful for adapters and disk subsystem).

Software you're using to provide mail services? (sendmail, qmail, cyrus, courier, squirrelmail, etc.)

How many users do you serve?

How did you decide to distribute workload? RR DNS? Split services among machines? Linux Virtual Server? Something else?

Do you share more than the mail filesystem among machines? If so, what?

Do you have any performance numbers?

What snags did you hit?

If you had to implement again, which would you choose: "big box" or the cluster?

Anything else you'd like to volunteer.

Thanks in advance,
Scott

--
Scott Parish, Systems Administrator, Pittsburg State University Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford