To delete a storage pool, open up a terminal and use the zfs destroy command. When this happens, you may need to delete the storage pool.
Often times, ZFS volumes become broken and unusable. sudo zpool add -f newzpool raidz /dev/sde /dev/sdf Delete A ZFS Pool Note: if your ZFS setup doesn’t use RaidZ, remove it from the command. In this example, we’ll add two more drives to the Zpool (/dev/sde and /dev/sdf). Luckily, since ZFS doesn’t use partitions, adding more storage to a system is simple.
There will come a time when more storage space is needed. ZFS is meant to hold a lot of data, but that doesn’t mean your original drives won’t fill up. Place files inside of the folder you named your ZFS Zpool. To add files to your new ZFS storage pool, open up the file manager and go to the root of the file system. To create a ZFS pool with RaidZ, run: sudo zpool create -f newzpool raidz /dev/sdb dev/sdc /dev/sdd Using RaidZ in combination with your ZFS pool will ensure your data is redundant, with many backups. Instead, consider creating a ZFS pool with RaidZ. However, those that value their data and need to protect it shouldn’t go with such a basic setup. Sudo zpool create -f newzpool /dev/sdb dev/sdc /dev/sddĪ basic setup will get most users through their storage needs. For a basic Z-pool setup, do the following: If the fdisk readout looks good, it’s safe to create a new ZFS Z-pool. This step is critical, as ZFS doesn’t use the traditional partitioning layout. Look through the readout and make sure none of the drives you’ve erased have a file system. Running fdisk will show a lot of information about hard drives, including the file system information for each. When dd finishes up, run the fdisk command. Note: change /dev/sdX with the drive id found with the lsblk command ( sdb, etc.) sudo dd if=/dev/zero of=/dev/sdX bs=8M Using the dd command, overwrite each of the drives. Next, you’ll need to completely zero out the hard drives selected for the Z-pool, so that they no longer have any data on it. In this tutorial, our three drives in the ZFS pool are /dev/sdb, /dev/sdc, and /dev/sdd. Go through and decide which hard drives to use for your Z-pool, and remember the names. Running the “list block” command will print out all of the storage drives on your Linux PC. In a terminal window, run the lsblk command.
Instead, you’ll need to interact with it at a command line level. However, the result is superior storage with way more space.Ĭreating a new ZFS file system is a little more complex than just opening the Gparted partition editor. The ZFS file system works by pooling many different hard drives together to create one large storage center. Before continuing, ensure you have more than 1 hard drive for ZFS. The point of the file system is to create redundancies, by stretching data across multiple hard drives. Note: Though it is possible to use ZFS for a single hard drive, it’s not a good idea, and you’ll likely miss out on all of the features that make this file system great.
Follow the instructions and learn how to get it working before continuing on with this tutorial.
To install the ZFS file system, head over to our in-depth guide. Better yet, Ubuntu is by far the safest implementation of ZFS on Linux, with its simple setup, and build process that has been known to be very reliable (while other Linux distributions have a high risk of breaking ZFS). As of Ubuntu 16.04, Canonical makes it very easy to get going with ZFS. If you’re new to this file system, it’s best to go the Ubuntu route.
Installing ZFS is a little different than other file systems and, depending on what you use, may require a little know-how. Instead, those looking to check it out and use it as their primary storage file system will need to install it. Despite its popularity, Linux users will not be able to enjoy it out of the box. As a result, many in the enterprise swear by it and use it to house trillions of bytes of data. The ZFS file system is incredibly popular.