USB に接続した sdc で
sdc1 から md2、
sdc2 から md3、
(sdc5 から md11、)
を構成し、中身(=ハックキット)を入れてから、
sda につなぎ直し、
sda1 から md0、
sda2 から md1、
sda5 から md10、
が構成できるのではないかと考えた。
まず手始めに、標準ファームを株分けした ST3250 を USB で接続して 確認する。
Nov 1 00:41:24 LS-WSGL678 kernel: usb 1-1: new high speed USB device using ehci_platform and address 2 Nov 1 00:41:24 LS-WSGL678 kernel: usb 1-1: configuration #1 chosen from 1 choice Nov 1 00:41:24 LS-WSGL678 kernel: scsi2 : SCSI emulation for USB Mass Storage devices Nov 1 00:41:29 LS-WSGL678 kernel: Vendor: ST325082 Model: 3ND06QAZ Rev: Nov 1 00:41:29 LS-WSGL678 kernel: Type: Direct-Access ANSI SCSI revision: 02 Nov 1 00:41:29 LS-WSGL678 kernel: SCSI device sdc: 488397168 512-byte hdwr sectors (250059 MB) Nov 1 00:41:29 LS-WSGL678 kernel: sdc: Write Protect is off Nov 1 00:41:29 LS-WSGL678 kernel: sdc: assuming drive cache: write through Nov 1 00:41:29 LS-WSGL678 kernel: SCSI device sdc: 488397168 512-byte hdwr sectors (250059 MB) Nov 1 00:41:29 LS-WSGL678 kernel: sdc: Write Protect is off Nov 1 00:41:29 LS-WSGL678 kernel: sdc: assuming drive cache: write through Nov 1 00:41:29 LS-WSGL678 kernel: sdc: sdc1 sdc2 sdc4 < sdc5 sdc6 > Nov 1 00:41:29 LS-WSGL678 kernel: sd 2:0:0:0: Attached scsi disk sdc Nov 1 00:41:29 LS-WSGL678 kernel: sd 2:0:0:0: Attached scsi generic sg2 type 0
root@LS-WSGL678:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/md1 4993920 273660 4720260 5% / /dev/ram1 15360 208 15152 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 988064 120780 867284 12% /mnt/usbdisk1 root@LS-WSGL678:~# umount /mnt/usbdisk1 /sbin/hotplug [block] root@LS-WSGL678:~#
root@LS-WSGL678:~# mount /dev/sdc2 /tmp/root XFS: Filesystem sdc2 has duplicate UUID - can't mount /sbin/hotplug [block] mount: wrong fs type, bad option, bad superblock on /dev/sdc2, or too many mounted file systems root@LS-WSGL678:~# mount /dev/sdc1 /tmp/root root@LS-WSGL678:~# umount /tmp/root root@LS-WSGL678:~#これまでの実積通り。
root@LS-WSGL678:~# ls -l /dev/md* brwxr-xr-x 1 root root 9, 0 Jul 22 2008 /dev/md0 brwxr-xr-x 1 root root 9, 1 Jul 22 2008 /dev/md1 brwxr-xr-x 1 root root 9, 10 Jul 22 2008 /dev/md10 brwxr-xr-x 1 root root 9, 11 Jul 22 2008 /dev/md11 brwxr-xr-x 1 root root 9, 12 Jul 22 2008 /dev/md12 brwxr-xr-x 1 root root 9, 13 Jul 22 2008 /dev/md13 brwxr-xr-x 1 root root 9, 14 Jul 22 2008 /dev/md14 brwxr-xr-x 1 root root 9, 15 Jul 22 2008 /dev/md15 brwxr-xr-x 1 root root 9, 2 Jul 22 2008 /dev/md2 brwxr-xr-x 1 root root 9, 3 Jul 22 2008 /dev/md3 brwxr-xr-x 1 root root 9, 4 Jul 22 2008 /dev/md4 brwxr-xr-x 1 root root 9, 5 Jul 22 2008 /dev/md5 brwxr-xr-x 1 root root 9, 6 Jul 22 2008 /dev/md6 brwxr-xr-x 1 root root 9, 7 Jul 22 2008 /dev/md7 brwxr-xr-x 1 root root 9, 8 Jul 22 2008 /dev/md8 brwxr-xr-x 1 root root 9, 9 Jul 22 2008 /dev/md9 root@LS-WSGL678:~#ある。
root@LS-WSGL678:~# mdadm -C /dev/md2 -l1 -n2 /dev/sdc1 missing mdadm: /dev/sdc1 appears to contain an ext2fs file system size=1003904K mtime=Thu Nov 1 00:41:40 2007 mdadm: /dev/sdc1 appears to be part of a raid array: level=raid1 devices=2 ctime=Thu Jun 19 16:33:50 2008 Continue creating array? y md: md2: raid array is not clean -- starting background reconstruction mdadm: array /dev/md2 started. root@LS-WSGL678:~# cat /proc/mdstat Personalities : [raid0] [raid1] md2 : active raid1 sdc1[0] 1003904 blocks [2/1] [U_] 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:~#
root@LS-WSGL678:~# mount /dev/md2 /tmp/root /sbin/hotplug [block] root@LS-WSGL678:~# ls /tmp/root conf_save.tgz initrd.buffalo.orig conf_save.tgz.orig initrd.gz hddrootfs.buffalo.updated.done log.tgz initrd.buffalo uImage.buffalo root@LS-WSGL678:~# umount /tmp/root /sbin/hotplug [block] root@LS-WSGL678:~#みえた。
root@LS-WSGL678:~# mdadm -C /dev/md3 -l1 -n2 /dev/sdc2 missing mdadm: /dev/sdc2 appears to be part of a raid array: level=raid1 devices=2 ctime=Thu Jun 19 16:33:51 2008 Continue creating array? y md: md3: raid array is not clean -- starting background reconstruction mdadm: array /dev/md3 started. root@LS-WSGL678:~# cat /proc/mdstat Personalities : [raid0] [raid1] md3 : active raid1 sdc2[0] 5004160 blocks [2/1] [U_] md2 : active raid1 sdc1[0] 1003904 blocks [2/1] [U_] 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:~#
root@LS-WSGL678:~# mount /dev/md3 /tmp/root XFS: Filesystem md3 has duplicate UUID - can't mount /sbin/hotplug [block] mount: wrong fs type, bad option, bad superblock on /dev/md3, or too many mounted file systems root@LS-WSGL678:~#あかんやん。
でも、duplicate UUID - can't mount ということは、、、
oot@LS-WSGL678:~# mkfs.ext3 -j /dev/md3 mke2fs 1.27 (8-Mar-2002) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 626496 inodes, 1251040 blocks 62552 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 25 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-WSGL678:~# mkfs.xfs /dev/md3 mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs). mkfs.xfs: Use the -f option to force overwrite. root@LS-WSGL678:~# mkfs.xfs -f /dev/md3 meta-data=/dev/md3 isize=256 agcount=8, agsize=156380 blks = sectsz=512 data = bsize=4096 blocks=1251040, 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:~# !mount mount /dev/md3 /tmp/root XFS mounting filesystem md3 /sbin/hotplug [block] root@LS-WSGL678:~# ls /tmp/root root@LS-WSGL678:~#できた。
root@LS-WSGL678:~# ls / bin etc lib modules root tmp www boot home libexec proc sbin usr dev initrd mnt pwrmgrlog sys var root@LS-WSGL678:~#mnt, proc, tmp 以外をコピーする。
root@LS-WSGL678:~# (cd / ; tar cf - bin boot dev etc home initrd lib libexec modues root sbin sys usr var www)|(cd /tmp/root; tar xvf -) : :mnt, proc, tmp を作る。
root@LS-WSGL678:~# ls -ld /proc dr-xr-xr-x 77 root root 0 Jan 1 1970 /proc root@LS-WSGL678:~# mkdir /tmp/root/proc root@LS-WSGL678:~# chmod 555 !$ chmod 555 /tmp/root/proc root@LS-WSGL678:~# ls -ld /tmp lrwxrwxrwx 1 root root 8 Nov 1 00:36 /tmp -> /mnt/ram root@LS-WSGL678:~# ln -s /mnt/ram /tmp/root/tmp root@LS-WSGL678:~# ls -ld /tmp/root/tmp lrwxrwxrwx 1 root root 8 Nov 1 01:11 /tmp/root/tmp -> /mnt/ram root@LS-WSGL678:~# ls -ld /mnt drwxrwxrwx 11 root root 126 Nov 1 00:36 /mnt root@LS-WSGL678:~# mkdir /tmp/root/mnt root@LS-WSGL678:~# chmod 777 /tmp/root root@LS-WSGL678:~# cd /tmp/root/mnt root@LS-WSGL678:/tmp/root/mnt# ls -l /mnt drwxr-xr-x 3 root root 18 Nov 1 00:01 array1 drwxrwxrwx 2 root root 6 Nov 1 2007 authtest drwxrwxrwx 3 root root 18 Nov 1 01:03 disk1 drwxrwxrwx 4 root root 30 Mar 2 2008 disk2 drwxr-xr-x 4 root root 35 Jul 22 2008 info drwxrwxrwx 2 root root 6 Nov 1 2007 msdfs_root drwxrwxrwt 4 root root 340 Nov 1 00:46 ram drwxr-xr-x 2 root root 6 Jul 22 2008 usbdisk1 drwxr-xr-x 2 root root 6 Jul 22 2008 usbdisk2 root@LS-WSGL678:/tmp/root/mnt# ls /mnt array1 disk1 info ram usbdisk2 authtest disk2 msdfs_root usbdisk1 root@LS-WSGL678:/tmp/root/mnt# mkdir `!!` mkdir `ls /mnt` root@LS-WSGL678:/tmp/root/mnt# ls array1 disk1 info ram usbdisk2 authtest disk2 msdfs_root usbdisk1 root@LS-WSGL678:/tmp/root/mnt# chmod 777 authtest disk? msdfs_root root@LS-WSGL678:/tmp/root/mnt# chmod 755 array1 info/ usbdisk? root@LS-WSGL678:/tmp/root/mnt# chmod 1777 ram root@LS-WSGL678:/tmp/root/mnt#目印として、/tmp/root/md3 も作っておく
root@LS-WSGL678:/tmp/root/mnt# touch /tmp/root/md3 root@LS-WSGL678:/tmp/root/mnt#
: : ---- in linuxrc --- Thu Nov 1 01:20:54 JST 2007 CheckDevices linuxrc:choose operation (timeout 4[s]) 1:RamRoot other:HddRoot ? -HddRoot- -- rebuild mdadm.conf for BOOT, ROOTFS -- md: md10 stopped. mdadm: /dev/diskmd: md3 stopped. 1_1 has wrong uuid. mdadm: no devices found for /dev/md10 mdadmd: md2 stopped. m: /dev/disk1_1 has wrong uuid. mdadm: no devices found for /dev/md3 md: bindmd1 が認識されず、代りに md3 が認識されたためか、 EM モードで立ち上がってきた。raid1: raid set md2 active with 1 out of 2 mirrors mdadm: /dev/md2 has been started with 1 drive (out of 2). -- setup max error counts -- /sys/block/md0/md/maxerr_cnt is setted to -1 Starting :fsck_disks(boot) ... [Failed. ] Starting :fsck_disks(rootfs) ... [Success.] Starting :mount(boot) ... [Failed. ] -- rebuild mdadm.conf for BOOT, ROOTFS -- md: md10 stopped. mdadm: cannot open device /dev/disk1_1: Device or resource busy mdadm: /dev/disk1_1 has wrong uuid. mdadm: /dev/disk1_2 has wrmd: bind ong uuid. raid1: raid set md10 active with 1 out of 2 mirrors mdadm: /dev/md10md: md3 stopped. has been started with 1 drive (out of 2). md: bind raid1: raid set md3 active with 1 out of 2 mirrors mdadm: /dev/md3 has been started with 1 drive (out of 2). -- setup max error counts -- /sys/block/md0/md/maxerr_cnt is setted to -1 /sys/block/md1/md/maxerr_cnt is setted to -1 /sys/block/md10/md/maxerr_cnt is setted to -1 /dev/md1: Invalid argument mount: you must specify the filesystem type /dev/md1: Invalid argument mount: you must specify the filesystem type md: md0 stopped. mdadm: stopped /md: md1 stopped. dev/md0 mdadm: stopped /md: md10 stopped. dev/md1 md: unbind md: export_rdev(sda5) mdadm: stopped /dev/md10 : : BUFFALO INC. LinkStation series LS-WSGL-EM678 login:
この方法もあかんか。
シリアルコンソールなしにハックキットのインストールはできないのか???
|
← RamRoot に telnet |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ Maxtor Diamod max 10 6L200 ×2 |