模擬LINUX磁碟分割槽有可用空間無可用Inodes時報錯:No space left on device
參考:磁碟檔案系統
1.建立測試指令碼:
[oracle@ocm1 ~]$ vi touchfile.sh
#!/bin/bashfor abc in {1..9}
do
touch /boot/test/$abc
done
"touchfile.sh" 5L, 66C written
2.建立測試目錄、測試指令碼
[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
3.檢視當前/boot目錄可用Inodes數量
[root@ocm1 test]# df -iFilesystem 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
4.修改指令碼,直接將可用Inodes用光
[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
5.執行指令碼,指令碼未執行完,即報錯:No space left on device,
事實上此時用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
相關文章
- 沒有磁碟空間 No space left on devicedev
- No space left on devicedev
- linux建立新分割槽擴充套件磁碟空間Linux套件
- win10分割槽磁碟空間不足怎麼回事_win10分割槽磁碟沒有足夠空間如何處理Win10
- 關於“No space left on device的原因”dev
- Linux系統中如何檢視磁碟可用空間?常用命令有哪些?Linux
- Linux系統檢視磁碟可用空間的5個命令Linux
- Linux 磁碟與磁碟分割槽Linux
- Linux-x86_64 Error: 28: No space left on device問題LinuxErrordev
- ORA-27102: out of memory Linux Error: 28: No space left on deviceLinuxErrordev
- write /usr/include/openssl/cms.h: no space left on devicedev
- openGauss 出現-Error-No-space-left-on-device-提示Errordev
- 程式的虛擬地址空間——NULL指標分割槽Null指標
- 虛擬塊硬碟,新增點swap分割槽空間(轉)硬碟
- linux磁碟分割槽講解Linux
- linux 磁碟分割槽_luks cryptsetupLinux
- java踩坑之java.io.IOException: No space left on deviceJavaExceptiondev
- Linux系統磁碟和分割槽有哪些命令呢?Linux
- 交通工程跨界思考:何為無人駕駛模擬中的交通流模擬以及可用平臺有哪些?
- 【Linux】MBR磁碟分割槽表只能有四個分割槽?Linux
- Linux 磁碟分割槽和掛載Linux
- linux 新增磁碟 分割槽掛載Linux
- Linux核心之磁碟和分割槽Linux
- linux 磁碟分割槽掛載-fdiskLinux
- linux磁碟分割槽基本命令Linux
- Linux下磁碟分割槽,fdisk,mkfsLinux
- Linux精講——fdisk磁碟分割槽Linux
- linux下磁碟分割槽的案例Linux
- 為Linux虛擬機器增加磁碟空間Linux虛擬機
- Docker啟動出現"No space left on device" 或者 docker日誌太多導致磁碟佔滿問題Dockerdev
- Win10系統此電腦中磁碟沒有顯示可用空間容量如何解決Win10
- 硬碟空間的管理和分割槽硬碟
- boot分割槽剩餘空間不足boot
- 虛擬機器增加磁碟分割槽的大小虛擬機
- Apache啟動報錯No space left on device: AH00023該怎麼解決Apachedev
- 分割槽儲存管理模擬實驗
- Linux 虛擬機器擴充套件磁碟空間Linux虛擬機套件
- linux新增新磁碟和建立分割槽Linux