1
vote
1answer
39 views

How can I create a variable for just the Size, Used, and Available of df?

Say I want to create variables, one for each the size, used, and available when using df. How can I create variables for each? Is there an option that returns just one of these things? directorySize= ...
3
votes
2answers
3k views

Shell script to send an alert mail if disk usage exceeds 90%

I am new to shell scripting and want to implement a script on my server which will automatically send email alerts if the disk usage goes over 90% and second email alert when it goes over 95%. My ...
2
votes
2answers
281 views

How come lvextend allocates less than the specified amount of space?

I am trying to extend a volume, let's call it /dev/vol1. I see the initial volume size is 500MB when I call: df --block-size=M /dev/vol1 then to extend it 100MB more I call: lvextend -L+100M ...