ubuntu10.04 update 後に Disk異常
状況確認
昨日、帰社前に
$ sudo apt-get update $ sudo apt-get upgrade $ sudo reboot
して帰ったら、eSATA外付けDiskが認識しなくなった。
タイミング的に ubuntu のupdate が要因に見えるが・・・
まずは状況確認。
$ sudo fdisk -l Disk /dev/sdb: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 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: 0x00000000 Disk /dev/sdb doesn't contain a valid partition table
$ sudo 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 0xb212499a. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) 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): x Expert command (m for help): p Disk /dev/sdb: 255 heads, 63 sectors, 19457 cylinders Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID 1 00 0 0 0 0 0 0 0 0 00 2 00 0 0 0 0 0 0 0 0 00 3 00 0 0 0 0 0 0 0 0 00 4 00 0 0 0 0 0 0 0 0 00 Expert command (m for help):
う〜ん、MBRがゼロクリアされとるようにみえるなぁ・・・
Try repair it
元々の partition 構成を覚えていないが・・・
$ cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid -o value -s UUID' to print the universally unique identifier # for a device; this may be used with UUID= as a more robust way to name # devices that works even if disks are added and removed. See fstab(5). # #proc /proc proc nodev,noexec,nosuid 0 0 # / was on /dev/sda5 during installation UUID=b361f06b-458d-49b4-9b61-b6eb2ae0f2ed / ext3 errors=remount-ro 0 1 UUID=6d718db3-388d-4dd4-9c28-950f1eb0d353 /L ext3 errors=remount-ro 0 2 # swap was on /dev/sda6 during installation UUID=a7575ae5-fa47-49df-80c2-3519e15c2ae8 none swap sw 0 0
なんか 1 partition だったくさい(/L が該当ドライブ)
fdisk で partition を再構成して、/etc/fstab に書いてある UUID と一緒になればいいかな?
$ sudo 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 0x7314564d. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) 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-19457, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-19457, default 19457): Using default value 19457 Command (m for help): t Selected partition 1 Hex code (type L to list codes): 83 Command (m for help): p Disk /dev/sdb: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 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: 0x7314564d Device Boot Start End Blocks Id System /dev/sdb1 1 19457 156288321 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
$ sudo blkid /dev/sda1: UUID="A4247E52247E2786" TYPE="ntfs" /dev/sda5: UUID="b361f06b-458d-49b4-9b61-b6eb2ae0f2ed" SEC_TYPE="ext2" TYPE="ext3" /dev/sda6: UUID="a7575ae5-fa47-49df-80c2-3519e15c2ae8" TYPE="swap" /dev/sdb1: UUID="6d718db3-388d-4dd4-9c28-950f1eb0d353" SEC_TYPE="ext2" TYPE="ext3"
なんか行けそうな気がしてきた。
$ sudo mount /L mount: 間違ったファイルシステムタイプ、不正なオプション、 /dev/sdb1 のスーパーブロックが不正、コードページまたは ヘルパープログラムの未指定、或いは他のエラー In some cases useful info is found in syslog - try dmesg | tail or so
残念。
仕掛けて帰ろう。
$ sudo fsck.ext3 -p /dev/sdb1 /dev/sdb1 was not cleanly unmounted, check forced.
さて明朝どうなるやら?