模拟Linux磁盘分区有可用空间无可用Inodes时报错:No space left on device
模拟Linux磁盘分区有可用空间无可用Inodes时报错:No space left on device
参考:磁盘文件系统 1.创建测试脚本:
[Oracle@ocm1 ~]$ vi touchfile.sh
#!/bin/bash
for abc in {1..9}
do
touch /boot/test/$abc
done
"touchfile.sh" 5L, 66C written
[root@ocm1 oracle]# cd /boot
[root@ocm1 boot]# mkdir test
[root@ocm1 boot]# ls
config-2.6.18-308.el5 symvers-2.6.32-300.10.1.el5uek.gz
config-2.6.32-300.10.1.el5uek System.map-2.6.18-308.el5
grub System.map-2.6.32-300.10.1.el5uek
initrd-2.6.18-308.el5.img test
initrd-2.6.32-300.10.1.el5uek.img vmlinuz-2.6.18-308.el5
lost found vmlinuz-2.6.32-300.10.1.el5uek
symvers-2.6.18-308.el5.gz
[root@ocm1 boot]# cd -
/home/oracle
[root@ocm1 oracle]# sh touchfile.sh
[root@ocm1 oracle]# cd -
/boot
[root@ocm1 boot]# cd test
[root@ocm1 test]# ls
1 2 3 4 5 6 7 8 9
[root@ocm1 test]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda3 7318528 185460 7133068 3% /
/dev/sda1 26104 50 26054 1% /boot
tmpfs 128334 1 128333 1% /dev/shm
[root@ocm1 boot]# cd /home/oracle/
[root@ocm1 oracle]# vi touchfile.sh
#!/bin/bash
for abc in {10..26110}
do
touch /boot/test/$abc
done
~
"touchfile.sh" 5L, 71C written
事实上此时用df -h可以看到目录下有可用空间,,可是因为没有Inodes,已经无法新建文件了,报错为:No space left on device
[root@ocm1 oracle]# sh touchfile.sh
[root@ocm1 oracle]# sh touchfile.sh
touch: cannot touch `/boot/test/26064': No space left on device
touch: cannot touch `/boot/test/26065': No space left on device
………………………………………………
touch: cannot touch `/boot/test/26109': No space left on device
touch: cannot touch `/boot/test/26110': No space left on device
[root@ocm1 oracle]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 28G 11G 15G 43% /
/dev/sda1 99M 21M 73M 23% /boot
tmpfs 502M 0 502M 0% /dev/shm
[root@ocm1 oracle]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda3 7318528 185460 7133068 3% /
/dev/sda1 26104 26104 0 100% /boot
tmpfs 128334 1 128333 1% /dev/shm
手动执行创建目录和文件命令报同样错误:
[root@ocm1 oracle]# cd /boot/
[root@ocm1 boot]# mkdir a
mkdir: cannot create directory `a': No space left on device
[root@ocm1 boot]# touch abc
touch: cannot touch `abc': No space left on device
本文永久更新链接地址:

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

热门话题

本文讨论了使用MySQL的Alter Table语句修改表,包括添加/删除列,重命名表/列以及更改列数据类型。

InnoDB的全文搜索功能非常强大,能够显着提高数据库查询效率和处理大量文本数据的能力。 1)InnoDB通过倒排索引实现全文搜索,支持基本和高级搜索查询。 2)使用MATCH和AGAINST关键字进行搜索,支持布尔模式和短语搜索。 3)优化方法包括使用分词技术、定期重建索引和调整缓存大小,以提升性能和准确性。

文章讨论了为MySQL配置SSL/TLS加密,包括证书生成和验证。主要问题是使用自签名证书的安全含义。[角色计数:159]

文章讨论了流行的MySQL GUI工具,例如MySQL Workbench和PhpMyAdmin,比较了它们对初学者和高级用户的功能和适合性。[159个字符]

聚集索引和非聚集索引的区别在于:1.聚集索引将数据行存储在索引结构中,适合按主键查询和范围查询。2.非聚集索引存储索引键值和数据行的指针,适用于非主键列查询。

本文讨论了使用Drop Table语句在MySQL中放下表,并强调了预防措施和风险。它强调,没有备份,该动作是不可逆转的,详细介绍了恢复方法和潜在的生产环境危害。

本文讨论了在PostgreSQL,MySQL和MongoDB等各个数据库中的JSON列上创建索引,以增强查询性能。它解释了索引特定的JSON路径的语法和好处,并列出了支持的数据库系统。
