Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

If an ext3 filesystem has no space left on it, will a read operation still succeed?

share|improve this question

3 Answers 3

Read (man 2 read) operations will still be able read data even though the filesystem is full. However, write operations will return errors. Specifically, the write system call (man 2 write) will return the ENOSPC error if the device is full.

The filesystem itself should be fine but certain programs might start to fail if they need to write to the partition that is full. So it always best to monitor the amount of free space on filesystems.

Also note that the FS is not completely full usually when filled with users data since root has 5% reserved. So you can still log in as root and perform some operations that require write access. The reason for this is so programs running as root won't fail when a user fills up the space.

share|improve this answer
    
till when read data ? –  pankaj Oct 14 '10 at 10:24
2  
I have absolutely no idea what you're trying to say. –  pauska Oct 14 '10 at 10:26
1  
@pankaj: It will read the data until the hard drive dies. Filesystem getting full does not harm read operations in any way or in any time period, but the write operations will fail. But, please clarify your question a lot if this does not answer you. –  Janne Pikkarainen Oct 14 '10 at 10:54
1  
Note that the FS is not completely full if filled with users data, root has 5% reserved. So you can still log in as root and perform some operations that require write access. If the FS is /, you better speed up the disk upgrade.... –  ring0 Oct 14 '10 at 11:10
    
Thx kyle, ur answer cleard my doubts. –  pankaj Oct 15 '10 at 3:41

Low level read will still work, however a lot of tools you use to look at files (e.g editors) create a backup of the file. The backup will fail if there is no space... Likewise for any tool that write to a log file.

share|improve this answer

I'm not sure you ask because you observed that behavior or if it is just a theoretical question.

Anyway, assuming a read operation failed on a full ext3, one possible explanation might be the file system and its journal are full so the OS can't update the file meta data and precisely its access time. The read might fail in such a situation if access time isn't disabled. I have no ext3 to test this so don't take this as a fact, just a wild guess.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.