現象
-
debian8 で zfs を昔使っていた。
-
その後zfsを使わずext4で使っていた。
-
debian9 をクリーンインストールした後、
blkid
でUUIDが表示されないことに気がついた。 -
dd if=/dev/zero of=/dev/sda bs=1M count=1000
とかしても消えなかったので調査したところ、wipefs
コマンドで消せることにたどり着いた。 -
HDD mount problem (bad FSTYPE) / System Administration / Arch Linux Forums
確認
# wipefs /dev/sda1
offset type
----------------------------------------------------------------
0x7470abfc00 zfs_member [filesystem]
LABEL: tank500
UUID: 7915798765570182767
0x438 ext4 [filesystem]
UUID: d307f4b7-0862-4a5a-bcd3-fbdc3b842c12
消去
# wipefs -a /dev/sda1
/dev/sda1: 2 bytes were erased at offset 0x00000438 (ext4): 53 ef
/dev/sda1: 8 bytes were erased at offset 0x7470abfc00 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/sda1: 8 bytes were erased at offset 0x7470abf800 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/sda1: 8 bytes were erased at offset 0x7470abf400 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/sda1: 8 bytes were erased at offset 0x7470abf000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/sda1: 8 bytes were erased at offset 0x7470abec00 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/sda1: 8 bytes were erased at offset 0x7470abe800 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/sda1: 8 bytes were erased at offset 0x7470abe400 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/sda1: 8 bytes were erased at offset 0x7470abe000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/sda1: 8 bytes were erased at offset 0x7470abdc00 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/sda1: 8 bytes were erased at offset 0x7470abd800 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/sda1: 8 bytes were erased at offset 0x7470abd400 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/sda1: 8 bytes were erased at offset 0x7470abd000 (zfs_member): 0c b1 ba 00 00 00 00 00
...
確認、再フォーマット
wipefs /dev/sda1
mkfs.ext4 /dev/sda1
blkid
blkid で UUID 値が表示されることを確認。