Re: The definitive guide to replacing a disk in raid1?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cen writes:

# copy partition map from good disk to new disk
sfdisk -d /dev/sde | sfdisk /dev/sdd

This only works if the new disk is identical to the old one, geometry-wise.

Otherwise you can simply create partitions of the same size using parted, on the new drive.

# install bootloader on new disk
grub2-install /dev/sdd1

This should be /dev/sdd.

Also, presumably the failed disk gets removed (and the new disk gets installed) after shutting down the system. After the install the system gets booted (with the raid degraded) before attempting to partition the new disk and reinstall grub.

If your hardware has hot-swappable drives and you're trying to hot-swap them there's an additional step. Somewhere. About ten years ago I went through this, and I had to echo something to tell the kernel to deactivate a physical drive before removing in, and reenabling it after the new drive gets attached. It's possible that this is no longer needed, and the kernel will figure out directly from the hardware.

Som Googling around suggests that these days it's controller dependent. Some controllers have a meeting of the minds with the kernel, and hot-swapping a drive will Just Work™. In other case you have to poke the kernel, in a few places.

Attachment: pgpqWvsyKhmWB.pgp
Description: PGP signature

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux