HDD追加した際のメモ
root@storage:~# cat /proc/version Linux version 4.4.0-38-generic (buildd@lgw01-58) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2) ) #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016
接続してるHDD一覧
ls /dev/disk/by-id/ | grep ata-
HDD接続後
増えた名前が新しく追加されたHDD
ls /dev/disk/by-id/ | grep ata-
そのままaddすると怒られる
root@storage:~# zpool add tank /dev/disk/by-id/ata-TOSHIBA_XXXXXXXXXXXXXXXX invalid vdev specification use '-f' to override the following errors: /dev/disk/by-id/ata-TOSHIBA_XXXXXXXXXX does not contain an EFI label but it may contain partition information in the MBR.
partedでgptラベルを付ける
root@storage:~# parted /dev/disk/by-id/ata-TOSHIBA_XXXXXXXXX GNU Parted 3.2 Using /dev/sdc Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) mklabel gpt Warning: The existing disk label on /dev/sdc will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No? yes (parted) quit Information: You may need to update /etc/fstab.
zpool add する
root@storage:~# zpool add tank /dev/disk/by-id/ata-TOSHIBA_XXXXX
増えてる
root@storage:~# zpool status tank pool: tank state: ONLINE scan: none requested
めでたしめでたし
結論:ZFSすごい
参考リンク
http://sios-oss.blogspot.jp/2012/03/zfs-on-linux1zfs.html
http://qiita.com/kotashiratsuka/items/18d09bd7a7de4c2a15b9