5

I am using XFS on small HDD (/dev/sdb1, less than 150G) and storing many small files (-32KB). df -h and -i show that it has available space.

# df -hv
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             127G   19G  102G  16% /
tmpfs                  16G     0   16G   0% /lib/init/rw
udev                   16G  168K   16G   1% /dev
tmpfs                  16G     0   16G   0% /dev/shm
/dev/sda1              99M   20M   75M  21% /boot
/dev/sdb1             136G  123G   14G  91% /mnt/sdb1
# df -iv
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sda3            8421376   36199 8385177    1% /
tmpfs                4126158       5 4126153    1% /lib/init/rw
udev                 4124934     671 4124263    1% /dev
tmpfs                4126158       1 4126157    1% /dev/shm
/dev/sda1              26112     222   25890    1% /boot
/dev/sdb1            24905120 11076608 13828512   45% /mnt/sdb1

However I got No space left on device error.

# touch /mnt/sdb1/test
touch: cannot touch `/mnt/sdb1/test': No space left on device

I think inode64 issue is not related to this case because drive is less than 1TB and df -i shows that there are free inodes. I unmounted and mounted with -o inode64 but got the same error.

xfs_repair does not report any problem. xfs_info shows drive information as follows.

# xfs_info /dev/sdb1
meta-data=/dev/sdb1              isize=1024   agcount=16, agsize=2227764 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=35644210, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal               bsize=4096   blocks=17404, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

Any ideas? Thanks!

--

I found this is the same problem as described in the following discussion.

[http://comments.gmane.org/gmane.comp.file-systems.xfs.general/41031][1]

There is no freespace available for inode in my HDD.

# xfs_db -r "-c freesp -s" /dev/sdb1
   from      to extents  blocks    pct
      1       1 1105980 1105980  32.01
      2       3  528180 1195803  34.61
      4       7  203982 1153467  33.38
3
  • If you have any test files you are willing to remove: can you even remove files, or does even that nag you "No space left on device"? Oct 6, 2012 at 12:47
  • Yes. I moved some files to another drive. That made freespace for new inodes.
    – beketa
    Oct 7, 2012 at 4:30
  • I noticed your free space percentages are in the 30s there. osvault.blogspot.com/2011/03/… says If the total free blocks in each Allocation Group (AG) is less than about 40, then you can't create inodes in that allocation group. Feb 23, 2016 at 15:09

2 Answers 2

3

Are you sure this is an inode problem? I notice that the space consummed is over 90%. This leads me to wonder if this is one of these "root" reserved spaces (I know that ext2/3/4 has this), or if 10% is necessary to be free for some reason for the XFS filesystem to work.

2
  • I don't think it is caused by reserved space. I did a quick test using the same capacity drive. I made 141 1GB files. That made disk usage to be 100%. But still I can make a new file by touch. $ df /dev/sdc1 Filesystem 1K-blocks Used Available Use% Mounted on /dev/sdc1 142507224 141297208 1210016 100% /srv/node/sdc1 $ df -i /dev/sdc1 Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sdc1 1210208 145 1210063 1% /srv/node/sdc1
    – beketa
    Oct 11, 2012 at 21:54
  • Well it was just something I thought of.
    – mdpc
    Oct 11, 2012 at 22:02
1

Have you tried running a fsck to see if it frees up available inodes.

If you interrupt a mv or rm then it can do what you describe.

1
  • No I have not tried fsck. I will try it if I encounter the same situation though I hope I will not.
    – beketa
    Oct 7, 2012 at 4:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .