Easily learn how to modify the file system size in Linux

Source: Internet
Author: User

Linux has become more and more popular among computer users. As a result, many users may encounter Linux File System size modification problems when learning Linux, here we will introduce how to modify the file system size in Linux. Here we will share it with you. By default, the system will load/dev/shm, which is called tmpfs. Some people say it is different from ramdisk.

Like a virtual disk, tmpfs can use your RAM, but it can also use your swap partition for storage. In addition, a traditional virtual disk is a block device and requires commands such as mkfs to actually use it. tmpfs is a file system, not a block device. You only need to install it, it can be used.

Tmpfs has the following advantages:
1. The size of the dynamic file system.

2. Another major benefit of tmpfs is its lightning speed. Because the typical tmpfs file system will completely reside in RAM, reading and writing can be almost instantaneous.

3. tmpfs data will not be retained after restart, because the virtual memory is essentially easy to lose. Therefore, it is necessary to execute some scripts such as loading and binding.

Usually use/dev/shm for shared memory shm_open, shm_unlink ). /Dev/shm is a temporary document system tmpfs), which can be mounted from/etc/fstab. Therefore, standard parameters such as "size" can be used to increase or decrease the tmpfs size on/dev/shm. By default, its size is half of the system RAM)

Resize/dev/shm
1) view the size
Df-h/dev/shm

2) modify the size
Vi/etc/fstab
Tmpfs/dev/shm tmpfs ults, size = 4096 M 0 0

3) remount
Umount/dev/shm
Mount/dev/shm

4) view the modified size
Df-h/dev/shm

Modify the file system size in Linux and control the size of the dev/shm tmpfs file system at will.

  1. Operation notes: Linux hard disk partition
  2. Install db2 in Linux
  3. Install PPStream network TV in Linux
  4. Protect your Linux operating system
  5. Checks whether Linux servers are attacked by hackers.

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.