suse构造磁盘空间满的测试环境
时间:2022-03-24 02:31:09
使用suse的ramdisk,来挂接虚拟磁盘分区,然后通过填满虚拟磁盘分区来实现磁盘满环境的条件
ramdisk是操作系统自带的一种内存块设备,这种设备的列表可以用ls /dev/ram*来列出
复制代码代码如下:
# ls /dev/ram*
/dev/ram /dev/ram1 /dev/ram3 /dev/ram5 /dev/ram7
/dev/ram0 /dev/ram2 /dev/ram4 /dev/ram6 /dev/ramdisk
我们选择一个没有使用的ramdisk,假设为ram2,然后对它创建文件系统。
复制代码代码如下:
mkfs ext3 /dev/ram2
接下来将它像普通文件系统一样,挂接到目录下即可
复制代码代码如下:
# mkdir /tmp/fs
# mount /dev/ram2 /tmp/fs
接下来,将需要构造写异常的软件文件和目录链接到虚拟磁盘分区,/tmp/fs下,然后设法将/tmp/fs填满(例如使用dd命令产生一个大文件。),就可以进行异常测试了,不影响他人使用
suse系统默认一个ramdisk大小为128M,对于大部分情况来说,只要合理借助符号链接,基本上能够满足要求。
使用此方法,可以快速的解决磁盘满测试的环境问题。
标签:suse,构造磁盘空间
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Win7系统提示“word以安全模式启动”如何解决?
2023-08-04 05:11:31
![](https://img.aspxhome.com/file/2023/5/a315532_0s.jpg)
wps表格怎么把重要数字隐藏用星号显示?
2022-10-01 00:04:38
![](https://img.aspxhome.com/file/2023/5/a166835_0s.jpg)
word文档中怎么画图 word文档中画图方法
2023-11-12 17:04:45
![](https://img.aspxhome.com/file/2023/2/17802_0s.jpg)
wps表格如何将一列分成多列
2023-07-26 01:11:55
![](https://img.aspxhome.com/file/2023/5/53575_0s.jpg)
wps office图片怎么转Excel表格
2022-08-26 23:33:13
![](https://img.aspxhome.com/file/2023/4/a168034_0s.png)
word如何使用自带程序翻译文档
2023-09-30 23:56:46
wps在线模板怎么关闭?wps自带在线模板关闭教程
2023-11-30 18:20:09
![](https://img.aspxhome.com/file/2023/0/a170790_0s.jpg)
Word文档中网格线是虚的若要打印网格线有哪些方法?
2023-11-29 19:57:09
![](https://img.aspxhome.com/file/2023/4/18724_0s.jpg)
Excel中数字进行相除的操作方法
2023-03-21 17:52:49
COUNTIFS函数如何处理以数组方式提供的
2023-09-20 21:01:44
![](https://img.aspxhome.com/file/2023/9/a141939_0s.png)
Excel2013在查询值不在首列时怎么完成查询?
2022-11-11 17:30:23
![](https://img.aspxhome.com/file/2023/8/41438_0s.jpg)
收不到Win10正式版升级预订通知怎么解决?一个批处理搞定
2023-11-01 06:45:23
![](https://img.aspxhome.com/file/2023/28/a249726_0s.jpg)
WPS表格中控件工具箱的用处
2022-08-24 18:17:18
![](https://img.aspxhome.com/file/2023/6/a164046_0s.jpg)
wps表格如何插入折线图
2023-08-26 04:34:54
Win10玩游戏时怎么禁用输入法?
2023-06-28 18:47:36
![](https://img.aspxhome.com/file/2023/26/a222138_0s.png)
excel表格数据透视表的使用方法
2022-08-22 04:01:15
戴尔电脑升级Win11系统教程
2022-04-02 12:04:39
![](https://img.aspxhome.com/file/2023/1/a280703_0s.jpg)
PR常见问题「二」pr导入素材没有音轨怎么办
2022-07-03 18:02:00
![](https://img.aspxhome.com/file/2023/2/a204322_0s.png)
钉钉怎么撤回消息 钉钉撤回消息的图文教程介绍
2023-11-14 15:07:03
![](https://img.aspxhome.com/file/2023/3/a302692_0s.jpg)
word两种不同页码设置问题
2022-02-13 17:28:41