Create a test environment with full disk space in Linux

Source: Internet
Author: User
Linux constructs a test environment with full disk space. it uses the ramdisk of the suse operating system to mount the virtual disk partition, and then fills up the virtual disk partition to meet the condition that the disk is full. Www.2cto. comramdisk is a memory block device that comes with the operating system. the list of such devices can be used...
Linux constructs a test environment with full disk space. it uses the ramdisk of the suse operating system to mount the virtual disk partition, and then fills up the virtual disk partition to meet the condition that the disk is full. Www.2cto.com ramdisk is a memory block device that comes with the operating system, you can use ls/dev/ram * to list the devices. # ls/dev/ram */dev/ram/dev/ram1/dev/ram3/dev/ram5/dev/ ram7/dev/ram0/dev/ram2/dev/ram4/dev/ram6/dev/ramdisk select an unused ramdisk, assume ram2 and create a file system for it. mkfs. in the next step, run ext3/dev/ram2 in the same directory as a common file system. then, mount it to the directory # mkdir/tmp/fs # mount/dev/ram2/tmp/fs. Next, link the software files and directories that require writing exceptions to the virtual disk partition. under/tmp/fs, try to fill up/tmp/fs (for example, use the dd command to generate a large file .), you can perform an exception test without affecting the use of the suse system. by default, the size of a ramdisk is 128 MB. In most cases, you only need to properly use the symbolic link to meet the requirements. this method can be used to quickly solve the environment problem of full disk test.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.