それなら既にアレーに使った HDD を使っても
標準ファームの力を借りずに自力で RAID 構築の実験ができる。
というわけで、Maxtor 6Y160M0 を初期化し、
2台目の HDD として RAID に追加してみる。
Nov 1 00:02:31 LS-WSGL678 kernel: usb 1-1: new high speed USB device using ehci_platform and address 2 Nov 1 00:02:31 LS-WSGL678 kernel: usb 1-1: configuration #1 chosen from 1 choice Nov 1 00:02:31 LS-WSGL678 kernel: scsi2 : SCSI emulation for USB Mass Storage devices Nov 1 00:02:36 LS-WSGL678 kernel: Vendor: Maxtor 6 Model: J6QE Rev: 11W0 Nov 1 00:02:36 LS-WSGL678 kernel: Type: Direct-Access ANSI SCSI revision: 02 Nov 1 00:02:36 LS-WSGL678 kernel: SCSI device sdb: 320173056 512-byte hdwr sectors (163929 MB) Nov 1 00:02:36 LS-WSGL678 kernel: sdb: Write Protect is off Nov 1 00:02:36 LS-WSGL678 kernel: sdb: assuming drive cache: write through Nov 1 00:02:36 LS-WSGL678 kernel: SCSI device sdb: 320173056 512-byte hdwr sectors (163929 MB) Nov 1 00:02:36 LS-WSGL678 kernel: sdb: Write Protect is off Nov 1 00:02:36 LS-WSGL678 kernel: sdb: assuming drive cache: write through Nov 1 00:02:37 LS-WSGL678 kernel: sdb: sdb1 sdb2 sdb4 < sdb5 sdb6 > Nov 1 00:02:37 LS-WSGL678 kernel: sd 2:0:0:0: Attached scsi disk sdb Nov 1 00:02:37 LS-WSGL678 kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0無事 sdb として認識された。
root@LS-WSGL678:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/md1 4993920 273788 4720132 5% / /dev/ram1 15360 104 15256 1% /mnt/ram /dev/md0 988088 126088 811808 13% /boot /dev/disk1_6 237067816 960 237066856 0% /mnt/disk1 /dev/usbdisk1_1 988064 109808 878256 11% /mnt/usbdisk1 root@LS-WSGL678:~# ls /mnt/usbdisk1 SATA1 initrd.buffalo conf_save.tgz log.tgz conf_save.tgz.orig uImage.buffalo hddrootfs.buffalo.updated.done root@LS-WSGL678:~#sdb1 が /mnt/usbdisk1 に自動的にマウントされるので、 アンマウントする。
root@LS-WSGL678:~# umount /mnt/usbdisk1 /sbin/hotplug [block] root@LS-WSGL678:~#たまにはファンクションボタンを押してやってもいいかな。
root@LS-WSGL678:~# mdadm -E /dev/sdb1 /dev/sdb2 /dev/sdb5 /dev/sdb6 /dev/sdb1: Magic : a92b4efc Version : 00.90.00 UUID : adbe578f:b86ab25a:09937ff0:e2de4343 Creation Time : Thu Jun 19 16:33:50 2008 Raid Level : raid1 Device Size : 1003904 (980.54 MiB 1028.00 MB) Array Size : 1003904 (980.54 MiB 1028.00 MB) Raid Devices : 2 Total Devices : 2 Preferred Minor : 0 Update Time : Thu Nov 1 02:09:42 2007 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Checksum : 8b583c0c - correct Events : 0.1412 Number Major Minor RaidDevice State this 1 8 17 1 active sync /dev/sdb1 0 0 8 1 0 active sync /dev/sda1 1 1 8 17 1 active sync /dev/sdb1 /dev/sdb2: Magic : a92b4efc Version : 00.90.00 UUID : db218435:100e25e7:d2ba170f:d67ec206 Creation Time : Thu Jun 19 16:33:51 2008 Raid Level : raid1 Device Size : 5004160 (4.77 GiB 5.12 GB) Array Size : 5004160 (4.77 GiB 5.12 GB) Raid Devices : 2 Total Devices : 2 Preferred Minor : 1 Update Time : Thu Nov 1 02:09:43 2007 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Checksum : cd63817b - correct Events : 0.18478 Number Major Minor RaidDevice State this 1 8 18 1 active sync /dev/sdb2 0 0 8 2 0 active sync /dev/sda2 1 1 8 18 1 active sync /dev/sdb2 /dev/sdb5: Magic : a92b4efc Version : 00.90.00 UUID : ba25aab6:f1bb3eab:c75c26a7:a754b72a Creation Time : Thu Jun 19 16:33:54 2008 Raid Level : raid1 Device Size : 1003904 (980.54 MiB 1028.00 MB) Array Size : 1003904 (980.54 MiB 1028.00 MB) Raid Devices : 2 Total Devices : 2 Preferred Minor : 10 Update Time : Thu Nov 1 01:14:10 2007 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Checksum : 534f1e7d - correct Events : 0.38 Number Major Minor RaidDevice State this 1 8 21 1 active sync /dev/sdb5 0 0 8 5 0 active sync /dev/sda5 1 1 8 21 1 active sync /dev/sdb5 mdadm: No md superblock detected on /dev/sdb6. root@LS-WSGL678:~#
sdb1 は ext3
root@LS-WSGL678:~# mke2fs -j /dev/sdb1 mke2fs 1.27 (8-Mar-2002) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 125696 inodes, 251007 blocks 12550 blocks (5.00%) reserved for the super user First data block=0 8 block groups 32768 blocks per group, 32768 fragments per group 15712 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 36 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-WSGL678:~#sdb2 は xfs
root@LS-WSGL678:~# mkfs.xfs /dev/sdb2 mkfs.xfs: /dev/sdb2 appears to contain an existing filesystem (xfs). mkfs.xfs: Use the -f option to force overwrite. root@LS-WSGL678:~# mkfs.xfs -f /dev/sdb2 meta-data=/dev/sdb2 isize=256 agcount=8, agsize=156383 blks = sectsz=512 data = bsize=4096 blocks=1251061, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=2560, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=65536 blocks=0, rtextents=0 root@LS-WSGL678:~#sdb5 は swap
root@LS-WSGL678:~# mkswap /dev/sdb5 Setting up swapspace version 1, size = 1028120576 bytes root@LS-WSGL678:~#sdb6 は念のため、xfs
root@LS-WSGL678:~# mkfs.xfs -f /dev/sdb6 meta-data=/dev/sdb6 isize=256 agcount=37, agsize=1048576 blks = sectsz=512 data = bsize=4096 blocks=38266822, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=18684, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=65536 blocks=0, rtextents=0 root@LS-WSGL678:~#
root@LS-WSGL678:~# mdadm -E /dev/sdb1 /dev/sdb2 /dev/sdb5 /dev/sdb6 mdadm: No md superblock detected on /dev/sdb1. /dev/sdb2: Magic : a92b4efc Version : 00.90.00 UUID : db218435:100e25e7:d2ba170f:d67ec206 Creation Time : Thu Jun 19 16:33:51 2008 Raid Level : raid1 Device Size : 5004160 (4.77 GiB 5.12 GB) Array Size : 5004160 (4.77 GiB 5.12 GB) Raid Devices : 2 Total Devices : 2 Preferred Minor : 1 Update Time : Thu Nov 1 02:09:43 2007 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Checksum : cd63817b - correct Events : 0.18478 Number Major Minor RaidDevice State this 1 8 18 1 active sync /dev/sdb2 0 0 8 2 0 active sync /dev/sda2 1 1 8 18 1 active sync /dev/sdb2 /dev/sdb5: Magic : a92b4efc Version : 00.90.00 UUID : ba25aab6:f1bb3eab:c75c26a7:a754b72a Creation Time : Thu Jun 19 16:33:54 2008 Raid Level : raid1 Device Size : 1003904 (980.54 MiB 1028.00 MB) Array Size : 1003904 (980.54 MiB 1028.00 MB) Raid Devices : 2 Total Devices : 2 Preferred Minor : 10 Update Time : Thu Nov 1 01:14:10 2007 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Checksum : 534f1e7d - correct Events : 0.38 Number Major Minor RaidDevice State this 1 8 21 1 active sync /dev/sdb5 0 0 8 5 0 active sync /dev/sda5 1 1 8 21 1 active sync /dev/sdb5 mdadm: No md superblock detected on /dev/sdb6. root@LS-WSGL678:~#あかん、sdb1 は消えたが、sdb2, sdb5 は消えてへん。
やっぱり mkfs.xfs は手抜き?
root@LS-WSGL678:~# mke2fs -j /dev/sdb2 mke2fs 1.27 (8-Mar-2002) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 626496 inodes, 1251061 blocks 62553 blocks (5.00%) reserved for the super user First data block=0 39 block groups 32768 blocks per group, 32768 fragments per group 16064 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 35 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-WSGL678:~# mdadm -E /dev/sdb2 mdadm: No md superblock detected on /dev/sdb2. root@LS-WSGL678:~#消えた。xfs にフォーマットする。
root@LS-WSGL678:~# mkfs.xfs -f /dev/sdb2 meta-data=/dev/sdb2 isize=256 agcount=8, agsize=156383 blks = sectsz=512 data = bsize=4096 blocks=1251061, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=2560, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=65536 blocks=0, rtextents=0 root@LS-WSGL678:~# mdadm -E /dev/sdb2 mdadm: No md superblock detected on /dev/sdb2. root@LS-WSGL678:~#sdb5 も同様に。
root@LS-WSGL678:~# mke2fs -j /dev/sdb5 mke2fs 1.27 (8-Mar-2002) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 125696 inodes, 251007 blocks 12550 blocks (5.00%) reserved for the super user First data block=0 8 block groups 32768 blocks per group, 32768 fragments per group 15712 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 39 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-WSGL678:~# mkfs.xfs -f /dev/sdb5 meta-data=/dev/sdb5 isize=256 agcount=8, agsize=31376 blks = sectsz=512 data = bsize=4096 blocks=251007, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=1200, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=65536 blocks=0, rtextents=0 root@LS-WSGL678:~# mdadm -E /dev/sdb1 /dev/sdb2 /dev/sdb5 /dev/sdb6 mdadm: No md superblock detected on /dev/sdb1. mdadm: No md superblock detected on /dev/sdb2. mdadm: No md superblock detected on /dev/sdb5. mdadm: No md superblock detected on /dev/sdb6. root@LS-WSGL678:~#ようやくスーパーブロックに何も書かれていない HDD ができあがった。
続きは運動会の後
|
← LS-CL には Web 設定がある |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ やっぱりプレスリリースされていない LS-CL |