Possible to rescue SW Raid5 with 2 missing Disks
I heart that -force could be result in more problems - right? i do asswell:
mdadm -Af -vv /dev/md2
mdadm: looking for devices for /dev/md2
mdadm: cannot open device /dev/md/1: Device or resource busy
mdadm: /dev/md/1 has wrong uuid.
mdadm: cannot open device /dev/md/0: Device or resource busy
mdadm: /dev/md/0 has wrong uuid.
mdadm: /dev/sdf4 has wrong uuid.
mdadm: cannot open device /dev/sdf3: Device or resource busy
mdadm: /dev/sdf3 has wrong uuid.
mdadm: cannot open device /dev/sdf2: Device or resource busy
mdadm: /dev/sdf2 has wrong uuid.
mdadm: no RAID superblock on /dev/sdf1
mdadm: /dev/sdf1 has wrong uuid.
mdadm: cannot open device /dev/sdf: Device or resource busy
mdadm: /dev/sdf has wrong uuid.
mdadm: /dev/sde4 has wrong uuid.
mdadm: cannot open device /dev/sde3: Device or resource busy
mdadm: /dev/sde3 has wrong uuid.
mdadm: cannot open device /dev/sde2: Device or resource busy
mdadm: /dev/sde2 has wrong uuid.
mdadm: no RAID superblock on /dev/sde1
mdadm: /dev/sde1 has wrong uuid.
mdadm: cannot open device /dev/sde: Device or resource busy
mdadm: /dev/sde has wrong uuid.
mdadm: /dev/sdc4 has wrong uuid.
mdadm: cannot open device /dev/sdc3: Device or resource busy
mdadm: /dev/sdc3 has wrong uuid.
mdadm: cannot open device /dev/sdc2: Device or resource busy
mdadm: /dev/sdc2 has wrong uuid.
mdadm: no RAID superblock on /dev/sdc1
mdadm: /dev/sdc1 has wrong uuid.
mdadm: cannot open device /dev/sdc: Device or resource busy
mdadm: /dev/sdc has wrong uuid.
mdadm: /dev/sdd4 has wrong uuid.
mdadm: cannot open device /dev/sdd3: Device or resource busy
mdadm: /dev/sdd3 has wrong uuid.
mdadm: cannot open device /dev/sdd2: Device or resource busy
mdadm: /dev/sdd2 has wrong uuid.
mdadm: no RAID superblock on /dev/sdd1
mdadm: /dev/sdd1 has wrong uuid.
mdadm: cannot open device /dev/sdd: Device or resource busy
mdadm: /dev/sdd has wrong uuid.
mdadm: /dev/sdb4 has wrong uuid.
mdadm: cannot open device /dev/sdb3: Device or resource busy
mdadm: /dev/sdb3 has wrong uuid.
mdadm: cannot open device /dev/sdb2: Device or resource busy
mdadm: /dev/sdb2 has wrong uuid.
mdadm: no RAID superblock on /dev/sdb1
mdadm: /dev/sdb1 has wrong uuid.
mdadm: cannot open device /dev/sdb: Device or resource busy
mdadm: /dev/sdb has wrong uuid.
mdadm: /dev/sda4 has wrong uuid.
mdadm: cannot open device /dev/sda3: Device or resource busy
mdadm: /dev/sda3 has wrong uuid.
mdadm: cannot open device /dev/sda2: Device or resource busy
mdadm: /dev/sda2 has wrong uuid.
mdadm: no RAID superblock on /dev/sda1
mdadm: /dev/sda1 has wrong uuid.
mdadm: cannot open device /dev/sda: Device or resource busy
mdadm: /dev/sda has wrong uuid.
it looks strang die device should sdX4...
Quoted 1 line · Dragon
I heart that -force could be result in more problems - right? i do asswell:
Compared to the trouble people get into when getting --create --assume-clean and getting it wrong, I'd say --force is *nothing*.
--force needs drives that have similar event count, if they're too far apart (one drive for instance), then that specific drive shouldn't be used when assembling.
Signature · 1 line
Mikael Abrahamsson email: [email protected]
Quoted 5 lines · Mikael Abrahamsson
Quoted 2 lines · Dragon
I heart that -force could be result in more problems - right? i do asswell:
Quoted 7 lines
Compared to the trouble people get into when getting --create --assume-clean and getting it wrong, I'd say --force is *nothing*.
--force needs drives that have similar event count, if they're too far apart (one drive for instance), then that specific drive shouldn't be used when assembling.
To the point I've been ready to submit a patch for --assume-clean along the lines of what hdparm does and makes you also attach --please-destroy-my-disk before it'll work.
--assume-clean is great for those that need it, but for the great majority who rely on google and wikis it's a data-destroyer.
Not mdadm's fault however. More the twits who wrote the wikis.
Quoted 2 lines · Brad Campbell
To the point I've been ready to submit a patch for --assume-clean along the lines of what hdparm does and makes you also attach --please-destroy-my-disk before it'll work.
Yes, I think this is an excellent idea. It should have --please-destroy-my-disk, and if there are existing superblocks, it should save the contents of mdadm --examine before overwriting or zero:ing them.
--assemble --force should list the drive event count and say which drives have differing event counts and ask for confirmation that this is really what the operator wants to do. If the event count differs more than 50 (or some other value), there should be a requirement for --please-destroy-my-array to be added :P
Quoted 2 lines
--assume-clean is great for those that need it, but for the great majority who rely on google and wikis it's a data-destroyer.
I agree.
Signature · 1 line
Mikael Abrahamsson email: [email protected]
Quoted 5 lines · Mikael Abrahamsson
Quoted 1 line · Brad Campbell
To the point I've been ready to submit a patch for --assume-clean along the lines of what hdparm does and makes you also attach --please-destroy-my-disk before it'll work.
Yes, I think this is an excellent idea. It should have --please-destroy-my-disk, and if there are existing superblocks, it should save the contents of mdadm --examine before overwriting or zero:ing them.
Please don't get me wrong. There is no nice way of protecting fools from themselves short of revoking their license to breed, it's just from my severely opinionated viewpoint that this looks like a sane idea. I'm quite prepared to be slapped, and in fact probably need it.
Quoted 7 lines
--assemble --force should list the drive event count and say which drives have differing event
counts and ask for confirmation that this is really what the operator wants to do. If the event count differs more than 50 (or some other value), there should be a requirement for --please-destroy-my-array to be added :PQuoted 2 lines
--assume-clean is great for those that need it, but for the great majority who rely on google and wikis it's a data-destroyer.
This is not a sleight on Neil and/or mdadm. The tools are wonderful, it's those that compose permanent articles without a full understanding that need adjusting. Unfortunately it's also those that don't really care as long as it drives page hits or reputation.
Brad (the unpleasant)
Quoted 1 line · Brad Campbell
Please don't get me wrong. There is no nice way of protecting fools from themselves short of revoking their license to breed, it's just from my severely opinionated viewpoint that this looks like a sane idea. I'm quite prepared to be slapped, and in fact probably need it.
Well, yes, it's a sane idea.
Right now it seems a significant part of new threads started on this list is about people doing --create --assume-clean with a different version of mdadm (so offset/chunk-size/whatever is wrong) or they have the wrong order. In order to help them, I believe the default behaviour of --zero-superblock without any additional flags, should be to give hdparm style message so that the user understands what is really going to happen, and when the superblocks are zeroed, a mdadm --examine and --detail (if the array is running) with a UUID/date should be saved somewhere.
The aim would be to drive two things:
People should think thrice about using --create --assume-clean. If they do (or do --zero-superblock), detailed information should be saved for the array and components before the operation was performed.
Signature · 1 line
Mikael Abrahamsson email: [email protected]