ZFS: Difference between revisions

imported>Mic92
upstream also now has restored fpu support
imported>Mic92
fix reservation example
Line 97: Line 97:
Since zfs is a copy-on-write filesystem even for deleting files disk space is needed. Therefore it should be avoided to run out of disk space. Luckily it is possible to reserve disk space for datasets to prevent this.
Since zfs is a copy-on-write filesystem even for deleting files disk space is needed. Therefore it should be avoided to run out of disk space. Luckily it is possible to reserve disk space for datasets to prevent this.


To enable reservations pick any dataset of your and do:
To reserve space create a new unused dataset that gets a guaranteed disk space of 1GB.
: reserves enough disk space to have room for cleanups/deletion
 
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
zfs set reservation=1G zroot
zfs create -o refreservation=1G -o mountpoint=none zroot/reserved
</syntaxhighlight>
</syntaxhighlight>


where <code>zroot</code> should be replaced by a dataset in your pool.
where <code>zroot</code> should be replaced by a dataset in your pool.
The dataset itself should not be used. In case you would run out of space this way by deleting this dataset you can reclaim enough disk space to cleanup the other files in the pool.


== How to use the auto-snapshotting service ==
== How to use the auto-snapshotting service ==