meta data for this page
  •  

Differences

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

Link to this comparison view

Next revision
Previous revision
linux:fs:zfs:mountpoints [2021/03/13 21:47] – created niziaklinux:fs:zfs:mountpoints [2025/04/06 21:08] (current) niziak
Line 7: Line 7:
 zfs set mountpoint=none backupool/BACKUP zfs set mountpoint=none backupool/BACKUP
 zfs set mountpoint=/BACKUP backupool/BACKUP zfs set mountpoint=/BACKUP backupool/BACKUP
 +
 +# disable auto mount
 +zfs set canmount=noauto /pool/dataset
 +
 </code> </code>
  
 +===== allow user to mount datasets =====
 +
 +<code bash>
 +sudo zfs allow -u USER mount,mountpoint pool/path/to/prj
 +</code>
 +
 +
 +===== allow user to create new datasets =====
 +
 +<code bash>
 +sudo zfs allow -u USER create,mount,destroy,refreservation pool/path/to/prj
 +
 +# list permissions
 +zfs allow pool/path/to/prj
 +
 +
 +</code>
  
 ===== alternate root ===== ===== alternate root =====
-  When a pool is created, the pool is intrinsically tied to the host system. The host system maintains knowledge about the pool so that it can detect when the pool is otherwise unavailable. While useful for normal operation, this knowledge can prove a hindrance when booting from alternate media, or creating a pool on removable media. To solve this problem, ZFS provides an alternate root pool feature. An alternate root pool does not persist across system reboots, and all mount points are modified to be relative to the root of the pool.  + 
-  +<code> 
 +When a pool is created, the pool is intrinsically tied to the host system. The host system maintains knowledge about the pool so that it can detect when the pool is otherwise unavailable. While useful for normal operation, this knowledge can prove a hindrance when booting from alternate media, or creating a pool on removable media. To solve this problem, ZFS provides an alternate root pool feature. An alternate root pool does not persist across system reboots, and all mount points are modified to be relative to the root of the pool. 
 + 
 +</code> 
 To change alternate root runtime: To change alternate root runtime:
 +
 <code bash> <code bash>
 zpool export backuppool zpool export backuppool
-zpool import -R /fakeroot backuppool +zpool import -R /fakeroot backuppool 
 + 
 </code> </code>
  
 To remove alterante root: To remove alterante root:
 +
 <code bash> <code bash>
 zpool export backuppool zpool export backuppool
-zpool import backuppool +zpool import backuppool 
 + 
 </code> </code>
 +