我想知道谁有过这样的经历。我们正在使用无盘 Linux 服务器。在我们使用ramdisk之前,最近我们正在尝试用ramfs做一个无盘服务器,并且我们成功创建了rootfs镜像并启动了服务器。
那么这里的问题是我们无法安装任何东西,因为 yum 抱怨没有磁盘空间。确实没有磁盘因此没有空间,但是对于 ramfs,我们可以更新 linux 配置来绕过这个问题吗?
df -kh /
Filesystem Size Used Avail Use% Mounted on
- 0 0 0 - /
yum install w3m -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Excluding Packages from Extra Packages for Enterprise Linux 5 - x86_64
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package w3m.x86_64 0:0.5.1-18.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================
Package Arch Version Repository Size
====================================================================================================================
Installing:
w3m x86_64 0.5.1-18.el5 os 1.1 M
Transaction Summary
====================================================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 1.1 M
Downloading Packages:
Error Downloading Packages:
w3m-0.5.1-18.el5.x86_64: Insufficient space in download directory /var/cache/yum/os/packages
* free 0
* needed 1.1 M
更新:我检查了 yum 代码,它使用 statvfs 系统调用来检查磁盘空间。所以除了创建一个“真实磁盘”之外,我不知道如何绕过这个问题。