Situation:
one of the RAID disks failed.
there is one good disk.
How to recover (copy all files to another disk)
1. Have the good disk connected to some SATA to USB.
2. Install Ubuntu 22.04
* it can be Hyper-V VM on windows
* The HDD need to be conected to the PC over USB. in the "Windows Disk Management" r-click the disk and "offline" it. Then go to VM settings and attach physical disk to the VM.
2. install some relevant tools
sudo apt install -y lvm2 mdadm mc partitionmanager
3. create mount point
sudo mkdir /mnt/test
4. Open ubuntu disks (part of the default install see in the list of applications) and find the linux name of the partition you want to mount it would be something like
/dev/sdd3
it type would be "Linux RAID member"
5. do the following
mdadm --assemble --run /dev/md0 /dev/sdd3
* if it say that the disk is busy - check may be it already mapped to some other /dev/md* i did not researched the reason for that.
now there is a new device /dev/md0
lvmdiskscan
lvscan
vgchange -ay
lvs
lvdisplay
look among logical volumes for something like "LV Path" looks like /dev/vg288/lv4
mount -o ro /dev/vg288/lv4 /mnt/test
Now the RAID disk should be available at the path /mnt/test/....
Done.
No comments:
Post a Comment