Hard drive not full anymore. I can log in again -HOWEVER- is there a way to prevent reoccurrence? [SOLVED]
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 4
- Posts: 453
- Joined: Wed Feb 18, 2015 6:41 pm
Hard drive not full anymore. I can log in again -HOWEVER- is there a way to prevent reoccurrence? [SOLVED]
During a data recovery attempt, I filled my hard drive to the brim. Then, because I was busy in the real world, I shut my computer down. I wasn't able to log back in.
That issue is resolved. However, I'd like to know if there is a way to automatically prevent this from happening again. It seems to me that, as customizable as LM is, there should be a program I can run that would either alert me if my hd is getting too full or maybe even one that would totally prevent me from filling it up and then tell me that it's intervened.
So, is there?
Thanks
That issue is resolved. However, I'd like to know if there is a way to automatically prevent this from happening again. It seems to me that, as customizable as LM is, there should be a program I can run that would either alert me if my hd is getting too full or maybe even one that would totally prevent me from filling it up and then tell me that it's intervened.
So, is there?
Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, 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.
I have been using Linux for years and I am still a newbie
Re: Hard drive not full anymore. I can log in again -HOWEVER- is there a way to prevent reoccurrence?
Actually you get (at least in Cinnamon) a message with a warning, short before a partition runs out of space. But to my remembrance this message appears with the default settings only for a few seconds and vanishes after that silently. IMO this is a design bug. This message should stay open (similar to the message about software rendering) until the user has clicked it.
-
- Level 4
- Posts: 453
- Joined: Wed Feb 18, 2015 6:41 pm
Re: Hard drive not full anymore. I can log in again -HOWEVER- is there a way to prevent reoccurrence?
Indeed.Cosmo. wrote:IMO this is a design bug.
Agreed. Moreover, it should explicitly warn the user that, if he continues, he risks locking himself out of his computer until and unless he logs in as root.Cosmo. wrote:This message should stay open (similar to the message about software rendering) until the user has clicked it.
I have been using Linux for years and I am still a newbie
Re: Hard drive not full anymore. I can log in again -HOWEVER- is there a way to prevent reoccurrence?
The kernel and ext4 take care of this for system purposes, reserving 5% of a file system's space for a single nominated user; usually UID=0 which is the kernel and root. You can do something similar...make a large file in the /tmp/ folder after you log in. That will be deleted next boot, so there will always be space to log in...
Code: Select all
### Reserve 1GiB in the /tmp/ folder...
head -c 1G /dev/zero > /tmp/$UID-filler
Re: Hard drive not full anymore. I can log in again -HOWEVER- is there a way to prevent reoccurrence?
Huh; the "disk full" warning used to be a little more reliable... not that it prevented me from borking my system big-time.
I had a misbehaving/misconfigured server running and it filled the root volume with gigabybtes of error logs. Took me a week to get sorted out. It probably didn't help that I'd allocated root something like a 20GB partition, but at the time it seemed reasonable.
I ended up adjusting logrotate to accommodate my partition size until the next install, where I allocated a whopping 40GB to root.
I had a misbehaving/misconfigured server running and it filled the root volume with gigabybtes of error logs. Took me a week to get sorted out. It probably didn't help that I'd allocated root something like a 20GB partition, but at the time it seemed reasonable.
I ended up adjusting logrotate to accommodate my partition size until the next install, where I allocated a whopping 40GB to root.
-
- Level 4
- Posts: 453
- Joined: Wed Feb 18, 2015 6:41 pm
Re: Hard drive not full anymore. I can log in again -HOWEVER- is there a way to prevent reoccurrence?
It seems like a good work-around. If I'm reading you correctly, I'll have to recreate this large file in the /tmp/folder each time I log in. Is that correct?Mute Ant wrote:The kernel and ext4 take care of this for system purposes, reserving 5% of a file system's space for a single nominated user; usually UID=0 which is the kernel and root. You can do something similar...make a large file in the /tmp/ folder after you log in. That will be deleted next boot, so there will always be space to log in...Code: Select all
### Reserve 1GiB in the /tmp/ folder... head -c 1G /dev/zero > /tmp/$UID-filler
Also, please explain it to me as you would a child.
1. I open Terminal
2. I type in
Code: Select all
head -c 1G /dev/zero > /tmp/$UID-filler
Thanks.
I have been using Linux for years and I am still a newbie
- Arch_Enemy
- Level 6
- Posts: 1493
- Joined: Tue Apr 26, 2016 3:28 pm
Re: Hard drive not full anymore. I can log in again -HOWEVER- is there a way to prevent reoccurrence?
I believe the disk filling warning is a cron job, so you may be able to adjust it to give more warning, and an earlier warning.
I don't mess with CRON jobs, so someone more skilled than I will have to jump in.
I don't mess with CRON jobs, so someone more skilled than I will have to jump in.
I have travelled 37629424162.9 miles in my lifetime
One thing I would suggest, create a partition as a 50G partition as /. Partition the rest as /Home. IF the system fails, reinstall and use the exact same username and all your 'stuff' comes back to you.
One thing I would suggest, create a partition as a 50G partition as /. Partition the rest as /Home. IF the system fails, reinstall and use the exact same username and all your 'stuff' comes back to you.
Re: Hard drive not full anymore. I can log in again -HOWEVER- is there a way to prevent reoccurrence?
Exactly. Log in to the Mint GUI, open a console, type in that command, it reserves 1GiB of space in a file that is automatically freed up next boot. It can be automatically created too, if you decide to keep it. In the Startup Applications for your user you add and enable a single line 'application' command...
P.S. I am assuming the "can't log in" syndrome is caused by the root partition being stuffed full. If it's caused by some other partition being full, reserving space in /tmp/ for the next boot won't help.
Code: Select all
bash -c "head -c 1G /dev/zero > /tmp/$UID-filler"
-
- Level 4
- Posts: 453
- Joined: Wed Feb 18, 2015 6:41 pm
Re: Hard drive not full anymore. I can log in again -HOWEVER- is there a way to prevent reoccurrence?
Ok, it didn't ask for my password when I typed the command into terminal. May I presume it's because it's not a higher level (root or sudo, or whatever—forgive my ignorance of the proper terminology) command?Mute Ant wrote:Exactly. Log in to the Mint GUI, open a console, type in that command...
How do I ensure that it worked before proceeding?
Yes, that is correct.Mute Ant wrote:P.S. I am assuming the "can't log in" syndrome is caused by the root partition being stuffed full. If it's caused by some other partition being full, reserving space in /tmp/ for the next boot won't help.
I have been using Linux for years and I am still a newbie
-
- Level 4
- Posts: 453
- Joined: Wed Feb 18, 2015 6:41 pm
Re: Hard drive not full anymore. I can log in again -HOWEVER- is there a way to prevent reoccurrence?
I just went to file system/tmp/ and I see that there is a document there called 1000-filler. That must be it.James_Smith wrote:How do I ensure that it worked before proceeding?
I have been using Linux for years and I am still a newbie