When attempting to test that my RAID-1 configuration was working, I am thinking that I may have made a mistake that could cause future corruption of data because I booted from a single HDD when the other was off.

I have a SATA RAID 1 array set up on my Ubuntu 10.04 machine which I believe is using fakeraid with dmraid to map the disk array into a single filesystem). To test that my RAID-1 config was working, I unplugged one of the SATA drives when the machine was off and started the machine up.

During startup of the BIOS, the computer issued a complaint that one of the disks from the array was missing - as expected. During the linux boot, it seems that dmraid was not mapping the RAID array under /dev/mapper/ because the second disk wasn't detected, and I wouldn't get past initramfs. To get around this, I rebooted and changed my GRUB options to start up linux using the parameter "root=/dev/sda1" instead of "/dev/mapper/" to boot directly from the disk that was still plugged in.

I rebooted and booted into Linux fine - immediately turned the machine off, plugged in the other disk and booted up with both HDDs enabled - RAID back on and original boot arguments set to use /dev/mapping/".

Everything seems to be working fine, but I'm worried there could be some problems down the road if something got written to disk during the boot when /dev/sda1 was being explicitly used.

Is there any way I can verify integrity of the RAID-1 array between the two disks? I tried doing an fsck but it complained that I was using a mounted filesystem and that this was a no-no. Any ideas?

migrated from serverfault.com Apr 28 '11 at 9:58

This question came from our site for system and network administrators.


You could brute-force it.

Power down. Remove drive 1. Boot from a CD. Mount filesystems on the drive 2 and checksum the files. Save output.

Power down, replace drive 1, remove drive 2. Boot from a CD, mount filesystems on the drive 1, checksum the files, save output.

Compare outputs from the two previous steps.

You can also run fsck on the filesystems, but it shouldn't be necessary. You didn't yank the drive off the box, so the filesystems should be clean.

  • The problem that I see with this approach is that RAID is done at a lower level than the actual filesystem. – enecess Apr 28 '11 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.