Last active
July 28, 2023 21:37
-
-
Save aspyct/9b604979f6717c8ac6d5cc1cffb759e0 to your computer and use it in GitHub Desktop.
ZFS Essentials
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a ZFS pool (i.e. choose disks that are part of the storage) | |
# In this case, it's a two-disk mirror | |
# Make sure to use /dev/disk/by-id/* for a stable pool | |
sudo zpool create <pool_name> mirror /dev/disk/by-id/<disk1> /dev/disk/by-id/<disk2> | |
sudo zfs create <pool_name>/<dataset_name> | |
# Check status | |
sudo zpool status | |
# Change the mountpoint of a volume | |
sudo zfs set mountpoint=/path/to/directory poolname/volumename | |
# Rename a volume | |
sudo zfs rename poolname/volumename poolname/newvolumename | |
# Destroy a volume | |
sudo zfs destroy poolname/volumename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment