Sudden change in drive space [SOLVED]
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 2
- Posts: 94
- Joined: Sun Nov 13, 2016 8:40 am
Sudden change in drive space [SOLVED]
I've been using Cinnamon 19 on an old desktop with ~280GB disk space.
Everything has been fine though my normal usage of the disk space has crept up slowly, so far so good.
I just noticed yesterday that the remaining drive space was 6GB. Two hours later I saw a warning message telling me that there was less than 1GB left. I cleared some files (and emtyed the trash obviously) and got back to 6GB. This morning I noticed it started at 4.8GB and an hour later gave me another warning that there is less than 1GB left.
Question:
Is this just to be expected, i.e. that when the free disk space is very low, say <10B, that the operating system starts doing odd things and arbitrarily starts reporting less and less free space even though I haven't added anything. It still seems a bit odd to me, what else could be a problem?
The only recent change I made was to install Zotero two days ago, which I haven't actually started using. Its own folder and its .zotero counterpat are just 12MB each.
Everything has been fine though my normal usage of the disk space has crept up slowly, so far so good.
I just noticed yesterday that the remaining drive space was 6GB. Two hours later I saw a warning message telling me that there was less than 1GB left. I cleared some files (and emtyed the trash obviously) and got back to 6GB. This morning I noticed it started at 4.8GB and an hour later gave me another warning that there is less than 1GB left.
Question:
Is this just to be expected, i.e. that when the free disk space is very low, say <10B, that the operating system starts doing odd things and arbitrarily starts reporting less and less free space even though I haven't added anything. It still seems a bit odd to me, what else could be a problem?
The only recent change I made was to install Zotero two days ago, which I haven't actually started using. Its own folder and its .zotero counterpat are just 12MB each.
Last edited by LockBot on Sun Feb 05, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Sudden change in drive space
I skimmed the description of Zotero, and off the top of my head I'm thinking that Zotero eats memory. How else would it work, you should be able to find out. Look at the memory consumption of Zotero.
-
- Level 2
- Posts: 94
- Joined: Sun Nov 13, 2016 8:40 am
Re: Sudden change in drive space
Zotero installed from the software repository with two folders in my home directory called
zotero
.zotero
They are both about 12MB each and haven't grown in the last couple of days. I originally mentioned it because it was the only recent change to the system though I actually think this is a red herring because the folder sizes are so small.
Interestingly I tried to follow the "evaluate" option in the disk space warning message and it opened up the disk usage analyser at the whole drive level. In the same time frame the free disk space then showed as 0 bytes as presumably that process itself was taking up all the remaining room. I stopped the disk usage analyser, cleared a bit more space and the file manager still showed 0 bytes so I rebooted. Now the login box keeps returning me to the password box, without mentioning any kind of password or other error so I can't log in.
Next steps anyone?
zotero
.zotero
They are both about 12MB each and haven't grown in the last couple of days. I originally mentioned it because it was the only recent change to the system though I actually think this is a red herring because the folder sizes are so small.
Interestingly I tried to follow the "evaluate" option in the disk space warning message and it opened up the disk usage analyser at the whole drive level. In the same time frame the free disk space then showed as 0 bytes as presumably that process itself was taking up all the remaining room. I stopped the disk usage analyser, cleared a bit more space and the file manager still showed 0 bytes so I rebooted. Now the login box keeps returning me to the password box, without mentioning any kind of password or other error so I can't log in.
Next steps anyone?
Re: Sudden change in drive space
Have you emptied trash bin?
Only move items into trash does not reduce occupied space. You have to delete them finally by emptying trash bin.
Read this thread too: https://www.tecmint.com/free-disk-space ... inux-mint/.
The 2 very useful commands are:
Just insert them one after the other in Terminal and execute them.
Only move items into trash does not reduce occupied space. You have to delete them finally by emptying trash bin.
Read this thread too: https://www.tecmint.com/free-disk-space ... inux-mint/.
The 2 very useful commands are:
Code: Select all
sudo apt autoremove
Code: Select all
sudo apt clean
Last edited by Dan-cer on Fri Aug 05, 2022 7:25 am, edited 1 time in total.
-
- Level 2
- Posts: 94
- Joined: Sun Nov 13, 2016 8:40 am
Re: Sudden change in drive space
@Dan-cer - first post, 3rd paragraph
Re: Sudden change in drive space
Sorry yes, I overread that.
However, look again into my last post bc I edited it with a link and 2 codes.
However, look again into my last post bc I edited it with a link and 2 codes.
-
- Level 2
- Posts: 94
- Joined: Sun Nov 13, 2016 8:40 am
Re: Sudden change in drive space
OK, thanks these look interesting.
However as the machine won't boot past the password login I presume that the disk space issue is now preventing boot and that I will have to boot from a USB stick, clear much much more disk space and then have another go.
1. Does this assumption sound ok, i.e. that not letting me past the password box is a normal response to the disk having 0bytes space left?
2. Would I need to use a different terminal command with autoremove etc if it is being run from a live boot USB in order to reference which drive it is that I want cleaned?
However as the machine won't boot past the password login I presume that the disk space issue is now preventing boot and that I will have to boot from a USB stick, clear much much more disk space and then have another go.
1. Does this assumption sound ok, i.e. that not letting me past the password box is a normal response to the disk having 0bytes space left?
2. Would I need to use a different terminal command with autoremove etc if it is being run from a live boot USB in order to reference which drive it is that I want cleaned?
Re: Sudden change in drive space
@1
Could be.
@2
You should search more informations about that, either in mint or ubuntu forums.
I found this thread that might be useful to learn something: viewtopic.php?t=168804&p=871891
There are tutorials available how to repair an OS using a live USB. You'll need to learn using some commands to mount /umount your OS (Mint) and do some changes within that OS as root.
Could be.
@2
You should search more informations about that, either in mint or ubuntu forums.
I found this thread that might be useful to learn something: viewtopic.php?t=168804&p=871891
There are tutorials available how to repair an OS using a live USB. You'll need to learn using some commands to mount /umount your OS (Mint) and do some changes within that OS as root.
Re: Sudden change in drive space
A fairly common issue in Linux is overgrown and ever-expanding log files, as a result of persistent errors or warnings. In other words, there's very likely a log file constantly increasing in size because there are errors filling it up. I've had this happen multiple times over the years in Linux; it's frustrating, but it's a sure-fire way to get you to address the problem. It's not guaranteed to be the problem you're having, but I'd say it's a high chance, given your description. The two files I've mainly had issues with '/var/log/syslog' and '~/.xsession-errors'.
I'm also Terminalforlife on GitHub.
-
- Level 2
- Posts: 94
- Joined: Sun Nov 13, 2016 8:40 am
Re: Sudden change in drive space
Thankyou Dan-cer and Termy for your suggestions so far.
I logged into the problem machine using the virtual console ( ctrl-alt-F1) at the Mint password screen thus getting around the not-being-able-to-login issue.
After looking around a bit:
/var/cache does not contain large files/folders. The largest is /apt which is 130MB
/var/log/syslog is 0B (the biggest file in /var/log is 9MB)
/var/log/syslog1 is 200k
~/.xsession-errors is 0B
~/.local/share/Trash has only a few files in it totalling less than 1MB
Also, and I don't know at all if this is relevant:
/swapfile is 2GB
Obviously none of these files seem big enough to be the cause of the rapid reduction in free space I mentioned (i.e. >= 5GB).
I ran sudo apt autoremove and sudo apt clean and it said it had found 6GB to free up which seems to have worked (despite /var/cache/apt containing only 130MB as I mentioned above).
Next steps: I'm interested to see if there is any thing else I can check for bloat. Does anyone have any more suggestions?
So far I've used a combination of:
and
to get this far though it is quite laborious process. When I tried using du at root level something didn't work out and it essentially froze the terminal - I presume it was that the command output simply needed paging but I haven't worked out how to do this.
I logged into the problem machine using the virtual console ( ctrl-alt-F1) at the Mint password screen thus getting around the not-being-able-to-login issue.
After looking around a bit:
/var/cache does not contain large files/folders. The largest is /apt which is 130MB
/var/log/syslog is 0B (the biggest file in /var/log is 9MB)
/var/log/syslog1 is 200k
~/.xsession-errors is 0B
~/.local/share/Trash has only a few files in it totalling less than 1MB
Also, and I don't know at all if this is relevant:
/swapfile is 2GB
Obviously none of these files seem big enough to be the cause of the rapid reduction in free space I mentioned (i.e. >= 5GB).
I ran sudo apt autoremove and sudo apt clean and it said it had found 6GB to free up which seems to have worked (despite /var/cache/apt containing only 130MB as I mentioned above).
Next steps: I'm interested to see if there is any thing else I can check for bloat. Does anyone have any more suggestions?
So far I've used a combination of:
Code: Select all
ls -alhS
Code: Select all
du -d 1 -h
- antikythera
- Level 15
- Posts: 5723
- Joined: Thu Jul 02, 2020 12:52 pm
- Location: Cymru
Re: Sudden change in drive space
It may be timeshift snapshots, check in that utility how many snapshots are listed. If there's loads, get rid of all but the last two or three. You can do that from the Live Media.
I’ll tell you a DNS joke but be advised, it could take up to 24 hours for everyone to get it.
Re: Sudden change in drive space
Yes, Timeshift. Configure Timeshift to keep fewer backups. I keep only 2 boot and 2 weekly, and I could get by with 2 boot and 1 monthly. Seriously, I could probably get by with 1 monthly. Timeshift can be really awful if you have a root and a home partition, because the default place it stores backups is the / partition, which is always the smaller one, and it can fill up and stop the ability to boot. If you have a / (root) and a /home, configure Timeshift to store backups in /home.
- antikythera
- Level 15
- Posts: 5723
- Joined: Thu Jul 02, 2020 12:52 pm
- Location: Cymru
Re: Sudden change in drive space
I do two daily and two boot. I also once a month update my foxclone backup if there has been any major change to root contents, as part of the foxclone routine I clear out timeshift first if I know everything is working okay at that point in time.
I’ll tell you a DNS joke but be advised, it could take up to 24 hours for everyone to get it.
Re: Sudden change in drive space
Your perception of du(1) freezing, was no doubt just down to it working, gathering information on files on all mounted filesystems; it tends to take a while doing things like that in '/', especially if you have slow devices like HDDs and/or if you have lots of files.
The '/swapfile' should be left alone, IMO; it's akin to the Window's pagefile.
Seems like it's probably not a log file issue, which is good.
For future reference, you might want to note down this one-liner:
Code: Select all
du -h --max-depth=1 | sort -hr
You can also use find(1) to find strictly files over a given size, which can be incredibly helpful. IE:
Code: Select all
find ~/ -type f -size +50M
Code: Select all
find ~/ -type f -size +50M -printf '%-10s %p\n' | numfmt --to=iec | sort -rhk 1
~/
with desired target path, or leave empty to work on the CWD. Replace the number in +50M
with whatever number of M
(Mebibytes) you wish to find, or use G
(Gibibytes). You can use lowercase unit letters for powers of 1000. The +
means things over that size.I'm also Terminalforlife on GitHub.
-
- Level 2
- Posts: 94
- Joined: Sun Nov 13, 2016 8:40 am
Re: Sudden change in drive space [SOLVED]
Hi Termy, reddog1 and antikythera
These suggestions have all been useful, thank you.
I noticed that there were quite a few Timeshift backups that had not been swept up in the normal rolling process: I had manually triggered them on previous occasions when updating something big via the update manager.
The further ideas for ways to find wasted space has also been very useful and I quickly got to a point where the drive was at a stable freespace level so that I could start shifting wanted files to other safer places.
These suggestions have all been useful, thank you.
I noticed that there were quite a few Timeshift backups that had not been swept up in the normal rolling process: I had manually triggered them on previous occasions when updating something big via the update manager.
The further ideas for ways to find wasted space has also been very useful and I quickly got to a point where the drive was at a stable freespace level so that I could start shifting wanted files to other safer places.