ここでは、
・HDD3 を USB で接続してパーティションを切り、フォーマット
・SATA1 につないで標準ファームに RAID の情報を書込ませる
ところまで。
BUFFALO INC. LinkStation series LS-WSGL678 login: root root@LS-WSGL678:~#
root@LS-WSGL678:~# tail -f /var/log/messages : : Nov 1 00:04:45 LS-WSGL678 kernel: usb 1-1: new high speed USB device using ehci_platform and address 2 Nov 1 00:04:45 LS-WSGL678 kernel: usb 1-1: configuration #1 chosen from 1 choice Nov 1 00:04:45 LS-WSGL678 kernel: scsi2 : SCSI emulation for USB Mass Storage devices Nov 1 00:04:50 LS-WSGL678 kernel: Vendor: ST325082 Model: 3ND06QAZ Rev: Nov 1 00:04:50 LS-WSGL678 kernel: Type: Direct-Access ANSI SCSI revision: 02 Nov 1 00:04:50 LS-WSGL678 kernel: SCSI device sdc: 488397168 512-byte hdwr sectors (250059 MB) Nov 1 00:04:50 LS-WSGL678 kernel: sdc: Write Protect is off Nov 1 00:04:50 LS-WSGL678 kernel: sdc: assuming drive cache: write through Nov 1 00:04:50 LS-WSGL678 kernel: SCSI device sdc: 488397168 512-byte hdwr sectors (250059 MB) Nov 1 00:04:50 LS-WSGL678 kernel: sdc: Write Protect is off Nov 1 00:04:50 LS-WSGL678 kernel: sdc: assuming drive cache: write through Nov 1 00:04:50 LS-WSGL678 kernel: sdc: sdc1 sdc2 sdc4 < sdc5 sdc6 > Nov 1 00:04:50 LS-WSGL678 kernel: sd 2:0:0:0: Attached scsi disk sdc Nov 1 00:04:50 LS-WSGL678 kernel: sd 2:0:0:0: Attached scsi generic sg2 type 0 Nov 1 00:05:02 LS-WSGL678 kernel: FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive! Nov 1 00:05:02 LS-WSGL678 kernel: FAT: bogus number of reserved sectors Nov 1 00:05:02 LS-WSGL678 kernel: VFS: Can't find a valid FAT filesystem on dev sdc. Nov 1 00:05:02 LS-WSGL678 kernel: kjournald starting. Commit interval 5 seconds Nov 1 00:05:02 LS-WSGL678 kernel: EXT3 FS on sdc1, internal journal Nov 1 00:05:02 LS-WSGL678 kernel: EXT3-fs: mounted filesystem with ordered data mode. Nov 1 00:05:08 LS-WSGL678 proftpd[1393]: LS-WSGL678 - ProFTPD killed (signal 15) Nov 1 00:05:08 LS-WSGL678 proftpd[1393]: LS-WSGL678 - ProFTPD 1.3.0 standalone mode SHUTDOWN Nov 1 00:05:08 LS-WSGL678 kernel: NET: Registered protocol family 5 Nov 1 00:05:12 LS-WSGL678 nmbd[1421]: [2007/11/01 00:05:12, 0] nmbd/nmbd.c:terminate(58) Nov 1 00:05:12 LS-WSGL678 nmbd[1421]: Got SIGTERM: going down... Nov 1 00:05:15 LS-WSGL678 proftpd[3445]: LS-WSGL678 - ProFTPD 1.3.0 (stable) (built Fri Jun 2 20:57:36 JST 2006) standalone mode STARTUP
root@LS-WSGL678:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/md1 4993920 273328 4720592 5% / /dev/ram1 15360 100 15260 1% /mnt/ram /dev/md0 988064 120628 867436 12% /boot /dev/disk1_6 236216784 960 236215824 0% /mnt/disk1 /dev/disk2_6 236216784 279884 235936900 0% /mnt/disk2 /dev/usbdisk1_1 988088 126220 811676 13% /mnt/usbdisk1 root@LS-WSGL678:~# umount /mnt/usbdisk1/ root@LS-WSGL678:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/md1 4993920 273328 4720592 5% / /dev/ram1 15360 96 15264 1% /mnt/ram /dev/md0 988064 120628 867436 12% /boot /dev/disk1_6 236216784 960 236215824 0% /mnt/disk1 /dev/disk2_6 236216784 279884 235936900 0% /mnt/disk2 root@LS-WSGL678:~#
oot@LS-WSGL678:~# fdisk /dev/sdc The number of cylinders for this disk is set to 30401. 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) Command (m for help): p Disk /dev/sdc: 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/sdc1 1 125 1004031 83 Linux /dev/sdc2 126 748 5004247+ 83 Linux /dev/sdc4 749 30401 238187722+ 5 Extended /dev/sdc5 749 873 1004031 83 Linux /dev/sdc6 874 30401 237183628+ 83 Linux Command (m for help):ここで使った HDD は、先日まで実験に使っていた HDD なので、 すでにパーティションがある。
いちから実行するので、パーティションを削除する。
Command (m for help): d Partition number (1-6): 6 Command (m for help): d Partition number (1-5): 5 Command (m for help): d Partition number (1-5): 4 Command (m for help): d Partition number (1-4): 2 Command (m for help): d Selected partition 1 Command (m for help): p Disk /dev/sdc: 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 Command (m for help):新たにパーティションを切る。
種別 | No. | 開始 | 終了 | タイプ |
primary partition | 1 | 1 | 125 | Linux |
primary partition | 2 | 126 | 748 | Linux |
extended | 4 | 749 | 全部 | Extended |
logical | 5 | 749 | 873 | Linux swap |
logical | 6 | 874 | 全部 | Linux |
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-30401, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-30401, default 30401): 125 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (126-30401, default 126): Using default value 126 Last cylinder or +size or +sizeM or +sizeK (126-30401, default 30401): 748 Command (m for help): n Command action e extended p primary partition (1-4) e Partition number (1-4): 4 First cylinder (749-30401, default 749): Using default value 749 Last cylinder or +size or +sizeM or +sizeK (749-30401, default 30401): Using default value 30401 Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l First cylinder (749-30401, default 749): Using default value 749 Last cylinder or +size or +sizeM or +sizeK (749-30401, default 30401): 873 Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l First cylinder (874-30401, default 874): Using default value 874 Last cylinder or +size or +sizeM or +sizeK (874-30401, default 30401): Using default value 30401 Command (m for help): t Partition number (1-6): 5 Hex code (type L to list codes): 82 Changed system type of partition 5 to 82 (Linux swap) Command (m for help): p Disk /dev/sdc: 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/sdc1 1 125 1004031 83 Linux /dev/sdc2 126 748 5004247+ 83 Linux /dev/sdc4 749 30401 238187722+ 5 Extended /dev/sdc5 749 873 1004031 82 Linux swap /dev/sdc6 874 30401 237183628+ 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. root@LS-WSGL678:~#
パーティション | ファイルシステム |
/dev/sdc1 | ext3 |
/dev/sdc2 | xfs |
/dev/sdc5 | swap |
/dev/sdc6 | xfs |
root@LS-WSGL678:~# mkfs.ext3 /dev/sdc1 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 34 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-WSGL678:~#ちゃんと、スーパーブロックを書く旨のメッセージが出てるやん。
root@LS-WSGL678:~# mkfs.xfs /dev/sdc2 mkfs.xfs: /dev/sdc2 appears to contain an existing filesystem (xfs). mkfs.xfs: Use the -f option to force overwrite. root@LS-WSGL678:~#パーティションを切り直しているのに、 既にファイルシステムがあると見なされる場合がある。
root@LS-WSGL678:~# mkfs.ext3 /dev/sdc2 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 27 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-WSGL678:~# mkfs.xfs -f /dev/sdc2 meta-data=/dev/sdc2 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:~#
root@LS-WSGL678:~# mkswap /dev/sdc5 Setting up swapspace version 1, size = 1028120576 bytes root@LS-WSGL678:~#
root@LS-WSGL678:~# mkfs.ext3 /dev/sdc6 mke2fs 1.27 (8-Mar-2002) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 29655040 inodes, 59295907 blocks 2964795 blocks (5.00%) reserved for the super user First data block=0 1810 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 23 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-WSGL678:~# mkfs.xfs -f /dev/sdc6 meta-data=/dev/sdc6 isize=256 agcount=57, agsize=1048576 blks = sectsz=512 data = bsize=4096 blocks=59295907, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=28953, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=65536 blocks=0, rtextents=0 root@LS-WSGL678:~#
シリアルコンソールがなくても実行できるが、 シリアルコンソールへの出力を眺めていた方が精神衛生上良い。
root@LS-WSGL678:~# cat /proc/mdstat Personalities : [raid0] [raid1] md1 : active raid1 sdb2[2] sda2[0] 5004160 blocks [2/1] [U_] [========>............] recovery = 41.6% (2083968/5004160) finish=1.3min speed=36949K/sec md10 : active raid1 sda5[0] sdb5[1] 1003904 blocks [2/2] [UU] md0 : active raid1 sdb1[1] sda1[0] 1003904 blocks [2/2] [UU] unused devices:リビルドが完了すれば、以下のようになる。root@LS-WSGL678:~#
root@LS-WSGL678:~# cat /proc/mdstat Personalities : [raid0] [raid1] md1 : active raid1 sdb2[1] sda2[0] 5004160 blocks [2/2] [UU] md10 : active raid1 sda5[0] sdb5[1] 1003904 blocks [2/2] [UU] md0 : active raid1 sdb1[1] sda1[0] 1003904 blocks [2/2] [UU] unused devices:ここまでくれば問題なし。root@LS-WSGL678:~#
|
← 関西オープンソース2008 / 関西コミュニティ大決戦 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ debian 化(4)debian の展開 |