Pur*_*urf 6 linux inode lvm xfs
我在Ubuntu 14.04.1 LTS上的LVM上有一个XFS 分区的服务器设置。将文件复制到主分区时,显示“设备上没有剩余空间”。
df -h显示足够的空间:
/dev/mapper/prod--vg-home 35G 21G 15G 60% /home
Run Code Online (Sandbox Code Playgroud)
我还使用 fallocate 在同一个家庭帐户中几乎完全填充磁盘,以确保配额和其他磁盘空间问题都不相关:
/dev/mapper/prod--vg-home 35G 34G 1.5G 96% /home
Run Code Online (Sandbox Code Playgroud)
df -i还显示足够的 inode:
/dev/mapper/prod--vg-home 36700160 379390 36320770 2% /home
Run Code Online (Sandbox Code Playgroud)
我还在同一个家庭帐户中使用了大量的小随机文件,复制了这个问题:
mkdir 1
cd 1
dd if=/dev/zero of=masterfile bs=10000000 count=1
split -b 10 -a 10 masterfile
cd ..
cp -R 1 2
Run Code Online (Sandbox Code Playgroud)
这再次导致“设备上没有剩余空间”,几乎不需要额外的空间(大约 30MB)并且df -i提到:
/dev/mapper/prod--vg-home 36700160 1310464 35389696 4% /home
Run Code Online (Sandbox Code Playgroud)
我确实在同一台机器上进行了第二次测试(Ubuntu 14.04.1 LTS)。
我创建了一个新的 5 GB逻辑卷,并使用上面的 dd 和 split 过程用小文件填充它。
我收到“设备上没有剩余空间”的消息,其中包含以下可用磁盘空间和 inode:
/dev/mapper/prod--vg-test 5.0G 4.2G 811M 85% /mnt/test
/dev/mapper/prod--vg-test 4257712 937920 3319792 23% /mnt/test
Run Code Online (Sandbox Code Playgroud)
我已经使用 root 权限执行了这个测试,以确保保留的空间在这里仍然无关紧要。
我确实在另一台机器(Debian 2.6.32-5)上进行了第三次测试。
我创建了一个新的 5 GB 逻辑卷,并使用上面的 dd 和 split 过程用小文件填充它。
该过程成功,具有以下可用磁盘空间和 inode:
/dev/mapper/data-test 5.0G 4.2G 909M 83% /mnt/test
/dev/mapper/data-test 4721904 1000005 3721899 22% /mnt/test
Run Code Online (Sandbox Code Playgroud)
我也使用 root 权限执行了这个测试,以确保保留的空间在这里仍然无关紧要。
Does this point at a bug in Ubuntu 14.04.1 LTS?
I did verify the impact of changing the maximum percentage of in odes on the Ubuntu 14.04.1 LTS:
xfs_growfs -m 25 /dev/mapper/prod--vg-home
Run Code Online (Sandbox Code Playgroud)
This amount can easily be decreased and increased.
While experimenting with this setting, I noticed that decreasing it to 3% and increasing it again to 25%, and deleting some files, allows me to add a lot more files again, but still causes the error prior to filling up either storage or inodes.
xfs_info displays:
meta-data=/dev/mapper/prod--vg-home isize=256 agcount=14, agsize=655360 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=9175040, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
Run Code Online (Sandbox Code Playgroud)
Is there any other setting which could cause the "No space left on device" message? Or should I conclude this is a bug?
Thank you
小智 6
xfs_growfs 存在一个错误,它导致 inode 不能正确分布在一个分区中。解决方案是简单地使用 inode64 选项重新挂载。例如,如果这是 /dev/vda1,您将执行以下操作:
mount -o remount,inode64 /dev/vda1
Run Code Online (Sandbox Code Playgroud)
您可以在此处找到有关该错误的更多信息。
| 归档时间: |
|
| 查看次数: |
4444 次 |
| 最近记录: |