software raid 1 fails
Hello, after many years I had my first failure on a server with software RAID 1, but that server was not defined the drive names as sda and sdb, cat /proc/mdstat shows that the first disk failed, to solve it, just replace it on the first disk reported or do I need to manually power off the failed disk for raid sync to be done?
cat /proc/mdstat:
fdisk -l shows:
Disk /dev/nvme1n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk Model: Netac NVMe SSD 1TB
Units: 1 sector * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimum): 512 bytes / 512 bytes
Disk label type: gpt
Disk Identifier: 1C2A4D25-B061-45D8-884C-95077C9BABA2
Device Start End Sectors Size Type
/dev/nvme1n1p1 2048 1953523711 1953521664 931.5G Linux RAID
Disk /dev/md0: 930.46 GiB, 999068532736 bytes, 1951305728 sectors
Units: 1 sector * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimum): 512 bytes / 512 bytes
Disk /dev/mapper/vg0-swap: 7.45 GiB, 7998537728 bytes, 15622144 sectors
Units: 1 sector * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimum): 512 bytes / 512 bytes
Disk /dev/mapper/vg0-root: 923 GiB, 991067897856 bytes, 1935679488 sectors
Units: 1 sector * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimum): 512 bytes / 512 bytes
https://purplehost.com.br - Reliable, secure and affordable game hosting.
Comments
Working drive: /dev/nvme1n1
Failed drive: /dev/nvme0n1
In this case, "/dev/nvme0n1" has failed and has presumably been replaced by the datacenter.
Once the server is booted after the failed drive is replaced, copy the partition table from the working drive to the replaced drive.
sgdisk /dev/nvme1n1 -R /dev/nvme0n1
Rebuild the array now.
mdadm --add /dev/md0 /nvme0n1p1
Check /dev/ directory or "fdisk -l" for partitions and "mdadm --detail /dev/md0"
ExtraVM - High RAM Specials
Yours truly.
be careful. raid saved your data during the loss of one drive. first action should be to take fresh backups while the data is still available and in case anything else goes wrong during the rebuild.
Definitely back up first as @Falzo said. More than once, I've accidentally copied crap over my only copy of the data when trying something like this.
Free NAT KVM | Free NAT LXC
Mentally strong people use YOLORAID and don't take backups.
Webhosting24 aff best VPS; ServerFactory aff best VDS; Cloudie best ASN; Huel aff best brotein.