Linux uses xfs when there is no disk space. How to deal with

  

When using Linux system operation, there will be no disk space prompt when using xfs file system, but there is space left, so encounter this How to solve the situation? The following small series will introduce you to the use of xfs file system in Linux is a solution to the problem of no disk space error.

A few days ago, a colleague feedback problem: Use a large partition (24T) in the xfs file system, used for file backup history, suddenly prompted no disk space error, first check under:

The code is as follows:

[root@imysql ~]# df -hT

Filesystem Type Size Used Avail Use% Mounted on

/dev/sdb1 xfs 19T 16T 2.4T 88% /backup "/p" "p"[root@imysql ~]# df -hi

Filesystem Inodes IUsed IFree IUse% Mounted on

/dev/sdb1 9.3G 3.4 M 9.3G 1% /backup

It can be seen that there is still a lot of margin in both physical space and inode. So why is it that the disk space is not enough?

Query the XFS FAQ and find that there is a paragraph:

The code is as follows:

Q: What is the inode64 mount option for? "/p" "p" By default, with 32bit inodes, XFS places inodes only in the first 1TB of a disk. If you have a disk with 100TB, all inodes will be stuck in the first TB. This can lead to strange things Like “disk full
Mount options for filesystems 》1TB. Inodes will then be placed in the location where their data is, minimizing disk seeks.

Beware that some old programs might have problems reading 64bit inodes, especially over NFS. Your editor used inode64 For over a year with recent (openSUSE 11.1 and higher) distributions using NFS and Samba without any corruptions, so that might be a recent enough distro.

The idea is that the xfs file system will store the inode at the very beginning of the disk. In this 1T space, if this part of the space is completely filled, then it will Insufficient disk space error now suggests. The solution is to specify the inode64 option when mounting:

The code is as follows:

mount -o remount -o noatime,nodiratime,inode64,nobarrier /dev/sdb1 /backup

PS, disk space is less than 1T do not worry about this problem :)

The above is the use of xfs file system under Linux prompts no disk space error solution, if you have the error message, but If you don't know what to do, try this method.

Copyright © Windows knowledge All Rights Reserved