不安になったので、新品の HDD を買ってきて換装することにした。
買ってきたのは、Western Digital の WD15EARS。
本当は、2TB のが欲しかったのだが、
洪水の影響でえらく値段が高かったので、
1.5TB ので我慢することにした。
sil:~# tail -f /var/log/messages : : Oct 20 21:25:42 sil kernel: usb 2-1.4: new high speed USB device using ehci_platform and address 9 Oct 20 21:25:43 sil kernel: usb 2-1.4: configuration #1 chosen from 1 choice Oct 20 21:25:43 sil kernel: scsi2 : SCSI emulation for USB Mass Storage devices Oct 20 21:25:48 sil kernel: Vendor: ViPowER Model: VP-89118(SD1) Rev: 2.10 Oct 20 21:25:48 sil kernel: Type: Direct-Access ANSI SCSI revision: 04 Oct 20 21:25:48 sil kernel: SCSI device sdb: 2930277168 512-byte hdwr sectors (1500302 MB) Oct 20 21:25:48 sil kernel: sdb: Write Protect is off Oct 20 21:25:48 sil kernel: SCSI device sdb: 2930277168 512-byte hdwr sectors (1500302 MB) Oct 20 21:25:48 sil kernel: sdb: Write Protect is off Oct 20 21:25:48 sil kernel: sdb: unknown partition table Oct 20 21:25:48 sil kernel: sd 2:0:0:0: Attached scsi disk sdb Oct 20 21:25:48 sil kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
sil:~# fdisk -l /dev/sda Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 1 25 200781 83 Linux /dev/sda2 26 524 4008217+ 83 Linux /dev/sda3 525 556 257040 82 Linux swap / Solaris /dev/sda4 557 121601 972293962+ 83 Linux sil:~#あれ? HS-DHGL って、gpt やなかったっんや
sdb にも同じようにパーティションを切る
sil:~# fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x630b3e58. 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 182401. 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) Command (m for help): p Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes 255 heads, 63 sectors/track, 182401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x630b3e58 Device Boot Start End Blocks Id System Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-182401, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-182401, default 182401): 25 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (26-182401, default 26): Using default value 26 Last cylinder or +size or +sizeM or +sizeK (26-182401, default 182401): 524 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 3 First cylinder (525-182401, default 525): Using default value 525 Last cylinder or +size or +sizeM or +sizeK (525-182401, default 182401): 556 Command (m for help): n Command action e extended p primary partition (1-4) p Selected partition 4 First cylinder (557-182401, default 557): Using default value 557 Last cylinder or +size or +sizeM or +sizeK (557-182401, default 182401): Using default value 182401 Command (m for help): t Partition number (1-4): 3 Hex code (type L to list codes): 82 Changed system type of partition 3 to 82 (Linux swap / Solaris) Command (m for help): p Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes 255 heads, 63 sectors/track, 182401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x630b3e58 Device Boot Start End Blocks Id System /dev/sdb1 1 25 200781 83 Linux /dev/sdb2 26 524 4008217+ 83 Linux /dev/sdb3 525 556 257040 82 Linux swap / Solaris /dev/sdb4 557 182401 1460669962+ 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. sil:~#
sil:~# mount /dev/sda2 on / type xfs (rw,noatime) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) /dev/root.old on /initrd type ext2 (rw,nogrpid) /dev/sda1 on /boot type ext3 (rw,noatime) /dev/sda4 on /mnt type xfs (rw,noatime) sil:~#sda1 が ext3、
同じようにフォーマットする。
sil:~# mkfs -j /dev/sdb1 mke2fs 1.41.3 (12-Oct-2008) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 50200 inodes, 200780 blocks 10039 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 25 block groups 8192 blocks per group, 8192 fragments per group 2008 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Creating journal (4096 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. sil:~# mkfs.xfs /dev/sdb2 meta-data=/dev/sdb2 isize=256 agcount=4, agsize=250514 blks = sectsz=512 attr=2 data = bsize=4096 blocks=1002054, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 sil:~# mkswap /dev/sdb3 Setting up swapspace version 1, size = 263204 kB no label, UUID=712d59a7-e6f6-4b8e-b30a-e10f0561cab6 sil:~# mkfs.xfs /dev/sdb4 meta-data=/dev/sdb4 isize=256 agcount=4, agsize=91291873 blks = sectsz=512 attr=2 data = bsize=4096 blocks=365167490, imaxpct=5 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=32768, version=2 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 sil:~#
sil:~# mkdir /tmp/root sil:~# mount /dev/sdb2 /tmp/root sil:~# mkdir /tmp/root/boot sil:~# mount /dev/sdb1 /tmp/root/boot sil:~# mkdir /tmp/root/mnt sil:~# mount /dev/sdb4 /tmp/root/mnt mount: Unknown error 990 sil:~#ん?
sil:~# !tail tail -f /var/log/messages : : Oct 20 21:37:21 sil kernel: XFS mounting filesystem sdb4 Oct 20 21:37:22 sil kernel: XFS: failed to read root inode謎。
もう一回、フォーマットをやり直し
sil:~# mkfs.xfs /dev/sdb4 mkfs.xfs: /dev/sdb4 appears to contain an existing filesystem (xfs). mkfs.xfs: Use the -f option to force overwrite. sil:~# mkfs.xfs -f /dev/sdb4 meta-data=/dev/sdb4 isize=256 agcount=4, agsize=91291873 blks = sectsz=512 attr=2 data = bsize=4096 blocks=365167490, imaxpct=5 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=32768, version=2 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 sil:~# mount /dev/sdb4 /tmp/root/mnt sil:/# ls /tmp/root/ boot mnt sil:~#謎。
sil:/# ls bin dev home lib media opt root selinux sys usr boot etc initrd lost+found mnt proc sbin srv tmp var sil:/# tar cf - [b-h]* lib media/ opt/ root/ sbin/ selinux/ srv/ usr/ var/|(cd /tmp/root/; tar xvf -) : :マウントポイント他、ディレクトリもつくる
sil:/# mkdir /tmp/root/initrd sil:/# mkdir /tmp/root/proc sil:/# mkdir /tmp/root/sys sil:/# mkdir /tmp/root/tmp続いて /mnt なのだが、ここはビデオファイルなどがあって、 全部コピーするのには、時間がかかる。
yasunari@sil:~$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 3997976 564168 3433808 15% / tmpfs 63052 0 63052 0% /lib/init/rw tmpfs 63052 0 63052 0% /dev/shm /dev/root.old 13303 11362 1941 86% /initrd /dev/sda1 194442 12070 172333 7% /boot /dev/sda4 1460538888 126676 1460412212 1% /mnt yasunari@sil:~$/mnt が空っぽなので、 元々の HDD を USB で接続して、/mnt をコピーする
sil:~# tail -f /var/log/messages Oct 20 22:17:22 sil kernel: scsi2 : SCSI emulation for USB Mass Storage devices Oct 20 22:17:27 sil kernel: Vendor: ViPowER Model: VP-89118(SD1) Rev: 2.10 Oct 20 22:17:27 sil kernel: Type: Direct-Access ANSI SCSI revision: 04 Oct 20 22:17:27 sil kernel: SCSI device sdb: 1953525168 512-byte hdwr sectors (1000205 MB) Oct 20 22:17:27 sil kernel: sdb: Write Protect is off Oct 20 22:17:27 sil kernel: SCSI device sdb: 1953525168 512-byte hdwr sectors (1000205 MB) Oct 20 22:17:27 sil kernel: sdb: Write Protect is off Oct 20 22:17:27 sil kernel: sdb: sdb1 sdb2 sdb3 sdb4 Oct 20 22:17:27 sil kernel: sd 2:0:0:0: Attached scsi disk sdb Oct 20 22:17:27 sil kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
sil:~# mkdir /tmp/mnt sil:~# mount /dev/sdb4 /tmp/mnt sil:~# ls /tmp/mnt Backup Music Video buffalo tmp wk sil:~#少ないところから、少しずつコピーする
sil:/tmp/mnt# tar cf - wk |(cd /mnt; tar xvf -) wk/ tar: wk: Cannot mkdir: Unknown error 990 wk/click/ tar: wk/click: Cannot mkdir: No such file or directory wk/click/bat/ハングアップした。。。。
sil:/var/log# less messages : : Oct 20 22:35:17 sil kernel: XFS mounting filesystem sda4 Oct 20 22:35:17 sil kernel: XFS: failed to read root inode : :XFS: failed to read root inode を検索したら、 自分のサイトがヒットした。
sil:/var/log# mkfs.ext3 -j /dev/sda4 : : sil:/var/log# dd if=/dev/zero of=/dev/sda4 bs=1 count=3 3+0 records in 3+0 records out 3 bytes (3 B) copied, 0.437788 s, 0.0 kB/s sil:/var/log# mkfs.xfs /dev/sda4 meta-data=/dev/sda4 isize=256 agcount=4, agsize=91291873 blks = sectsz=512 attr=2 data = bsize=4096 blocks=365167490, imaxpct=5 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=32768, version=2 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 sil:/var/log#このあといろいろ試行錯誤したが、やっぱりだめ。
結果、 結局 HS-DHGL だけでは新しい HDD が構築できず、
LS-XHL+ハックキットに USB で HDD を接続、
上記フォーマットまでを実行、
バックアップからシステムを戻して、
できあがった HDD を HS-DHGL にセットして起動
エラーが発生している HDD を HS-DHGL に USB で接続
ビデオを救出している。いまここ
とか書いている。
root@brick:~# tail -f /var/log/messages : : Oct 20 23:12:12 brick kernel: usb 1-1: new high speed USB device using ehci_marvell and address 2 Oct 20 23:12:13 brick kernel: usb 1-1: configuration #1 chosen from 1 choice Oct 20 23:12:13 brick kernel: scsi2 : SCSI emulation for USB Mass Storage devices Oct 20 23:12:18 brick kernel: scsi 2:0:0:0: Direct-Access ViPowER VP-89118(SD1) 2.10 PQ: 0 ANSI: 4 Oct 20 23:12:18 brick kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0 Oct 20 23:12:18 brick kernel: sd 2:0:0:0: [sdb] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) Oct 20 23:12:18 brick kernel: sd 2:0:0:0: [sdb] Write Protect is off Oct 20 23:12:18 brick kernel: sdb: sdb1 sdb2 sdb3 sdb4 Oct 20 23:12:18 brick kernel: sd 2:0:0:0: [sdb] Attached SCSI disk root@brick:~# fdisk /dev/sdb WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): p Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes 255 heads, 63 sectors/track, 182401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x630b3e58 Device Boot Start End Blocks Id System /dev/sdb1 1 25 200781 83 Linux /dev/sdb2 26 524 4008217+ 83 Linux /dev/sdb3 525 556 257040 82 Linux swap / Solaris /dev/sdb4 557 182401 1460669962+ 83 Linux Command (m for help): d Partition number (1-4): 1 Command (m for help): d Partition number (1-4): 2 Command (m for help): d Partition number (1-4): 3 Command (m for help): d Selected partition 4 Command (m for help): p Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes 255 heads, 63 sectors/track, 182401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x630b3e58 Device Boot Start End Blocks Id System Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. root@brick:~# fdisk /dev/sdb WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-182401, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-182401, default 182401): 25 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (26-182401, default 26): Using default value 26 Last cylinder, +cylinders or +size{K,M,G} (26-182401, default 182401): 524 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 3 First cylinder (525-182401, default 525): Using default value 525 Last cylinder, +cylinders or +size{K,M,G} (525-182401, default 182401): 556 Command (m for help): n Command action e extended p primary partition (1-4) p Selected partition 4 First cylinder (557-182401, default 557): Using default value 557 Last cylinder, +cylinders or +size{K,M,G} (557-182401, default 182401): Using default value 182401 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. root@brick:~# fdisk -l /dev/sdb Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes 255 heads, 63 sectors/track, 182401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x630b3e58 Device Boot Start End Blocks Id System /dev/sdb1 1 25 200781 83 Linux /dev/sdb2 26 524 4008217+ 83 Linux /dev/sdb3 525 556 257040 83 Linux /dev/sdb4 557 182401 1460669962+ 83 Linux root@brick:~# root@brick:~# mkfs -j /dev/sdb1 mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=0 blocks, Stripe width=0 blocks 50200 inodes, 200780 blocks 10039 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 25 block groups 8192 blocks per group, 8192 fragments per group 2008 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 37 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@brick:~# 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@brick:~# mkfs.xfs -f /dev/sdb2 meta-data=/dev/sdb2 isize=256 agcount=4, agsize=250514 blks = sectsz=512 attr=2, projid32bit=0 data = bsize=4096 blocks=1002054, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 root@brick:~# mkswap /dev/sdb3 Setting up swapspace version 1, size = 257036 KiB no label, UUID=10068dca-ff7a-4216-afa9-53801aa6992c root@brick:~# mkfs.xfs -f /dev/sdb4 meta-data=/dev/sdb4 isize=256 agcount=4, agsize=91291873 blks = sectsz=512 attr=2, projid32bit=0 data = bsize=4096 blocks=365167490, imaxpct=5 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 log =internal log bsize=4096 blocks=178304, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 root@brick:~#
sil:~# tail -f /var/log/messages : : Oct 20 23:18:15 sil kernel: usb 2-1.4: new high speed USB device using ehci_platform and address 9 Oct 20 23:18:15 sil kernel: usb 2-1.4: configuration #1 chosen from 1 choice Oct 20 23:18:15 sil kernel: scsi2 : SCSI emulation for USB Mass Storage devices Oct 20 23:18:20 sil kernel: Vendor: ViPowER Model: VP-89118(SD1) Rev: 2.10 Oct 20 23:18:20 sil kernel: Type: Direct-Access ANSI SCSI revision: 04 Oct 20 23:18:20 sil kernel: SCSI device sdb: 2930277168 512-byte hdwr sectors (1500302 MB) Oct 20 23:18:20 sil kernel: sdb: Write Protect is off Oct 20 23:18:20 sil kernel: SCSI device sdb: 2930277168 512-byte hdwr sectors (1500302 MB) Oct 20 23:18:20 sil kernel: sdb: Write Protect is off Oct 20 23:18:20 sil kernel: sdb: sdb1 sdb2 sdb3 sdb4 Oct 20 23:18:20 sil kernel: sd 2:0:0:0: Attached scsi disk sdb Oct 20 23:18:20 sil kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0マウントしてみる
sil:~# mkdir /tmp/root sil:~# mount /dev/sdb2 /tmp/root mount: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so sil:~# dmesg|tail SCSI device sdb: 2930277168 512-byte hdwr sectors (1500302 MB) sdb: Write Protect is off sdb: Mode Sense: 21 00 00 00 sdb: assuming drive cache: write through sdb: sdb1 sdb2 sdb3 sdb4 sd 2:0:0:0: Attached scsi disk sdb sd 2:0:0:0: Attached scsi generic sg1 type 0 usb-storage: device scan complete XFS: bad version XFS: SB validate failed sil:~#bad version だと??
sil:~# mkfs -j /dev/sdb1 mke2fs 1.41.3 (12-Oct-2008) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 50200 inodes, 200780 blocks 10039 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 25 block groups 8192 blocks per group, 8192 fragments per group 2008 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 32 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. sil:~# mkfs.xfs -f /dev/sdb2 meta-data=/dev/sdb2 isize=256 agcount=4, agsize=250514 blks = sectsz=512 attr=2 data = bsize=4096 blocks=1002054, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 sil:~# mkswap /dev/sdb3 Setting up swapspace version 1, size = 263204 kB no label, UUID=6d41072c-6c0b-45cf-a40d-98d9e3c9b8d6 sil:~# mkfs.xfs -f /dev/sdb4 meta-data=/dev/sdb4 isize=256 agcount=4, agsize=91291873 blks = sectsz=512 attr=2 data = bsize=4096 blocks=365167490, imaxpct=5 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=32768, version=2 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 sil:~#
sil:~# mount /dev/sdb2 /tmp/root sil:~# mkdir /tmp/root/boot sil:~# mount /dev/sdb1 /tmp/root/boot sil:~# mkdir /tmp/root/mnt sil:~# mount /dev/sdb4 /tmp/root/mnt sil:~#今度は、問題なくマウントできた。
sil:/mnt# tar cf - wk |(cd /tmp/root/mnt/; tar xvf -) : : tar: wk/yasunari/Mail/osm.11.03/135: Cannot stat: Input/output error tar: wk/yasunari/Mail/osm.11.03/136: Cannot stat: Input/output error tar: wk/yasunari/Mail/osm.11.03/137: Cannot stat: Input/output error tar: wk/yasunari/Mail/osm.11.03/138: Cannot stat: Input/output errorもう、元の HDD のエラーなのか、新規の HDD のエラーなのか全然わからなひ。
sil:/mnt# ls /tmp/root/mnt/wk/ click yasunari sil:/mnt# ls /mnt/wk/ click tmp wk yasunari sil:/mnt# cd wk sil:/mnt/wk# ls click tmp wk yasunari sil:/mnt/wk# tar cf - tmp wk |(cd /tmp/root/mnt/wk/; tar xvf -) : :wk/yasunari は完全にはコピー出来なかったので、 今朝のバックアップからリストアする。
sil:/mnt/wk# ls -l /mnt/Backup/sil/*yasunari* -rw-r--r-- 1 root root 682310276 Oct 14 01:49 /mnt/Backup/sil/sil-yasunari.Fri.tar.gz -rw-r--r-- 1 root root 739672636 Oct 17 01:52 /mnt/Backup/sil/sil-yasunari.Mon.tar.gz -rw-r--r-- 1 root root 710005419 Oct 15 01:49 /mnt/Backup/sil/sil-yasunari.Sat.tar.gz -rw-r--r-- 1 root root 739671202 Oct 16 01:56 /mnt/Backup/sil/sil-yasunari.Sun.tar.gz -rw-r--r-- 1 root root 794539251 Oct 20 02:03 /mnt/Backup/sil/sil-yasunari.Thu.tar.gz -rw-r--r-- 1 root root 739733595 Oct 18 01:51 /mnt/Backup/sil/sil-yasunari.Tue.tar.gz -rw-r--r-- 1 root root 761418941 Oct 19 01:52 /mnt/Backup/sil/sil-yasunari.Wed.tar.gz sil:/mnt/wk# cd / sil:/# tar zxvf /mnt/Backup/sil/sil-yasunari.Thu.tar.gz : :その他もどんどんコピーする
sil:/# cd /mnt sil:/mnt# ls Backup Music Video buffalo tmp wk sil:/mnt# ls /tmp/root/mnt/ wk sil:/mnt# tar cf - tmp|(cd /tmp/root/mnt/; tar xvf -) : : sil:/mnt# tar cf - Video|(cd /tmp/root/mnt/; tar xvf -) Video sil:/mnt# tar cf - Music|(cd /tmp/root/mnt/; tar xvf -) Music/ Music/News/ Music/MP3 sil:/mnt# tar cf - Backup|(cd /tmp/root/mnt/; tar xvf -) Backup/ Backup/sil/ Backup/sil/sil-usr.Tue.tar.gz : : sil:/mnt# ls buffalo/ bin boot dev etc home iRCommander.tmp1 lib lost+found mnt proc root sbin share sys tmp usr var www sil:/mnt# cd buffalo/ sil:/mnt# mkdir /tmp/root/mnt/buffalo sil:/mnt# cd buffalo/ sil:/mnt/buffalo# ls bin boot dev etc home iRCommander.tmp1 lib lost+found mnt proc root sbin share sys tmp usr var www sil:/mnt/buffalo# tar cf - bin boot dev etc home iRCommander.tmp1 lib proc root sbin share sys tmp usr var www|(cd /tmp/root/mnt/buffalo/; tar xvf -) : : sil:/mnt/buffalo# ls bin boot dev etc home iRCommander.tmp1 lib lost+found mnt proc root sbin share sys tmp usr var www sil:/mnt/buffalo# ls /tmp/root/mnt/buffalo/ bin boot dev etc home iRCommander.tmp1 lib proc root sbin share sys tmp usr var www sil:/mnt/buffalo# mkdir /tmp/root/mnt/buffalo/mnt sil:/mnt/buffalo# ls mnt/ authtest disk1 info msdfs_root ram usbdisk1 usbdisk2 sil:/mnt/buffalo# cd mnt sil:/mnt/buffalo/mnt# ls authtest disk1 info msdfs_root ram usbdisk1 usbdisk2 sil:/mnt/buffalo/mnt# tar cf - authtest/ [i-u]* |(cd /tmp/root/mnt/buffalo/mnt/; tar xvf -) : :/mnt/buffalo/mnt/disk1/ 以外は /mnt がコピーできたので、 システム側のコピーに回る
sil:/mnt/buffalo/mnt# cd / sil:/# tar cf - [b-h]* lib media/ opt/ root/ sbin/ selinux/ srv/ usr/ var/|(cd /tmp/root/; tar xvf -) bin/ tar: bin: Cannot mkdir: Input/output error bin/which tar: bin/which: Cannot open: Input/output errorぐわぁ。。。
sil:~# mkdir /tmp/root sil:~# mount /dev/sdb2 /tmp/root sil:~# mkdir /tmp/root/boot sil:~# mount /dev/sdb1 /tmp/root/boot sil:~# mkdir /tmp/root/mnt sil:~# mount /dev/sdb4 /tmp/root/mnt sil:~# cd / sil:/# tar cf - [b-h]* lib media/ opt/ root/ sbin/ selinux/ srv/ usr/ var/|(cd /tmp/root/; tar xvf -) : :こんなことを繰り返してシステムのコピーも完了 マウントポイント他、ディレクトリもつくる
sil:/# mkdir /tmp/root/initrd sil:/# mkdir /tmp/root/proc sil:/# mkdir /tmp/root/sys sil:/# mkdir /tmp/root/tmp
sil:~# mkdir /tmp/mnt sil:~# mount /dev/sdb4 /tmp/mnt XFS mounting filesystem sdb4 lsil:~# ls /tmp/mnt/buffalo/ bin dev home lib mnt root share tmp var boot etc iRCommander.tmp1 lost+found proc sbin sys usr www sil:~# ls /tmp/mnt/buffalo/mnt authtest disk1 info msdfs_root ram usbdisk1 usbdisk2 sil:~# ls /mnt/buffalo/mnt/ authtest disk1 info msdfs_root ram usbdisk1 usbdisk2 sil:~# ls /mnt/buffalo/mnt/disk1/ mediaserver sil:~# cd /tmp/mnt/buffalo/mnt/ sil:/tmp/mnt/buffalo/mnt# tar cf - disk1/|(cd /mnt/buffalo/mnt/; tar xvf -) disk1/ disk1/share/ disk1/share/videos/
|
← HS-DHGL の復旧 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ クラッシュした HDD に xfs_repair |