莱州市人事网,敬一丹公开质疑打虎,2013郭德纲济公传
日前,同事反馈一个问题:在一个大分区(24t)中使用xfs文件系统,用来做历史文件备份,突然提示没有磁盘空间错误,先检查下:
[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.4m 9.3g 1% /backup
可以看到,不管是物理空间,还是inode,都还有很多余量,那为何还会报告磁盘空间不够呢?
查询了下xfs faq,发现有一段:
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文件系统会把inode存储在磁盘最开始的这1t空间里,如果这部分空间被完全填满了,那么就会出现磁盘空间不足的错误提示了。解决办法就是在挂载时,指定 inode64 选项:
mount -o remount -o noatime,nodiratime,inode64,nobarrier /dev/sdb1 /backup
p.s,磁盘空间小于1t的不用担心这个问题 :)
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!!
点击进行留言回复
相关文章:
-
-
-
应用系统分布式构建运维
应用系统分布式构建运维 1+x初级,项目四 部署主从数据库 基础环境安装 准备两台主机 修改主机名 # hostnamectl set-hos...
[阅读全文]
-
-
Linux环境变量
在bash shell中,环境变量分为两类: 全局变量 局部变量 全局环境变量 全局环境变量对于shell会话和所有生成的子shell都是可见的。例如 ...
[阅读全文]
-
-
-
初步进入Linux世界
初步进入Linux世界 一、Linux目录介绍 1.树型目录结构 Linux文件系统采用了多级目录的树型层次结构管理文件。树型结构的最上层是根目录,用/...
[阅读全文]
-
Linux常用命令(详细)
Linux常用命令 一、控制台相关命令 控制台命令就是指通过字符界面输入的可以操作系统的命令。我们现在要了解的是基于Linux操作系统的基本控制台命令。...
[阅读全文]
-
-
网友评论