Difference between revisions of "ZFS"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
[[wikipedia:ZFS|ZFS]] is a combined [[file Systems|file system]] and [[volume manager]] included in [[Operating Systems/Solaris|Solaris]] 10 update 2 (06/2006) and [[Ubuntu]] 16.04 LTS onwards. ZFS support advances features such as
+
[[wikipedia:ZFS|ZFS]] is a combined [[file Systems|file system]] and [[volume manager]] included in [[Solaris]] 10 update 2 (06/2006) and [[Ubuntu]] 16.04 LTS onwards. ZFS support advances features such as
* [[Linux Administration/Devices and Filesystems/Integrity|Data integrity]]
+
* [[Data integrity]]
 
* Integrated [[volume management]] – zpool (pooled storage)
 
* Integrated [[volume management]] – zpool (pooled storage)
 
* [[Copy on Write]] (CoW) <ref>https://en.wikipedia.org/wiki/Copy-on-write</ref>
 
* [[Copy on Write]] (CoW) <ref>https://en.wikipedia.org/wiki/Copy-on-write</ref>
Line 6: Line 6:
 
* Snapshots and clones
 
* Snapshots and clones
 
* [[Deduplication]]<ref>https://wiki.ubuntu.com/Kernel/Reference/ZFS</ref>: <code>[[ZFS deduplication|zfs set dedup=on POOL_NAME/FS_NAME]]</code>
 
* [[Deduplication]]<ref>https://wiki.ubuntu.com/Kernel/Reference/ZFS</ref>: <code>[[ZFS deduplication|zfs set dedup=on POOL_NAME/FS_NAME]]</code>
* [[Operating Systems/Solaris|Solaris]]: Online shrink <code>zpool remove</code> in Solaris 11.4 released in August 2018 <ref>https://docs.oracle.com/cd/E37838_01/html/E60974/dmgmt.html#scrolltoc</ref>
+
* [[Solaris]]: Online shrink <code>zpool remove</code> in Solaris 11.4 released in August 2018 <ref>https://docs.oracle.com/cd/E37838_01/html/E60974/dmgmt.html#scrolltoc</ref>
  
Commands: <code>zfs</code>, <code>zpool</code>, <code>zdb</code>
+
Commands: <code>zfs</code>, <code>[[zpool]]</code>, <code>zdb</code>
  
  

Revision as of 17:21, 11 January 2020

ZFS is a combined file system and volume manager included in Solaris 10 update 2 (06/2006) and Ubuntu 16.04 LTS onwards. ZFS support advances features such as

Commands: zfs, zpool, zdb


  • Installation: sudo apt install zfsutils-linux


Configuration files

  • /etc/default/zfs

Commands

  • List your block/disk devices: lsblk or lsblk -f or fdisk -l
  • Show pool status: zpool status
  • List ZFS pools : zpool list
zpool list -v
  • zfs mount -a
  • zfs umount

To Modify Disk identification to use disk/by-id:

  • zpool export DATA
  • zpool import -d /dev/disk/by-id DATA
  • Verify: zdb -C

Pools

  • zpool destroy YOUR_POOL
  • Show pool status: zpool status
  • List ZFS pools : zpool list

Filesystems

  • Create a new filesystem: sudo zfs create DATA/datafs[4]
  • Destroy a zfs filesystem: sudo zfs destroy DATA/datafs_TO_DESTROY (Warning: no confirmation requested[5])
    • sudo zfs destroy -r DATA/datafs_TO_DESTROY
  • Set a quota to a filesystems: zfs set quota=50G pool/home/bob[6]
  • Check zfs service status: systemctl status "zfs*" "zpool*"
  • Display configuration information: zdb -C

List information

  • Show pool status: zpool status
  • List ZFS pools : zpool list
  • List FS/Volumens/snapshots: zfs list
  • zfs get all
zfs get all | grep mountpoint
zfs get all | grep dedup

Advanced

  • zpool import

Activities

  1. Read selecting dev names when creating a pool before you create your first ZFS pool: https://github.com/zfsonlinux/zfs/wiki/FAQ#selecting-dev-names-when-creating-a-pool and https://wiki.archlinux.org/index.php/Persistent_block_device_naming
  2. Read ArchLinux documentation about ZFS: https://wiki.archlinux.org/index.php/ZFS#Creating_a_storage_pool
  3. Follow Ubuntu Tutorial about Setup a ZFS storage pool: https://tutorials.ubuntu.com/tutorial/setup-zfs-storage-pool#0
  4. Create you first ZFS pool: zpool create

See also


Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.

Original Source: https://en.wikiversity.org/wiki/Linux_Administration/Devices_and_Filesystems/ZFS

Advertising: