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.

When I login with root, and run "mkdir test", the system says "No space left on device". But if I login with other user, it goes well.

[/root]df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/da0s1a    496M    411M     45M    90%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/da0s1e    496M     12K    456M     0%    /tmp
/dev/da0s1f     57G    878M     51G     2%    /usr
/dev/da0s1d    4.3G    215M    3.8G     5%    /var

[/root]df -i
Filesystem  1K-blocks    Used    Avail Capacity iused   ifree %iused  Mounted on
/dev/da0s1a    507630  420824    46196    90%   65790       0  100%   /
devfs               1       1        0   100%       0       0  100%   /dev
/dev/da0s1e    507630      12   467008     0%       6   65784    0%   /tmp
/dev/da0s1f  59252554 1261724 53250626     2%  164917 7513033    2%   /usr
/dev/da0s1d   4553102   91766  4097088     2%   22973  565825    4%   /var


[/root]mkdir test

/: create/symlink failed, no inodes free
mkdir: .ssh: No space left on device
share|improve this question

2 Answers 2

up vote 6 down vote accepted

Your root user's home is on the root filesystem (/). That filesystem is not full, so I have to assume you are out of inodes. Check the output of df -i. Here's a reference about how to diagnose this and what you can do to fix it. Hint: you need to move files to another filesystem or create a new filesystem to use.

share|improve this answer
    
I think you are right! –  larry Feb 13 '11 at 6:03
    
hi Phil, could you please look over my "df -i" ? –  larry Feb 13 '11 at 7:55
    
I hava edited my question . –  larry Feb 13 '11 at 7:55
    
Yes, you are out of inodes. You can only increase them by recreating the filesystem. So you either have to move files to another filesystem to free up inodes, or reinstall your system. –  Phil Hollenback Feb 13 '11 at 8:24
3  
No, every line of the df output is a different filesystem. /usr is completely separate from /. –  Phil Hollenback Feb 13 '11 at 10:10

It sounds like (a) your root filesystem is full, and (b) non-root users have home directories on a different filesystem. What does df -h show? The output will look something like this:

$ df -h
Filesystem      Size    Used   Avail Capacity  Mounted on
/dev/ad10s3a    496M    279M    177M    61%    /
devfs           1.0K    1.0K      0B   100%    /dev
/dev/ad10s3e    496M    4.4M    452M     1%    /tmp
/dev/ad10s3f    363G    7.4G    327G     2%    /usr
/dev/ad10s3d    4.8G    151M    4.3G     3%    /var

The "capacity" column is how much space is used as a percentage.

share|improve this answer
    
I found that there is a link from other user(/home/why) to /usr except root dir –  larry Feb 13 '11 at 4:30
    
Home is often its own partition. Given your partioning /usr is far oversized, and a good location for home directories. When faced with this setup I would symlink the home directories to a directory under /usr. /usr/home would be my choice with /home replaced with a symlink to /usr/home. This would be a relatively transparent change. –  BillThor Feb 13 '11 at 5:08
1  
@BillThor, I'm going to assume you have never used FreeBSD before at least not much. By default home directories are /usr/home/${USER}. With the exception of root who's home is /root. /home is a symlink to /usr/home. In addition /usr is used for many other purposes including all user installed software, and the ports tree to name a few. The /usr partition should in 90% of cases be the largest partition. –  Tarrant Feb 13 '11 at 5:19
    
@Wergan I haven't used FreeBSD for several years, and not much then. The systems I have most experience with use /home or /homes either directly or symlinked from somewhere else. /usr/home is a rational location if it isn't in its own partition. –  BillThor Feb 13 '11 at 5:33

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.