User Tools

Site Tools


zfs_root_cache

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
zfs_root_cache [2020/11/30 11:08] memeruizzfs_root_cache [2021/02/01 05:55] (current) – external edit 127.0.0.1
Line 130: Line 130:
  
 ==== Create a ZFS pool for main big data! ==== ==== Create a ZFS pool for main big data! ====
 +
 +  * option 1: Stripping
  
   sudo zpool create tardis  /dev/sdb4 /dev/sde4 /dev/sdf4   sudo zpool create tardis  /dev/sdb4 /dev/sde4 /dev/sdf4
 +
 +  * option 2: raidz1 (with 3 new disks in raidz1 configuration of 2xdisk space)
 +
 +  sudo zpool create tardis raidz1 /dev/sdb4 /dev/sde4 /dev/sdf4
 +  
 +  * option 3: raidz1 but degraded. (without one disk at the beginning) Solution: Use a sparse file as one of the starting disks [10].
 +
 +  truncate -s 8T tardisfake.img (Use the same exact size of the real disk partition) 
 +  sudo zpool create tardis raidz1 /dev/sde4 /dev/sdf4 /home/memeruiz/tardisfake.img
 +  sudo zpool offline tardisnew /home/memeruiz/tardisfake.img
 +
 +  * Add log and cache devices:
 +
   sudo zpool add tardis log /dev/nvme0n1p1   sudo zpool add tardis log /dev/nvme0n1p1
   sudo zpool add tardis cache /dev/nvme0n1p2   sudo zpool add tardis cache /dev/nvme0n1p2
Line 138: Line 153:
  
   sudo zfs create -o encryption=on -o keyformat=passphrase tardis/data   sudo zfs create -o encryption=on -o keyformat=passphrase tardis/data
 +
 +  * Create compressed subvolume
 +
 +  sudo zfs create tardis/data/compressed
 +  sudo zfs set compression=on tardis/data/compressed
 +
  
   * Avoid data to be mounted automatically with zfs:   * Avoid data to be mounted automatically with zfs:
Line 207: Line 228:
  
 This will copy everthing from the zfs from that disk to the new one, attach the new one and detach the old one. In this way, it is not necessary to copy the whole disk with dd. This will copy everthing from the zfs from that disk to the new one, attach the new one and detach the old one. In this way, it is not necessary to copy the whole disk with dd.
 +
 +==== Create a zfs pool using files instead of real disks ====
 +
 +  mkfile 100m file1
 +  zpool create geekpool /file1
 +
 +==== Create a ZFS raidz1 en degrated mode ====
 +
 +  * Create a sparse file with the same size of your harddrives. Then remove it before putting files to it.
 +
 +
 +[[https://www.reddit.com/r/zfs/comments/8enkt8/can_i_create_a_new_raidz_in_degraded_mode/]]
  
  
Line 230: Line 263:
  
 [[https://docs.oracle.com/cd/E36784_01/html/E36835/gbbvf.html]] [[https://docs.oracle.com/cd/E36784_01/html/E36835/gbbvf.html]]
 +
 +[[https://www.thegeekdiary.com/zfs-tutorials-creating-zfs-pools-and-file-systems/]]
 +
 +[[https://www.delphix.com/blog/delphix-engineering/openzfs-code-walk-metaslabs-and-space-maps]]
 +
 +
 +[10] [[https://www.mail-archive.com/zfs-discuss@opensolaris.org/msg22993.html]]
 +
 +[[https://unix.stackexchange.com/questions/322352/create-raid-z2-in-degraded-state-possible]]
 +
  
zfs_root_cache.1606734530.txt.gz · Last modified: 2021/02/01 05:55 (external edit)