Zum Inhalt springen

Delete files when the ZFS is 100% full

In case the recommendation not filling up your pool over 75 % fails and the pool is filled up to 100% there are some steps which can be done to free up space tough.

As ZFS is a copy-on-write (COW) filesystem it needs free space to delete files!

A remedy after the pool has filled up is to ‘truncate’ some large files:

root@nas3:˜# cat /dev/null > /path/to/big/file  

A more preventive action is to reserve space before shit hits the fan with creation of a dataset:

root@nas3:˜# zfs create vol1-mirror/reserved
root@nas3:˜# zfs set reservation =1G vol1-mirror/reserved

So when the pool fills up to 100% just delete the reserved dataset:

root@nas3:˜# zfs destroy vol1-mirror/reserved

Afterwards it should be able to delete files to free up space.

Don’t forget to recreate the dummy dataset again…

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.