2015년 4월 12일 일요일

Recovery of degraded arrays of RAID1 (레이드1에서 동기화 어긋난 하드 디스크 복구)

우분투 12 Saucy. RAID1으로 미러링 중인 두 하드 중 하나가 고장 나거나, 동기화가 어긋난 경우(degraded) 아래와 같이 해당 파티션을 제거 했다가 다시 추가하면 mdadm이 동기화를 다시 시켜서 복구함.

In Ubuntu 12 Saucy, with mirrored two hard drives, /dev/sda and /dev/sdb, which are partitioned as three volumes, 1, 2, and 3, sda's partitions are degraded by some unknown reason. This happens regularly to me around once every other year with two identical WD 500GB hard drives.

To sync the degraded array back, you simply detach (remove) the partition and attach (add) it again like the followings:

Remove the unsynced hard drive
$ sudo mdadm --remove /dev/md0 /dev/sda1
$ sudo mdadm --remove /dev/md1 /dev/sda2
$ sudo mdadm --remove /dev/md2 /dev/sda3

(You may not need to remove the hard drive, because if it has been long since it's degraded, mdadm removes the hard drive by itself.)

Add them again into the array (to run the sync process again)
$ sudo mdadm --add /dev/md0 /dev/sda1
$ sudo mdadm --add /dev/md1 /dev/sda2
$ sudo mdadm --add /dev/md2 /dev/sda3

Then mdadm synchronizes the partitions of the hard drive one by one with its mirrored one. It takes for a while up to the size of the hard drive.


우분투 12 Saucy. RAID1으로 미러링 중인 두 하드 중 하나가 고장 나거나, 동기화가 어긋난 경우(degraded) 위와 같이 해당 파티션을 제거 했다가 다시 추가하면 mdadm이 동기화를 다시 시켜서 복구함.


댓글 없음:

댓글 쓰기

Xubuntu: Installing a Printer (Canon G3060 PIXMA)

$ sudo apt install system-config-printer Download the proper driver for linux from Canon website. Turn on the printer and set up its WiFi. C...