Zero Disk Space

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite
1












I have a Centos 7 server with ext4 running as a KVM and I want to zero the free disk space. This is so when I backup the KVM the compressed image size is reduced. I saw this command etc.



dd if=/dev/zero of=/zero bs=64k; sync; sync; sync; rm -f /zero


Is there anyway to make this stop when "/" root is 98 percent full?







share|improve this question

















  • 2




    Do you have reserved-for-root inodes/blocks set up for the device (often: 10%), and would you be happy if filled to 100%-10%=90%?
    – Ulrich Schwarz
    Jun 27 at 14:06










  • I am most concerned of the moment disk space is exhausted that some other processes will not be able to write to disk and crash etc.
    – Matt
    Jun 27 at 14:18










  • Looking at df -k and wanting to know how to get numerical value of percentage of /tmp used in bash script to compare too.
    – Matt
    Jun 27 at 19:47














up vote
0
down vote

favorite
1












I have a Centos 7 server with ext4 running as a KVM and I want to zero the free disk space. This is so when I backup the KVM the compressed image size is reduced. I saw this command etc.



dd if=/dev/zero of=/zero bs=64k; sync; sync; sync; rm -f /zero


Is there anyway to make this stop when "/" root is 98 percent full?







share|improve this question

















  • 2




    Do you have reserved-for-root inodes/blocks set up for the device (often: 10%), and would you be happy if filled to 100%-10%=90%?
    – Ulrich Schwarz
    Jun 27 at 14:06










  • I am most concerned of the moment disk space is exhausted that some other processes will not be able to write to disk and crash etc.
    – Matt
    Jun 27 at 14:18










  • Looking at df -k and wanting to know how to get numerical value of percentage of /tmp used in bash script to compare too.
    – Matt
    Jun 27 at 19:47












up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





I have a Centos 7 server with ext4 running as a KVM and I want to zero the free disk space. This is so when I backup the KVM the compressed image size is reduced. I saw this command etc.



dd if=/dev/zero of=/zero bs=64k; sync; sync; sync; rm -f /zero


Is there anyway to make this stop when "/" root is 98 percent full?







share|improve this question













I have a Centos 7 server with ext4 running as a KVM and I want to zero the free disk space. This is so when I backup the KVM the compressed image size is reduced. I saw this command etc.



dd if=/dev/zero of=/zero bs=64k; sync; sync; sync; rm -f /zero


Is there anyway to make this stop when "/" root is 98 percent full?









share|improve this question












share|improve this question




share|improve this question








edited Jun 27 at 14:09









Jeff Schaller

30.8k846104




30.8k846104









asked Jun 27 at 13:14









Matt

143




143







  • 2




    Do you have reserved-for-root inodes/blocks set up for the device (often: 10%), and would you be happy if filled to 100%-10%=90%?
    – Ulrich Schwarz
    Jun 27 at 14:06










  • I am most concerned of the moment disk space is exhausted that some other processes will not be able to write to disk and crash etc.
    – Matt
    Jun 27 at 14:18










  • Looking at df -k and wanting to know how to get numerical value of percentage of /tmp used in bash script to compare too.
    – Matt
    Jun 27 at 19:47












  • 2




    Do you have reserved-for-root inodes/blocks set up for the device (often: 10%), and would you be happy if filled to 100%-10%=90%?
    – Ulrich Schwarz
    Jun 27 at 14:06










  • I am most concerned of the moment disk space is exhausted that some other processes will not be able to write to disk and crash etc.
    – Matt
    Jun 27 at 14:18










  • Looking at df -k and wanting to know how to get numerical value of percentage of /tmp used in bash script to compare too.
    – Matt
    Jun 27 at 19:47







2




2




Do you have reserved-for-root inodes/blocks set up for the device (often: 10%), and would you be happy if filled to 100%-10%=90%?
– Ulrich Schwarz
Jun 27 at 14:06




Do you have reserved-for-root inodes/blocks set up for the device (often: 10%), and would you be happy if filled to 100%-10%=90%?
– Ulrich Schwarz
Jun 27 at 14:06












I am most concerned of the moment disk space is exhausted that some other processes will not be able to write to disk and crash etc.
– Matt
Jun 27 at 14:18




I am most concerned of the moment disk space is exhausted that some other processes will not be able to write to disk and crash etc.
– Matt
Jun 27 at 14:18












Looking at df -k and wanting to know how to get numerical value of percentage of /tmp used in bash script to compare too.
– Matt
Jun 27 at 19:47




Looking at df -k and wanting to know how to get numerical value of percentage of /tmp used in bash script to compare too.
– Matt
Jun 27 at 19:47















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f452215%2fzero-disk-space%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f452215%2fzero-disk-space%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?