{"id":1454,"date":"2021-11-28T16:31:08","date_gmt":"2021-11-28T14:31:08","guid":{"rendered":"https:\/\/www.boettrich.info\/blog\/?p=1454"},"modified":"2022-04-19T15:34:04","modified_gmt":"2022-04-19T13:34:04","slug":"delete-files-when-the-zfs-is-100-full","status":"publish","type":"post","link":"https:\/\/www.boettrich.info\/blog\/beitrag\/delete-files-when-the-zfs-is-100-full\/","title":{"rendered":"Delete files when the ZFS is 100% full"},"content":{"rendered":"\n<p>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.<\/p>\n\n\n\n<p>As ZFS is a copy-on-write (COW) filesystem it needs free space to delete files! <\/p>\n\n\n\n<p>A remedy after the pool has filled up is to &#8218;truncate&#8216; some large files:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@nas3:\u02dc# cat \/dev\/null &gt; \/path\/to\/big\/file  <\/code><\/pre>\n\n\n\n<p>A more preventive action is to reserve space before shit hits the fan with creation of a dataset:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@nas3:\u02dc# zfs create vol1-mirror\/reserved\nroot@nas3:\u02dc# zfs set reservation =1G vol1-mirror\/reserved<\/code><\/pre>\n\n\n\n<p>So when the pool fills up to 100% just delete the reserved dataset:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@nas3:\u02dc# zfs destroy vol1-mirror\/reserved<\/code><\/pre>\n\n\n\n<p>Afterwards it should be able to delete files to free up space.<\/p>\n\n\n\n<p>Don&#8217;t forget to recreate the dummy dataset again&#8230; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&hellip;&nbsp;<a href=\"https:\/\/www.boettrich.info\/blog\/beitrag\/delete-files-when-the-zfs-is-100-full\/\" rel=\"bookmark\">Weiterlesen &raquo;<span class=\"screen-reader-text\">Delete files when the ZFS is 100% full<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[1,6],"tags":[],"class_list":["post-1454","post","type-post","status-publish","format-standard","hentry","category-beitrag","category-technik"],"_links":{"self":[{"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/posts\/1454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/comments?post=1454"}],"version-history":[{"count":3,"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/posts\/1454\/revisions"}],"predecessor-version":[{"id":1458,"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/posts\/1454\/revisions\/1458"}],"wp:attachment":[{"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/media?parent=1454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/categories?post=1454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/tags?post=1454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}