Commands fail with disk full messages, but df says I've got plenty of space
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Commands fail with disk full messages, but df says I've got plenty of space
I've been getting error messages indicating my disk might be full, but I don't really think it is. It is so bad that I could not log on via Gnome, but fortunately I was able SSH into my box. Once in, however, I can't even create a directory!
Exactly what are the error messages saying? Also, just for kicks and giggles, post the results of:
fdisk -l
Is this a new install? What distro are you using?
Wow! Thanks for all the responses! Here are my replies...
1. Sorry I wasn't clear on ther actual error messages. Here is one example; basically, I get the same "No space left on device" regardless of what I try:
Code:
mkdir: cannot create directory `testdir': No space left on device
2. It is an old installation (Ubuntu 8.10), about a year, pretty much just used as a Subversion and Trac server...
3. After rebooting, I was able to log on in a fail-safe terminal, and by deleting a few files, I was able to do the following, as suggested by several posts I've found:
Code:
sudo touch /forcefsck
Rebooting again, I still have the problem.
4. fdisk -l and mount results
Code:
vree:~$ fdisk -l
Cannot open /dev/sda
Cannot open /dev/sdb
rsg@#vree
vree:~$ mount
/dev/sdb1 on / type ext3 (rw,relatime,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
lrm on /lib/modules/2.6.27-11-generic/volatile type tmpfs (rw,mode=755)
securityfs on /sys/kernel/security type securityfs (rw)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
So it's an INode problem! Okay, I know what INodes are, but I don't know how to manage them. FWIW, I wouldn't think I have that many files, so I would welcome suggestions on the usual suspects, you know, where to look, what generally causes lots of extraneous inodes, etc.
RESOLVED Commands fail with disk full messages, but df says I've got plenty of space
I found my problem! I have been using BackInTime (a poor man's Time Machine) on my workstation, and it was taking snapshots on the server; I haven't constrained it a bit, and so it has generated quite a few files - I'm currently counting them, and it's up to almost 4 million - and counting!
That's what you get with "set and forget" tools! (No, that's not a criticism of BackInTime!).
An inode is a data structure that is associated with each file. With ext3 the max number of inodes is set when the filesystem is created and the only way to increase the number is to reformat. You can not manage them i.e if you run out of inodes you can not create more files. There are other filesystems that can dynamically allocate inodes like jfs, xfs or ext4.
An inode is a data structure that is associated with each file.
Yeah, this I know, but...
Quote:
Originally Posted by michaelk
With ext3 the max number of inodes is set when the filesystem is created and the only way to increase the number is to reformat. You can not manage them i.e if you run out of inodes you can not create more files. There are other filesystems that can dynamically allocate inodes like jfs, xfs or ext4.
Distribution: openSUSE, Raspbian, Slackware. Older: Coherent, MacOS, Red Hat, Big Iron IXs: AIX, Solaris, Tru64
Posts: 2,744
Rep:
Quote:
Originally Posted by rsgrimes
I haven't constrained it a bit, and so it has generated quite a few files - I'm currently counting them, and it's up to almost 4 million - and counting!
That's what you get with "set and forget" tools! (No, that's not a criticism of BackInTime!).
Not being familiar with that tool, I'm wonder whether it is possible to configure it so that you can be emailed a summary of what was backed up/saved? If so, maybe you could put the number of files acted on right into the "Subject:" line you'd get that "In Your Face" reminder to keep track of things.
You can add a cron job to check the disk space, both filespace & inode cnt and email you if you exceed specified values.
You can even use quotas, eg soft limit at warning level, hard limit at full disk.
Quotas have both diskspace and inode settings.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.