RE: [opensuse] possible raid failure?
On Sat, 07 Feb 2009, 06:11:01 +0100, James D. Parra wrote:
[...] You can find a very good description about this at the following URL:
<http://smartmontools.sourceforge.net/badblockhowto.html ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~``
This looks great. Curiously, the examples show ext2/ext3, however will it work with XFS?
The "Repairs in a file system" part only covers ext2/3 and reiser; from that page: The authors would like to add text showing how to do this for other file systems, in particular XFS, and JFS: please email if you can provide this information. The "Repairs at the disk level" is independant from the file system you're using, of course. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Yes, I read that and thought the best course of action is to replace the drive. I have several questions on how to accomplish this without overwriting the data on the mirrored drive. Raid mdo (raid1) = sda1 - sdb1 mounted as /boot Raid md1 (raid1) = sda2 - sdb2 mounted as / When I replace the sda drive will the server still boot? How can I ensure that once sda is partitioned identically to sdb and the raid started that the empty space on sda1 & sda2 don't overwrite the live data on sdb1 & sdb2? Thank you for your help. James -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi James, On Mon, 09 Feb 2009, 18:02:18 +0100, James D. Parra wrote:
[...] Yes, I read that and thought the best course of action is to replace the drive.
I have several questions on how to accomplish this without overwriting the data on the mirrored drive.
Raid mdo (raid1) = sda1 - sdb1 mounted as /boot
Raid md1 (raid1) = sda2 - sdb2 mounted as /
When I replace the sda drive will the server still boot?
Provided you installed GRUB on both disks, yes. Make sure your /etc/grub.conf looks similar to the following one: setup --stage2=/boot/grub/stage2 (hd0) (hd0,0) setup --stage2=/boot/grub/stage2 (hd1) (hd0,0) quit This will install GRUB into the MBR of each disk.
How can I ensure that once sda is partitioned identically to sdb and the raid started that the empty space on sda1 & sda2 don't overwrite the live data on sdb1 & sdb2?
Just power down the computer, install the new hard disk and boot from the second drive (your BIOS should help you in doing this). Once the system is back to the login prompt, login as "root" and run the following commands (it's probably better to check that /dev/sdb is still your old and working disk before running them!): sfdisk -l /dev/sdb | sfdisk /dev/sda mdadm /dev/md0 --add /dev/sda1 mdadm /dev/md1 --add /dev/sda2 This will create partitions on /dev/sda identical to those on /dev/sdb. Afterwards the new /dev/sda1 and /dev/sda2 will be hot-added to their respective MD device. Once that's done, you can check with cat /proc/mdstat if the drives will be synchronized.
Thank you for your help.
James
HTH, cheers. l8er manfred PS: Can you please post your e-mails with some better client? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
James D. Parra
-
Manfred Hollstein