FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 05-08-2010, 10:46 PM
Crístian Viana
 
Default can't create file but disk isn't full

it doesn't seem so :-(
Filesystem * * * * * *Inodes * IUsed * IFree IUse% Mounted on/dev/sda6 * * * * * *20856832 *108698 20748134 * *1% /home
I didn't know that the filesystem could run out of inodes before the disk space itself! thanks for the information :-)


On Sat, May 8, 2010 at 4:07 PM, Nikos Chantziaras <realnc@arcor.de> wrote:


On 05/08/2010 09:21 PM, Crístian Viana wrote:


hi everyone,



something weird is happening on my system. I can't create new files, it

says "No space left on device", but the disk has several gigabytes of

free space!




The filesystem probably ran out of inodes. *"df -i /home" will show inode usage. *This can happen when you have many small files; they eat inodes but not storage space.
 
Old 05-08-2010, 11:00 PM
Alan McKinnon
 
Default can't create file but disk isn't full

You probably have files opened that have since been deleted. du doesn't report
them as the names are no longer in the directory and df doesn't report them as
they are pending deletion once the last handle to them is closed.

It's a nasty thing to find. Run this:

lsof | grep deleted

You should find a ton of junk temp files (they will go away when you log out).
Look for big numbers in column 8




On Sunday 09 May 2010 00:46:28 Crístian Viana wrote:
> it doesn't seem so :-(
>
> Filesystem Inodes IUsed IFree IUse% Mounted on
> /dev/sda6 20856832 108698 20748134 1% /home
>
> I didn't know that the filesystem could run out of inodes before the disk
> space itself! thanks for the information :-)
>
> On Sat, May 8, 2010 at 4:07 PM, Nikos Chantziaras <realnc@arcor.de> wrote:
> > On 05/08/2010 09:21 PM, Crístian Viana wrote:
> >> hi everyone,
> >>
> >> something weird is happening on my system. I can't create new files, it
> >> says "No space left on device", but the disk has several gigabytes of
> >> free space!
> >
> > The filesystem probably ran out of inodes. "df -i /home" will show inode
> > usage. This can happen when you have many small files; they eat inodes
> > but not storage space.

--
alan dot mckinnon at gmail dot com
 
Old 05-08-2010, 11:39 PM
Crístian Viana
 
Default can't create file but disk isn't full

I shutdown this computer everyday, those temp files shouldn't be alive for months.
I ran lsof | grep deleted and it returned 132 lines, the biggest number being*2032226 (2 MB?), belonging to the Chromium browser process. even if every line had that value (which is not), that would sum up 264 MB, but the difference of reported/real free space is way bigger than that.


changing the filesystem back to ext3 can solve this problem? it was ext3 before I've changed it to ext4 some months ago.

On Sat, May 8, 2010 at 8:00 PM, Alan McKinnon <alan.mckinnon@gmail.com> wrote:


You probably have files opened that have since been deleted. du doesn't report

them as the names are no longer in the directory and df doesn't report them as

they are pending deletion once the last handle to them is closed.



It's a nasty thing to find. Run this:



lsof | grep deleted



You should find a ton of junk temp files (they will go away when you log out).

Look for big numbers in column 8









On Sunday 09 May 2010 00:46:28 Crístian Viana wrote:

> it doesn't seem so :-(

>

> Filesystem * * * * * *Inodes * IUsed * IFree IUse% Mounted on

> /dev/sda6 * * * * * *20856832 *108698 20748134 * *1% /home

>

> I didn't know that the filesystem could run out of inodes before the disk

> space itself! thanks for the information :-)

>

> On Sat, May 8, 2010 at 4:07 PM, Nikos Chantziaras <realnc@arcor.de> wrote:

> > On 05/08/2010 09:21 PM, Crístian Viana wrote:

> >> hi everyone,

> >>

> >> something weird is happening on my system. I can't create new files, it

> >> says "No space left on device", but the disk has several gigabytes of

> >> free space!

> >

> > The filesystem probably ran out of inodes. *"df -i /home" will show inode

> > usage. *This can happen when you have many small files; they eat inodes

> > but not storage space.



--

alan dot mckinnon at gmail dot com
 
Old 05-09-2010, 12:07 AM
Alan McKinnon
 
Default can't create file but disk isn't full

On Sunday 09 May 2010 01:39:54 Crístian Viana wrote:
> I shutdown this computer everyday, those temp files shouldn't be alive for
> months.
>
> I ran lsof | grep deleted and it returned 132 lines, the biggest number
> being 2032226 (2 MB?), belonging to the Chromium browser process. even if
> every line had that value (which is not), that would sum up 264 MB, but the
> difference of reported/real free space is way bigger than that.
>
> changing the filesystem back to ext3 can solve this problem? it was ext3
> before I've changed it to ext4 some months ago.

I'm fresh out of ideas on this one.

As I understand it, downgrading from ext4 to ext3 normally doesn't work out.
There are features in ext4 that make it very attractive and most folk enable
them, but they are incompatible with ext3. Or so I have read.

I would boot into a rescue system and run an fsck on that volume if you have
not already done so.





>
> On Sat, May 8, 2010 at 8:00 PM, Alan McKinnon
<alan.mckinnon@gmail.com>wrote:
> > You probably have files opened that have since been deleted. du doesn't
> > report
> > them as the names are no longer in the directory and df doesn't report
> > them as
> > they are pending deletion once the last handle to them is closed.
> >
> > It's a nasty thing to find. Run this:
> >
> > lsof | grep deleted
> >
> > You should find a ton of junk temp files (they will go away when you log
> > out).
> > Look for big numbers in column 8
> >
> > On Sunday 09 May 2010 00:46:28 Crístian Viana wrote:
> > > it doesn't seem so :-(
> > >
> > > Filesystem Inodes IUsed IFree IUse% Mounted on
> > > /dev/sda6 20856832 108698 20748134 1% /home
> > >
> > > I didn't know that the filesystem could run out of inodes before the
> > > disk space itself! thanks for the information :-)
> > >
> > > On Sat, May 8, 2010 at 4:07 PM, Nikos Chantziaras <realnc@arcor.de>
> >
> > wrote:
> > > > On 05/08/2010 09:21 PM, Crístian Viana wrote:
> > > >> hi everyone,
> > > >>
> > > >> something weird is happening on my system. I can't create new files,
> >
> > it
> >
> > > >> says "No space left on device", but the disk has several gigabytes
> > > >> of free space!
> > > >
> > > > The filesystem probably ran out of inodes. "df -i /home" will show
> >
> > inode
> >
> > > > usage. This can happen when you have many small files; they eat
> > > > inodes but not storage space.
> >
> > --
> > alan dot mckinnon at gmail dot com

--
alan dot mckinnon at gmail dot com
 
Old 05-09-2010, 01:17 AM
Johannes Kimmel
 
Default can't create file but disk isn't full

On 05/09/2010 01:39 AM, Crístian Viana wrote:

I shutdown this computer everyday, those temp files shouldn't be alive
for months.

I ran lsof | grep deleted and it returned 132 lines, the biggest number
being 2032226 (2 MB?), belonging to the Chromium browser process. even
if every line had that value (which is not), that would sum up 264 MB,
but the difference of reported/real free space is way bigger than that.

changing the filesystem back to ext3 can solve this problem? it was ext3
before I've changed it to ext4 some months ago.

On Sat, May 8, 2010 at 8:00 PM, Alan McKinnon <alan.mckinnon@gmail.com
<mailto:alan.mckinnon@gmail.com>> wrote:

You probably have files opened that have since been deleted. du
doesn't report
them as the names are no longer in the directory and df doesn't
report them as
they are pending deletion once the last handle to them is closed.

It's a nasty thing to find. Run this:

lsof | grep deleted

You should find a ton of junk temp files (they will go away when you
log out).
Look for big numbers in column 8




On Sunday 09 May 2010 00:46:28 Crístian Viana wrote:
> it doesn't seem so :-(
>
> Filesystem Inodes IUsed IFree IUse% Mounted on
> /dev/sda6 20856832 108698 20748134 1% /home
>
> I didn't know that the filesystem could run out of inodes before
the disk
> space itself! thanks for the information :-)
>
> On Sat, May 8, 2010 at 4:07 PM, Nikos Chantziaras
<realnc@arcor.de <mailto:realnc@arcor.de>> wrote:
> > On 05/08/2010 09:21 PM, Crístian Viana wrote:
> >> hi everyone,
> >>
> >> something weird is happening on my system. I can't create new
files, it
> >> says "No space left on device", but the disk has several
gigabytes of
> >> free space!
> >
> > The filesystem probably ran out of inodes. "df -i /home" will
show inode
> > usage. This can happen when you have many small files; they
eat inodes
> > but not storage space.

--
alan dot mckinnon at gmail dot com




this is unlikely, but can you create files as root? ext filesystems
reserve a certain amount of space for root use only. you can change this
with tune2fs if necessary.
 
Old 05-09-2010, 01:48 AM
Nikos Chantziaras
 
Default can't create file but disk isn't full

On 05/09/2010 01:46 AM, Crístian Viana wrote:

it doesn't seem so :-(

Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda6 20856832 108698 20748134 1% /home

I didn't know that the filesystem could run out of inodes before the
disk space itself! thanks for the information :-)


Long shot, but check if root can write files. If yes, it probably means
your reserved block count is a bit high (default is 5% I believe). The
reserved block count is a mechanism that disallows further writes to the
filesystem if it gets too full, and only root can keep writing.


If that's your problem, the reserved block count can be changed with the
tune2fs tool. To set it to, say 2%, you would run:


tune2fs -m 2 /dev/sda6

I don't know if it's safe to do this while the filesystem is mounted.
To play it safe, go to single user mode, umount /home, and only then run
the above command.
 
Old 05-09-2010, 10:39 PM
Crístian Viana
 
Default can't create file but disk isn't full

root can create new files! I created a big file with the remaining 17 GB logged in with root. I'll run this tune2fs later, before shutting down the machine.
what exactly is this reserved block count? is it about the number of inodes? does that mean that, by default, regular users can only use 95% of the inodes? and why did I use all these inodes? I don't think I have that many small files on this partition...



On Sat, May 8, 2010 at 10:48 PM, Nikos Chantziaras <realnc@arcor.de> wrote:


On 05/09/2010 01:46 AM, Crístian Viana wrote:


it doesn't seem so :-(



Filesystem * * * * * *Inodes * IUsed * IFree IUse% Mounted on

/dev/sda6 * * * * * *20856832 *108698 20748134 * *1% /home



I didn't know that the filesystem could run out of inodes before the

disk space itself! thanks for the information :-)




Long shot, but check if root can write files. *If yes, it probably means your reserved block count is a bit high (default is 5% I believe). *The reserved block count is a mechanism that disallows further writes to the filesystem if it gets too full, and only root can keep writing.





If that's your problem, the reserved block count can be changed with the tune2fs tool. *To set it to, say 2%, you would run:



*tune2fs -m 2 /dev/sda6



I don't know if it's safe to do this while the filesystem is mounted. To play it safe, go to single user mode, umount /home, and only then run the above command.
 
Old 05-10-2010, 03:48 PM
Willie Wong
 
Default can't create file but disk isn't full

On Sun, May 09, 2010 at 07:39:01PM -0300, Crístian Viana wrote:
> what exactly is this reserved block count? is it about the number of inodes?
> does that mean that, by default, regular users can only use 95% of the
> inodes? and why did I use all these inodes? I don't think I have that many
> small files on this partition...

When the filesystem fills up, services can start failing left and
right because they cannot write logs, cannot write temp files, etc. At
this point human intervention is necessary: root has to log in and
clear out the disk. But if the $ROOT filesystem is completely full,
one may not even be able to log in and/or that one cannot do any sort
of maintenance that is needed. So you have some sort of circularity.
(In which case you have to reboot, perhaps using another medium...)

The way out is to reserve some breathing room for root so that when
everybody else is having problems he can still get in and fix the
problem.

The 5% is historical from days when disks are much smaller. If you
have a sensible partition scheme you only really need to reserve the
blocks on the $ROOT filesystem. If the partition in question (IIRC) is
only for /home, then you can just turn off the reserved blocks all
together.

Cheers,

W
--
Willie W. Wong wwong@math.princeton.edu
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire
et vice versa ~~~ I. Newton
 
Old 05-11-2010, 03:15 AM
Crístian Viana
 
Default can't create file but disk isn't full

thanks! I'll set it to 0% then.

On Mon, May 10, 2010 at 12:48 PM, Willie Wong <wwong@math.princeton.edu> wrote:


On Sun, May 09, 2010 at 07:39:01PM -0300, Crístian Viana wrote:

> what exactly is this reserved block count? is it about the number of inodes?

> does that mean that, by default, regular users can only use 95% of the

> inodes? and why did I use all these inodes? I don't think I have that many

> small files on this partition...



When the filesystem fills up, services can start failing left and

right because they cannot write logs, cannot write temp files, etc. At

this point human intervention is necessary: root has to log in and

clear out the disk. But if the $ROOT filesystem is completely full,

one may not even be able to log in and/or that one cannot do any sort

of maintenance that is needed. So you have some sort of circularity.

(In which case you have to reboot, perhaps using another medium...)



The way out is to reserve some breathing room for root so that when

everybody else is having problems he can still get in and fix the

problem.



The 5% is historical from days when disks are much smaller. If you

have a sensible partition scheme you only really need to reserve the

blocks on the $ROOT filesystem. If the partition in question (IIRC) is

only for /home, then you can just turn off the reserved blocks all

together.



Cheers,



W

--

Willie W. Wong * * * * * * * * * * * * * * * * * * wwong@math.princeton.edu

Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire

* * * * et vice versa * ~~~ *I. Newton
 
Old 05-12-2010, 10:25 PM
Alex Schuster
 
Default can't create file but disk isn't full

Willie Wong writes:

> When the filesystem fills up, services can start failing left and
> right because they cannot write logs, cannot write temp files, etc. At
> this point human intervention is necessary: root has to log in and
> clear out the disk. But if the $ROOT filesystem is completely full,
> one may not even be able to log in and/or that one cannot do any sort
> of maintenance that is needed. So you have some sort of circularity.
> (In which case you have to reboot, perhaps using another medium...)
>
> The way out is to reserve some breathing room for root so that when
> everybody else is having problems he can still get in and fix the
> problem.
>
> The 5% is historical from days when disks are much smaller. If you
> have a sensible partition scheme you only really need to reserve the
> blocks on the $ROOT filesystem. If the partition in question (IIRC) is
> only for /home, then you can just turn off the reserved blocks all
> together.

Isn't another purpose of those 5% the reduction of fragmentation that
occurs more when there is few free space left? Although I also reduce ift
on very large partitions. But I never set it to exactly zero.

Wonko
 

Thread Tools




All times are GMT. The time now is 07:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org