LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Moving a file into a large directory: "No space left on device" (https://www.linuxquestions.org/questions/linux-general-1/moving-a-file-into-a-large-directory-no-space-left-on-device-668715/)

Jimantha 09-09-2008 01:12 PM

Moving a file into a large directory: "No space left on device"
 
Hi,

I have a large directory with about 7 million small files on an ext3 partition. I'm trying to move one more file into the directory, but I get a "No space left on device" error, even though there is sufficient space (the file is less than 1K):

Filesystem 1K-blocks Used Available Use% Mounted on
1032123136 963056860 37608996 97%

The weird this is that if I rename the file, I can successfully move it (though some filenames don't work -- the length of the filename doesn't seem to make a difference). Perhaps there's some problem related to indexing the directory? Has anyone run into this before?

BTW, there are plenty of i-nodes left for the file system.

-Jimantha

jailbait 09-09-2008 04:02 PM

I think that you should run fsck against the file system to see if the file system is damaged in some way.

----------------------
Steve Stites

Valery Reznic 09-09-2008 11:40 PM

Quote:

Originally Posted by Jimantha (Post 3274811)
Hi,

I have a large directory with about 7 million small files on an ext3 partition. I'm trying to move one more file into the directory, but I get a "No space left on device" error, even though there is sufficient space (the file is less than 1K):

Filesystem 1K-blocks Used Available Use% Mounted on
1032123136 963056860 37608996 97%

The weird this is that if I rename the file, I can successfully move it (though some filenames don't work -- the length of the filename doesn't seem to make a difference). Perhaps there's some problem related to indexing the directory? Has anyone run into this before?

BTW, there are plenty of i-nodes left for the file system.

-Jimantha

When you move file from one directory to another both directory should be changed - from the source dir record about the file should be removed and added to the target directory. And adding something to directory may require some space. Your filesystem is almost full. Usually last 5% of the filesystem reserved for root's usage only. Did you try move file as root or as regular user ?


All times are GMT -5. The time now is 01:17 AM.