同じ型番であるが、製造時期が違うので、ラベルが微妙に違う。
CHS は同じだろうな。
RAID1 にするために同じのを2つ買ってきたのに、
ブロック数が違ってたら笑うに笑えない。
SATA2 に標準ファームの 2.5 インチ HDD を接続、
SATA1 に右側の 2005 年製造の HDD を接続、
LS-WSGL を起動する。
root@LS-WSGL678:~# cat /proc/mdstat Personalities : [raid0] [raid1] md1 : active raid1 sda2[1] 5004160 blocks [2/1] [_U] md10 : active raid1 sda5[1] 1003904 blocks [2/1] [_U] md0 : active raid1 sda1[1] 1003904 blocks [2/1] [_U] unused devices:いつも通り sda だけで動作している。root@LS-WSGL678:~#
いろいろ散歩していて、
/usr/local/bin/raid_rebuild.sh を見つけた。
実行してみる。
root@LS-WSGL678:~# /usr/local/bin/raid_rebuild.sh *** /usr/local/bin/raid_rebuild.sh: (, -> none) : GetMdNoFromArray fail. root@LS-WSGL678:~#あかん。
root@LS-WSGL678:~# /usr/local/bin/raid_rebuild.sh array1 disk2 *** /usr/local/bin/raid_rebuild.sh:array1 disk2 (array1, disk2-> md2) GetDisknameFromDevname(disk2) remove drive /dev/sdb from md mdadm: set device faulty failed for /dev/sdb1: No such device mdadm: set device faulty failed for /dev/sdb2: No such device mdadm: cannot get array info for /dev/md2 mdadm: set device faulty failed for /dev/sdb5: No such device mdadm: hot remove failed for /dev/sdb1: No such device or address mdadm: hot remove failed for /dev/sdb2: No such device or address mdadm: cannot get array info for /dev/md2 mdadm: hot remove failed for /dev/sdb5: No such device or address dd: /dev/sdb1: No such device or address dd: /dev/sdb2: No such device or address dd: /dev/sdb6: No such device or address dd: /dev/sdb5: No such device or address Personalities : [raid0] [raid1] md1 : active raid1 sda2[1] 5004160 blocks [2/1] [_U] md10 : active raid1 sda5[1] 1003904 blocks [2/1] [_U] md0 : active raid1 sda1[1] 1003904 blocks [2/1] [_U] unused devices:なんか動いた。/dev/sdb total sectors=199148544 bytes=203928109056 189[GB} Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 24792. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) SCSI device sdb: 398297088 512-byte hdwr sectors (203928 MB) sdb: Write Protect is off SCSI device sdb: drive cache: write back SCSI device sdb: 398297088 512-byte hdwr sectors (203928 MB) sdb: Write Protect is off SCSI device sdb: drive cache: write back 1024+0 records in 1024+0 records out sectors=398297088 203[GB] 3 Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 24792. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) SCSI device sdb: 398297088 512-byte hdwr sectors (203928 MB) sdb: Write Protect is off SCSI device sdb: drive cache: write back /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] SCSI device sdb: 398297088 512-byte hdwr sectors (203928 MB) sdb: Write Protect is off SCSI device sdb: drive cache: write back /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] usersize=192[GB]RAID1 conf printout: --- wd:1 rd:2 disk 0, wo:1, o:1, dev:sdb1 disk 1, wo:0, o:1, dev:sda1 mdadm: added /dev/sdb1 RAID1 conf printout: --- wd:1 rd:2 disk 0, wo:1, o:1, dev:sdb2 disk 1, wo:0, o:1, dev:sda2 mdadm: added /dev/sdb2 RAID1 conf printout: --- wd:1 rd:2 disk 0, wo:1, o:1, dev:sdb5 disk 1, wo:0, o:1, dev:sda5 mdadm: added /dev/sdb5 wait for finish resync ... KERNELMOn (raidrecovery 0 1 1 1 8 17) wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... RAID1 conf printout: --- wd:2 rd:2 disk 0, wo:0, o:1, dev:sdb1 disk 1, wo:0, o:1, dev:sda1 KERNELMOn (raidrecovery 0 0 0 1 8 17) wait for finish resync ... KERNELMOn (raidrecovery 10 1 1 1 8 21) wait for finish resync ... wait for finish resync ... wait for finish resync ... RAID1 conf printout: --- wd:2 rd:2 disk 0, wo:0, o:1, dev:sdb5 disk 1, wo:0, o:1, dev:sda5 KERNELMOn (raidrecovery 10 0 0 1 8 21) wait for finish resync ... KERNELMOn (raidrecovery 1 1 1 1 8 18) wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... wait for finish resync ... RAID1 conf printout: --- wd:2 rd:2 disk 0, wo:0, o:1, dev:sdb2 disk 1, wo:0, o:1, dev:sda2 KERNELMOn (raidrecovery 1 0 0 1 8 18) mdadm: cannot get array info for /dev/md2 root@LS-WSGL678:~#
root@LS-WSGL678:~# cat /proc/mdstat Personalities : [raid0] [raid1] md1 : active raid1 sdb2[0] sda2[1] 5004160 blocks [2/2] [UU] md10 : active raid1 sdb5[0] sda5[1] 1003904 blocks [2/2] [UU] md0 : active raid1 sdb1[0] sda1[1] 1003904 blocks [2/2] [UU] unused devices: <none> root@LS-WSGL678:~#リビルドされた。
root@LS-WSGL678:~# fdisk -l /dev/sdb Disk /dev/sdb: 203.9 GB, 203928109056 bytes 255 heads, 63 sectors/track, 24792 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 125 1004031 83 Linux /dev/sdb2 126 748 5004247+ 83 Linux /dev/sdb4 749 24792 193133430 5 Extended /dev/sdb5 749 873 1004031 82 Linux swap /dev/sdb6 874 24217 187510648+ 83 Linux root@LS-WSGL678:~#なんで、sdb6 は最後まで使っていないの?
root@LS-WSGL678:~# fdisk -l /dev/sda Disk /dev/sda: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 125 1004031 83 Linux /dev/sda2 126 748 5004247+ 83 Linux /dev/sda4 749 30401 238187722+ 5 Extended /dev/sda5 749 873 1004031 82 Linux swap /dev/sda6 874 30295 236332183+ 83 Linux root@LS-WSGL678:~#標準ファームも sda6 は全部は使いきってないや。謎。
root@LS-WSGL678:~# cat /proc/mdstat Personalities : [raid0] [raid1] md1 : active raid1 sdb2[0] sda2[1] 5004160 blocks [2/2] [UU] md10 : active raid1 sdb5[0] sda5[1] 1003904 blocks [2/2] [UU] md0 : active raid1 sdb1[0] sda1[1] 1003904 blocks [2/2] [UU] unused devices:ちゃんと RAID 1 。root@LS-WSGL678:~#
root@LS-WSGL678:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/md1 4993920 273604 4720316 5% / /dev/ram1 15360 96 15264 1% /mnt/ram /dev/md0 988064 120628 867436 12% /boot /dev/disk1_6 236216784 279884 235936900 0% /mnt/disk1 root@LS-WSGL678:~#マウントはされていない。
なんだか、md0, md1, md10 までデグレードして、挙げ句の果て、
root@LS-WSGL678:~# !cat cat /proc/mdstat Personalities : [raid0] [raid1] md1 : active raid1 sdb2[0] sda2[1] 5004160 blocks [2/2] [UU] md10 : active raid1 sda5[1] 1003904 blocks [2/1] [_U] md0 : active raid1 sdb1[0] sda1[1] 1003904 blocks [2/2] [UU] unused devices:sdb5 はどっかに行ってしまった。なんで?root@LS-WSGL678:~#
現在、フォーマット、またはディスクチェックを実行しています 実行中はLinkStationの設定を変更することはできません また、ファイル共有サービスも停止していますといったまま固まってしまった。
ただし、
root@LS-WSGL678:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/md1 4993920 273676 4720244 5% / /dev/ram1 15360 232 15128 2% /mnt/ram /dev/md0 988064 120628 867436 12% /boot /dev/disk1_6 236216784 279884 235936900 0% /mnt/disk1 /dev/disk2_6 187419092 736 187418356 0% /mnt/disk2 root@LS-WSGL678:~#sdb6 はちゃんとマウントされている。
: : KERNELMOn (raidrecovery 10 0 0 1 8 21) : : root@LS-WSGL678:~# cat /proc/mdstat Personalities : [raid0] [raid1] md1 : active raid1 sdb2[0] sda2[1] 5004160 blocks [2/2] [UU] md10 : active raid1 sdb5[0] sda5[1] 1003904 blocks [2/2] [UU] md0 : active raid1 sdb1[0] sda1[1] 1003904 blocks [2/2] [UU] unused devices:リカバリされた。root@LS-WSGL678:~#
root@LS-WSGL678:~# cat /proc/mdstat Personalities : [raid0] [raid1] md1 : active raid1 sda2[1] 5004160 blocks [2/1] [_U] md10 : active raid1 sda5[1] 1003904 blocks [2/1] [_U] md0 : active raid1 sda1[1] 1003904 blocks [2/1] [_U] unused devices:sda だけで動いている。root@LS-WSGL678:~#
root@LS-WSGL678:~# /usr/local/bin/libbuffalo_bin create_partition /dev/sdb /dev/sdb total sectors=199148544 bytes=203928109056 189[GB} Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 24792. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) SCSI device sdb: 398297088 512-byte hdwr sectors (203928 MB) sdb: Write Protect is off SCSI device sdb: drive cache: write back SCSI device sdb: 398297088 512-byte hdwr sectors (203928 MB) sdb: Write Protect is off SCSI device sdb: drive cache: write back 1024+0 records in 1024+0 records out sectors=398297088 203[GB] 3 Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 24792. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) SCSI device sdb: 398297088 512-byte hdwr sectors (203928 MB) sdb: Write Protect is off SCSI device sdb: drive cache: write back /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] SCSI device sdb: 398297088 512-byte hdwr sectors (203928 MB) sdb: Write Protect is off SCSI device sdb: drive cache: write back /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] usersize=192[GB]root@LS-WSGL678:~# fdisk -l /dev/sdb Disk /dev/sdb: 203.9 GB, 203928109056 bytes 255 heads, 63 sectors/track, 24792 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 125 1004031 83 Linux /dev/sdb2 126 748 5004247+ 83 Linux /dev/sdb4 749 24792 193133430 5 Extended /dev/sdb5 749 873 1004031 82 Linux swap /dev/sdb6 874 24217 187510648+ 83 Linux root@LS-WSGL678:~#パーティションは切られたが、やっぱり sdb6 は全部は使われていない。謎。
root@LS-WSGL678:~# /etc/init.d/checkSysMd.sh /dev/md0 Raid Level : raid1 ** mdadm -a /dev/md0 /dev/sdb1 RAID1 conf printout: --- wd:1 rd:2 disk 0, wo:1, o:1, dev:sdb1 disk 1, wo:0, o:1, dev:sda1 mdadm: added /dev/sdb1 /dev/md1 Raid Level : raid1 KERNELMOn (raidrecovery 0 1 1 1 8 17) ** mdadm -a /dev/md1 /dev/sdb2 RAID1 conf printout: --- wd:1 rd:2 disk 0, wo:1, o:1, dev:sdb2 disk 1, wo:0, o:1, dev:sda2 mdadm: added /dev/sdb2 /dev/md10 Raid Level : raid1 ** mdadm -a /dev/md10 /dev/sdb5 RAID1 conf printout: --- wd:1 rd:2 disk 0, wo:1, o:1, dev:sdb5 disk 1, wo:0, o:1, dev:sda5 mdadm: added /dev/sdb5 root@LS-WSGL678:~#あれ?フォーマットせずに add しているだけ。それでいいのか。。。
root@LS-WSGL678:~# cat /proc/mdstat Personalities : [raid0] [raid1] md1 : active raid1 sdb2[2] sda2[1] 5004160 blocks [2/1] [_U] resync=DELAYED md10 : active raid1 sdb5[2] sda5[1] 1003904 blocks [2/1] [_U] resync=DELAYED md0 : active raid1 sdb1[2] sda1[1] 1003904 blocks [2/1] [_U] [===========>.........] recovery = 56.9% (572672/1003904) finish=0.1min speed=47777K/sec unused devices: <none> root@LS-WSGL678:~# RAID1 conf printout: --- wd:2 rd:2 disk 0, wo:0, o:1, dev:sdb1 disk 1, wo:0, o:1, dev:sda1 KERNELMOn (raidrecovery 0 0 0 1 8 17) KERNELMOn (raidrecovery 10 1 1 1 8 21) RAID1 conf printout: --- wd:2 rd:2 disk 0, wo:0, o:1, dev:sdb5 disk 1, wo:0, o:1, dev:sda5 KERNELMOn (raidrecovery 10 0 0 1 8 21) KERNELMOn (raidrecovery 1 1 1 1 8 18) RAID1 conf printout: --- wd:2 rd:2 disk 0, wo:0, o:1, dev:sdb2 disk 1, wo:0, o:1, dev:sda2 KERNELMOn (raidrecovery 1 0 0 1 8 18) root@LS-WSGL678:~#リビルドされた。
root@LS-WSGL678:~# mkfs.xfs /dev/sdb6 meta-data=/dev/sdb6 isize=256 agcount=45, agsize=1048576 blks = sectsz=512 data = bsize=4096 blocks=46877662, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=22889, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=65536 blocks=0, rtextents=0 root@LS-WSGL678:~#
root@LS-WSGL678:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/md1 4993920 273524 4720396 5% / /dev/ram1 15360 92 15268 1% /mnt/ram /dev/md0 988064 120628 867436 12% /boot /dev/disk1_6 236216784 279884 235936900 0% /mnt/disk1 /dev/disk2_6 187419092 736 187418356 0% /mnt/disk2 root@LS-WSGL678:~#ちゃんとマウントされ、LED も点滅していない。
こういう方法もあるという事で。
root@LS-WSGL678:~# cat /proc/mdstat Personalities : [raid0] [raid1] md1 : active raid1 sdb2[1] sda2[0] 5004160 blocks [2/2] [UU] md10 : active raid1 sdb5[1] sda5[0] 1003904 blocks [2/2] [UU] md0 : active raid1 sdb1[1] sda1[0] 1003904 blocks [2/2] [UU] unused devices: <none> root@LS-WSGL678:~#無事、リビルドが済んだ。
root@LS-WSGL678:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/md1 4993920 273656 4720264 5% / /dev/ram1 15360 248 15112 2% /mnt/ram /dev/md0 988064 120628 867436 12% /boot /dev/disk1_6 187419092 768 187418324 0% /mnt/disk1 /dev/disk2_6 187419092 736 187418356 0% /mnt/disk2 root@LS-WSGL678:~# ls /mnt/disk1/ spool root@LS-WSGL678:~# ls /mnt/disk2/ root@LS-WSGL678:~#この差は何???作り方の差か
|
← md2, md3 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ RamRoot で立ち上がる initrd |