How to partition drive for ZFS
10,443
Solution 1
Remove "disk" from your command line. It's the cause of the error you're receiving.
zpool create MyPool sda
Solution 2
Try using this guide: Aaron Topence - ZFS on Linux.
Assuming you are trying to create a zfs pool called MyPool, using /dev/sda as a disk, try:
# zpool create MyPool sda
Related videos on Youtube
Author by
E-rich
Updated on September 18, 2022Comments
-
E-rich almost 2 years
I'm trying to create a ZFS pool using the following command:
zpool create MyPool disk /dev/sda
However, I get the following error:
cannot use '/dev/disk': must be a block device or regular file
I feel like I should have been able to find someone with this issue, but I haven't been able to.
/dev/sda
is a blank drive. Where am I going wrong? Do I have to format the drive before creating a zpool? If so, what format do I use? -
E-rich almost 10 yearsThe man page says you should be able to specify the full path, but removing it made it work.
-
ewwhite almost 10 yearsYou can use the full path as well. It's not needed. The error here was using "disk".