zfs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
zfs [2025-06-27 21:09] weichbrzfs [2025-06-28 13:33] (current) weichbr
Line 3: Line 3:
 === Create a pool === === Create a pool ===
  
-   * Get disk ids from ''/dev/disk/by-id''+   * Get disk ids from ''/dev/disk/by-id'', do not use ''/dev/sdX''
    * ''zpool create <name> <type> <disks>''    * ''zpool create <name> <type> <disks>''
-   * ''zpool create ssds mirror nvme-Samsung_SSD_980_TB_ABCD nvme-Samsung_SSD_980_TB_EFGH'' +   Example: ''zpool create ssds mirror nvme-Samsung_SSD_980_TB_ABCD nvme-Samsung_SSD_980_TB_EFGH'' 
-   Set ''ashift'' to the physical sector size of your disk +   Don't set ''ashift'', let zfs figure it out. You can check with ''zdb -C <pool>'' what value it uses. 
-   * Set +      * Only set it, if it's wrong. ''ashift=12'' for 4K physical sectors 
 +   * Set ''autotrim=on'' for SSDs 
 +   * When creating a pool ''-o'' is for pool options. To pass options to the root dataset, use ''-O''.
  
 === Create a dataset === === Create a dataset ===
Line 13: Line 15:
    * ''zfs create <pool>/<dataset>''    * ''zfs create <pool>/<dataset>''
    * Disabling ''atime'' is no longer necessary, just make sure that both ''atime'' and ''relatime'' are ''on''    * Disabling ''atime'' is no longer necessary, just make sure that both ''atime'' and ''relatime'' are ''on''
-   * For encryption specify: ''-o encryption=on -o keyformat=raw-o keylocation=file:/%%//%%path/to/key''+   * For encryption specify: ''-o encryption=on -o keyformat=raw -o keylocation=file:/%%//%%path/to/key'' 
 +   * Enable comporession: ''-o compression=zstd'' 
 +   * ''recordsize'' of 128K is default. When storing large files, e.g., media, set this higher, e.g., 1M 
 +   
  • zfs.1751051359.txt.gz
  • Last modified: 2025-06-27 21:09
  • by weichbr