[SOLVED] Low disc space warning

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

[SOLVED] Low disc space warning

Postby Jerther on Tue Mar 31, 2009 11:06 pm

My girlfriend's laptop started doing strange things and crashing programs until I read one of the crashed program error: Disc is full, but that was after she lost all her torrents in Deluge...

So I did a little clean up and everything is back to normal. But besides the error message, she claims seeing no warning of low disc space.

Isn't Mint (or any OS at all) supposed to warn when system disc is becoming low?
Last edited by Jerther on Fri Apr 03, 2009 6:50 pm, edited 1 time in total.
Linux Mint Felicia
User avatar
Jerther
Level 1
Level 1
 
Posts: 7
Joined: Tue Mar 17, 2009 8:16 am

Linux Mint is funded by ads and donations.
 

Re: Low disc space warning

Postby Husse on Wed Apr 01, 2009 7:03 am

Seems there is no low disk warning - should be I think
Don't know how easy it is to fix this
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Low disc space warning

Postby Jerther on Wed Apr 01, 2009 9:38 am

I guess there are some software available to do this. Does the included system monitor do it (when running of course)? (Can't test it at the moment)
Linux Mint Felicia
User avatar
Jerther
Level 1
Level 1
 
Posts: 7
Joined: Tue Mar 17, 2009 8:16 am

Re: Low disc space warning

Postby Version_3 on Wed Apr 01, 2009 10:31 am

Not sure about a program that does it. I use Conky to monitor percentages.

However, when I feel I need to do some clean up, I hop into Terminal and run the command

Code: Select all
du | sort -nr | more


This will give you a listing of disk usage in the order of largest to smallest. Great for locating what's really taking up room, and not as time consuming as looking via Nautilus.
Version_3
Level 1
Level 1
 
Posts: 31
Joined: Tue Jul 22, 2008 11:53 am

Re: Low disc space warning

Postby Jerther on Wed Apr 01, 2009 10:59 am

No problem at all with periodically do a manual check, that's easily done in a variety of ways, but a small warning that pops up when disc space is like, below 500 Mb would be much useful and would prevent unwanted data loss

something like this
http://www.unix.com/filesystems-disks-m ... space.html

but a Message Box or a small popup in the notification panel instead of an email.

There has to be something already! :)
I still can'T test anything at tme moment...
Linux Mint Felicia
User avatar
Jerther
Level 1
Level 1
 
Posts: 7
Joined: Tue Mar 17, 2009 8:16 am

Re: Low disc space warning

Postby Jerther on Fri Apr 03, 2009 6:49 pm

I'm back home, so I did a little more googling.. and found just what I wanted!! This is exactly what I was about to try to make myself, it would have been my first attempt on scripting on linux.. oh well, another time :mrgreen:

http://blog.chewearn.com/2008/12/19/pop ... isk-space/

And just in case the page does not exist anymore (I hate dead links), here's the important part:

Chewearn wrote:Pre-requisite

In order for the pop-up message to appear, you would need to install “libnotify-bin”.

Code: Select all
sudo apt-get install libnotify-bin


Script

The script will check the free disk space in “/dev/sda1″. It will show a pop-up message for 30 seconds when the free space is below 100MB. If the free space is below 50MB, it will show a pop-up message for 5 minutes. You should modify these parameters to your own requirement.

Copy and paste the script below to a file called “checklowdisk”.

Code: Select all
#!/bin/sh

DISKSPACE=`df | grep "/dev/sda1" | awk '{ print $4 }'`

if [ "$DISKSPACE" -lt "51200" ] ; then
   /usr/bin/notify-send -u critical -t 300000 \
      'Check low disk' '/dev/sda1 is less than 50MB.'
   exit
fi

if [ "$DISKSPACE" -lt "102400" ] ; then
   /usr/bin/notify-send -u normal -t 30000 \
      'Check low disk' '/dev/sda1 is less than 100MB.'
fi



Setting up the script

Make the script executable:

Code: Select all
chmod +x checklowdisk


Change file ownership to root:

Code: Select all
sudo chown root:root checklowdisk


Move file to “/usr/bin”:

Code: Select all
sudo mv checklowdisk /usr/bin/


Set-up crontab

I chose to run the script hourly using crontab.

Edit crontab:

Code: Select all
crontab -e


Add this line in the editor:

Code: Select all
00 * * * * env DISPLAY=:0 /usr/bin/checklowdisk


Save and close the editor. The crontab is now configured, and the script will run at the hour.


I believe this should be made sticky, or somehow made visible because I've seen many forum threads about this and because of that, I think it will be useful to many.
Linux Mint Felicia
User avatar
Jerther
Level 1
Level 1
 
Posts: 7
Joined: Tue Mar 17, 2009 8:16 am

Re: [SOLVED] Low disc space warning

Postby Acid_1 on Mon Apr 06, 2009 11:08 pm

You should organize it and post it in the how-to's. :D
Website: Forkwhilefork
User avatar
Acid_1
Level 5
Level 5
 
Posts: 817
Joined: Thu Nov 01, 2007 11:12 pm
Location: Saskatchewan, Canada

Re: [SOLVED] Low disc space warning

Postby slider on Sun Apr 12, 2009 8:37 am

Great post Jerther!

By the way Ive never seen a warning message on my main system mainly because my hdd is not near full, while running on LM 6 Felicia KDE live dvd, I have seen a warning message at least twice due to the fact that its running on ram. It was after installing some program with the live dvd that was too big to fit in the ram space :oops:

Oh well, what can I say? I was experimenting! :D

My guess is this warning message script may already be installed out of the box perhaps???
slider
Level 5
Level 5
 
Posts: 580
Joined: Wed May 07, 2008 2:08 pm
Location: Sliding around somewhere!

Re: [SOLVED] Low disc space warning

Postby billconner on Tue Apr 14, 2009 12:04 am

The system can warn you but you have to configure it. The command, df- -h will show you how much disk space is used and available and give you a percentage of free space. Run the command before and after downloads.

You should also create partitions for downloads so that if that partition fills up the system won't crash. Check /tmp and /var/log for huge files and either delete them (rm -rf) or zero them out, >filename
billconner
Level 1
Level 1
 
Posts: 4
Joined: Mon Apr 13, 2009 11:33 pm
Location: My Chair

Re: Low disc space warning

Postby ericinwisconsin on Fri Jul 10, 2009 12:35 pm

Version_3 wrote:Not sure about a program that does it. I use Conky to monitor percentages.

However, when I feel I need to do some clean up, I hop into Terminal and run the command

Code: Select all
du | sort -nr | more


This will give you a listing of disk usage in the order of largest to smallest. Great for locating what's really taking up room, and not as time consuming as looking via Nautilus.


Great idea! The only thing I would add is the -h option to du...

Code: Select all
du -h | sort -nr | more


This gives you a human-readable number. For example:

Code: Select all
89K      ./.mozilla


instead of

Code: Select all
89268   ./.mozilla


Much easier for these tired old eyes...
ericinwisconsin
Level 1
Level 1
 
Posts: 7
Joined: Thu May 14, 2009 7:24 pm

Re: [SOLVED] Low disc space warning

Postby cato40 on Wed Oct 07, 2009 5:40 am

Hi :
To all , that was very enlightening. I had the same problem with my version of Mint4. When I put it to the Great Mint Forum, The reply was " reset your partition in your Hard Drive that relates to that specific situation.
When I accessed my partition ,I was surprised to find only 100Mb. free, so, I edited the partition to a few more Gb.'s
and that fixed the problem.Once again ,thanks to the Great Forum Members,
cato40 :D
cato40
Level 3
Level 3
 
Posts: 178
Joined: Tue Feb 26, 2008 6:49 pm

Re: [SOLVED] Low disc space warning

Postby Midnighter on Thu Feb 11, 2010 2:25 pm

I had a low disc warning several days ago. Couldn't work it out, had over 100gig free in home, and root was fine. Finally deduced it was complaining one of my storag drives was near full, so moved some of it's content to the other 1TB drive, evened them out. *shrug*
User avatar
Midnighter
Level 6
Level 6
 
Posts: 1307
Joined: Tue May 22, 2007 1:52 pm
Location: Western Australia

Re: [SOLVED] Low disc space warning

Postby Doruletz on Sat Aug 21, 2010 2:43 am

Jerther wrote:My girlfriend's laptop started doing strange things and crashing programs until I read one of the crashed program error: Disc is full, but that was after she lost all her torrents in Deluge...

So I did a little clean up and everything is back to normal. But besides the error message, she claims seeing no warning of low disc space.

Isn't Mint (or any OS at all) supposed to warn when system disc is becoming low?



Jerther, I know Windows does have, or had in older editions, a Low Disk Warning. I'm thinking any system should have it as a failsafe against crashes and data loss.......
Ever since hard drives went so big and so cheap I never had to worry about running out of disk space.
My advice is not to store torrent stuff onto the system-home partition but to set a partition for data only. Also periodically move stuff from PC to external media (USB external HDD or even DVD)
Doruletz
Level 2
Level 2
 
Posts: 95
Joined: Sun Aug 15, 2010 1:00 am

Re: [SOLVED] Low disc space warning

Postby kai3345 on Sun Aug 22, 2010 7:10 pm

If they could maybe add a feature that says it? It would help a lot.
kai3345
Level 1
Level 1
 
Posts: 8
Joined: Mon Jun 07, 2010 7:03 pm

Re: [SOLVED] Low disc space warning

Postby Midnighter on Mon Aug 23, 2010 4:13 am

Maybe people could just pay attention to how much free space is available on their drives, and how quickly they're filling them up. :)
If you accept - and I do - that freedom of speech is important, then you are going to have to defend the indefensible. That means you are going to be defending the right of people to read, or to write, or to say, what you don't say or like or want said.
User avatar
Midnighter
Level 6
Level 6
 
Posts: 1307
Joined: Tue May 22, 2007 1:52 pm
Location: Western Australia

Re: [SOLVED] Low disc space warning

Postby alpha1 on Mon Aug 23, 2010 6:13 am

As far as I remember - Isadora 9 Gnome does give a warning when disk space is real low.
I have encountered it when running via WUBI, probably there is a difference when the OS installed independently
alpha1
Level 4
Level 4
 
Posts: 228
Joined: Tue Jun 08, 2010 2:35 am

Re: [SOLVED] Low disc space warning

Postby Midnighter on Mon Aug 23, 2010 10:55 am

Just tried ripping a bunch of dvds earlier, and got a complaint about low disc space, as was running out of room for completed jobs on laptop drive. Mint 9. So, it appears we DO get such warnings.
If you accept - and I do - that freedom of speech is important, then you are going to have to defend the indefensible. That means you are going to be defending the right of people to read, or to write, or to say, what you don't say or like or want said.
User avatar
Midnighter
Level 6
Level 6
 
Posts: 1307
Joined: Tue May 22, 2007 1:52 pm
Location: Western Australia

Re: [SOLVED] Low disc space warning

Postby Mozenrath on Fri Sep 24, 2010 7:52 pm

Here's a little advice I have. I don't know how technically sound it is, but just hear me out.

If you get a low disk space warning, and it doesn't make sense or the evidence says otherwise, back your files the heck up immediately and don't turn off your computer!

Last time this happened to me I didn't back up my files, and when I turned my computer back on it wouldn't boot. My drive was corrupted and I couldn't practically get anything back. Backing up is a good precaution.
Mozenrath
Level 4
Level 4
 
Posts: 212
Joined: Thu Jun 17, 2010 12:41 am

Re: [SOLVED] Low disc space warning

Postby jamied_uk on Wed Feb 09, 2011 1:28 pm

Mozenrath wrote:Here's a little advice I have. I don't know how technically sound it is, but just hear me out.

If you get a low disk space warning, and it doesn't make sense or the evidence says otherwise, back your files the heck up immediately and don't turn off your computer!

Last time this happened to me I didn't back up my files, and when I turned my computer back on it wouldn't boot. My drive was corrupted and I couldn't practically get anything back. Backing up is a good precaution.



i have installed mint 9 inside windows using 25 gb and the host drive even says there is 1 tb or more available space but inside my home folder it sais 50 kb only available (everything is slow like this is really the case)

but how can i solve this with very little steps as this is important also you can get your data back using get data back for ntfs for example use google for this (you must install xp or vista 1st to get this goin but it will work).


SOLVED >>> http://jnet.forumn.biz/t107-free-up-spa ... easely#143
jamied_uk
Level 1
Level 1
 
Posts: 32
Joined: Fri Oct 22, 2010 3:37 am

Re: [SOLVED] Low disc space warning

Postby manoka on Fri Feb 18, 2011 7:18 am

Jerther wrote:... But besides the error message, she claims seeing no warning of low disc space.

Isn't Mint (or any OS at all) supposed to warn when system disc is becoming low?

The "Low Disk Space" warning surely works on my Mint 9 OS.
But there is a square one can click on, with the text: "Don't show any warnings again".
Maybe somebody clicked on this, so you just would have to find out how to activate this warning again.

Cheerios

manoka
manoka
Level 1
Level 1
 
Posts: 30
Joined: Mon Jan 31, 2011 11:39 am

Linux Mint is funded by ads and donations.
 
Next

Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], cedbled, Google [Bot], Google Adsense [Bot], jimallyn and 46 guests