HD-HGLAN に複数 USB HDD


玄箱/HG に複数の USB HDD を接続して玉砕したのだが、、
TeraStation のページには、 「USB外付ハードディスク、TVチューナーBOXは最大4台、 USB対応プリンタは最大1台まで接続可能。」とある。

TeraStation と同じソースをベースにしたカーネルを使っている HD-HGLAN 1.41 なら、複数の USB HDD もOKなのでは?

おっと、HD-HGLAN の旧ファームでも 玄箱/HG と同じくダメだったのか見てないや。トホホ

複数 USB HDD の接続

この間玄箱/HG 用に用意した FUJITSU MPD3064AT(6.5GB) + GW3.5KH-U2 を HD-HGLAN に接続し、 mkfs した。
[root@giga /root]# mkfs -j /dev/sda1
mke2fs 1.29 (24-Sep-2002)
warning: 223 blocks unused.

Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
787968 inodes, 1572864 blocks
78654 blocks (5.00%) reserved for the super user
First data block=0
48 block groups
32768 blocks per group, 32768 fragments per group
16416 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 24 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@giga /root]# mkfs -j /dev/sdb1
mke2fs 1.29 (24-Sep-2002)
warning: 223 blocks unused.

Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
787968 inodes, 1572864 blocks
78654 blocks (5.00%) reserved for the super user
First data block=0
48 block groups
32768 blocks per group, 32768 fragments per group
16416 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 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@giga /root]#

複数 USB HDD のマウント

マウントポイントを作成し、マウント
[root@giga /root]# mkdir /mnt/sda1
[root@giga /root]# mount /dev/sda1 /mnt/sda1
[root@giga /root]# mkdir /mnt/sdb1
[root@giga /root]# mount /dev/sdb1 /mnt/sdb1
[root@giga /root]# df
ファイルシステム    1k-ブロック   使用中      空き 使用% マウント場所
/dev/hda1              2071384    608956   1357204  31% /
/dev/hda3            113069188  60840508  46485044  57% /mnt
/dev/sda1              6192512     32828   5845068   1% /mnt/sda1
/dev/sdb1              6192512     32828   5845068   1% /mnt/sdb1
[root@giga /root]#

sda1 に書き込み

この間と同じように sda1 に書き込んでみた。
[root@giga /root]# (cd /; tar cf - usr)|(cd /mnt/sda1; tar xvf -)
usr/
usr/doc/
usr/doc/setup-2.5.7/
usr/doc/setup-2.5.7/uidgid
	:
	:
usr/libexec/filters/pclbanner
usr/libexec/filters/psbanner
[root@giga /root]#
umount して fsck してみる
[root@giga /root]# umount /mnt/sda1/
[root@giga /root]# fsck -f -y /dev/sda1
fsck 1.29 (24-Sep-2002)
e2fsck 1.29 (24-Sep-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Optimizing directories:  131492 328526 377763 492637 542134 575046 591201 706286 722799
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda1: 25559/787968 files (0.1% non-contiguous), 139350/1572864 blocks
[root@giga /root]# mount /dev/sda1 /mnt/sda1
問題なし

sdb1 に書き込み

同様に、sdb1 にも書き込んでみる
[root@giga /root]# (cd /; tar cf - usr)|(cd /mnt/sdb1; tar xvf -)
usr/
usr/doc/
usr/doc/setup-2.5.7/
usr/doc/setup-2.5.7/uidgid
usr/doc/glibc-2.2.4/
usr/doc/glibc-2.2.4/BUGS
	:
	:
usr/libexec/filters/lpf
usr/libexec/filters/pclbanner
usr/libexec/filters/psbanner
[root@giga /root]# umount /mnt/sdb1
[root@giga /root]# fsck -f -y /dev/sdb1
fsck 1.29 (24-Sep-2002)
e2fsck 1.29 (24-Sep-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Optimizing directories:  131492 328526 377763 492637 542134 575046 591201 706286 722799
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sdb1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sdb1: 25559/787968 files (0.1% non-contiguous), 139350/1572864 blocks
[root@giga /root]# mount /dev/sdb1 /mnt/sdb1
[root@giga /root]#
ここまでは玄箱/HG と同じく問題なし。

sda1 から sdb1 へファイルコピー

ここからが問題の複数ドライブへの同時アクセス。
[root@giga /root]# mkdir /mnt/sdb1/x
[root@giga /root]# (cd /mnt/sda1/; tar cf - usr)|(cd /mnt/sdb1/x/;tar xvf -)
usr/
usr/doc/
usr/doc/setup-2.5.7/
usr/doc/setup-2.5.7/uidgid
	:
	:
usr/libexec/filters/lpf
usr/libexec/filters/pclbanner
usr/libexec/filters/psbanner
[root@giga /root]#
fsck してみる
玄箱/HG ではことごとく fsck に引っ掛かったのだが。
ちょっと期待しつつ fsck してみる
[root@giga /root]# umount /mnt/sda1/
[root@giga /root]# fsck -f -y /dev/sda1
fsck 1.29 (24-Sep-2002)
e2fsck 1.29 (24-Sep-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Problem in HTREE directory inode 542134 (/usr/src/linux-2.4.22/include/linux/modules): bad block number 25433.
Clear HTree index? yes

Problem in HTREE directory inode 575046 (/usr/src/linux-2.4.22/include/linux/modules-up): bad block number 25433.
Clear HTree index? yes

Problem in HTREE directory inode 591201 (/usr/share/man/man3): bad block number 25433.
Clear HTree index? yes

Problem in HTREE directory inode 722799 (/usr/src/linux-2.4.22/include/linux/modules-smp): bad block number 25433.
Clear HTree index? yes

Problem in HTREE directory inode 131492: node (0) referenced twice
Problem in HTREE directory inode 131492: node (1) has bad max hash
Problem in HTREE directory inode 131492: node (1) not referenced
Problem in HTREE directory inode 131492: node (2) has bad max hash
Problem in HTREE directory inode 131492: node (2) not referenced
Problem in HTREE directory inode 131492: node (3) has bad max hash
Problem in HTREE directory inode 131492: node (3) not referenced
Invalid HTREE directory inode 131492 (/usr/lib/python1.5).  Clear? yes
	:
	:
Problem in HTREE directory inode 706286: node (3) not referenced
Invalid HTREE directory inode 706286 (/usr/src/linux-2.4.22/include/linux).  Clear? yes

Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Optimizing directories:  131492 328526 377763 492637 542134 575046 591201 706286 722799
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda1: 25559/787968 files (0.1% non-contiguous), 139350/1572864 blocks
[root@giga /root]#
あかんやん


HD-HGLAN ファームウェア 1.41
ハックの記録
LinkStation/玄箱 をハックしよう

HD-HGLAN ファームウェア 1.41(2)電源が落ちない

Copyright (C) 2005 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市