系統(tǒng)之家 - 系統(tǒng)光盤下載網(wǎng)站!

當(dāng)前位置:系統(tǒng)之家 > 系統(tǒng)教程 > Linux提示沒有磁盤空間

Linux下使用xfs時(shí)提示沒有磁盤空間的情況該如何處理

時(shí)間:2014-12-18 15:40:13 作者:qipeng 來源:系統(tǒng)之家 1. 掃描二維碼隨時(shí)看資訊 2. 請(qǐng)使用手機(jī)瀏覽器訪問: https://m.xitongzhijia.net/xtjc/20141218/32898.html 手機(jī)查看 評(píng)論

  在進(jìn)行Linux系統(tǒng)操作的時(shí)候,使用xfs文件系統(tǒng)時(shí)會(huì)出現(xiàn)沒有磁盤空間提示,可空間明明還有剩,那么遇到這種情況該如何解決呢?下面小編就給大家介紹下Linux中使用xfs文件系統(tǒng)是出現(xiàn)沒有磁盤空間錯(cuò)誤提示的解決方法。

 Linux下使用xfs時(shí)提示沒有磁盤空間的情況該如何處理

  日前,同事反饋一個(gè)問題:在一個(gè)大分區(qū)(24T)中使用xfs文件系統(tǒng),用來做歷史文件備份,突然提示沒有磁盤空間錯(cuò)誤,先檢查下:

  代碼如下:

 。踨oot@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.4M 9.3G 1% /backup

  可以看到,不管是物理空間,還是inode,都還有很多余量,那為何還會(huì)報(bào)告磁盤空間不夠呢?

  查詢了下XFS FAQ,發(fā)現(xiàn)有一段:

  代碼如下:

  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” when you still have plenty space free, but there‘s no more place in the first TB to create a new inode. Also, performance sucks.

  To come around this, use the inode64 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.

  大意就是xfs文件系統(tǒng)會(huì)把inode存儲(chǔ)在磁盤最開始的這1T空間里,如果這部分空間被完全填滿了,那么就會(huì)出現(xiàn)磁盤空間不足的錯(cuò)誤提示了。解決辦法就是在掛載時(shí),指定 inode64 選項(xiàng):

  代碼如下:

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

  P.S,磁盤空間小于1T的不用擔(dān)心這個(gè)問題 :)

  上面就是Linux下使用xfs文件系統(tǒng)提示沒有磁盤空間錯(cuò)誤的解決方法介紹了,如果你出現(xiàn)了該錯(cuò)誤提示,而又不知道該如何處理的話,不妨試試該方法吧。

標(biāo)簽 磁盤空間

發(fā)表評(píng)論

0

沒有更多評(píng)論了

評(píng)論就這些咯,讓大家也知道你的獨(dú)特見解

立即評(píng)論

以上留言僅代表用戶個(gè)人觀點(diǎn),不代表系統(tǒng)之家立場(chǎng)

其他版本軟件

熱門教程

人氣教程排行

Linux系統(tǒng)推薦

官方交流群 軟件收錄