Releases the disk space reserved for Linux.

Source: Internet
Author: User
Most file systems retain a portion of the space for emergency purposes (such as when the hard disk space is full). This ensures that some key applications (such as databases) have room when the hard disk is full, instead, crash will immediately give the monitoring system and administrator some time to notice. But sometimes this... information & n
Most file systems retain a portion of the space for emergency purposes (such as when the hard disk space is full). This ensures that some key applications (such as databases) have room when the hard disk is full, instead, crash will immediately give the monitoring system and administrator some time to notice. However, sometimes the reserved hard disk space is a waste. How can we release the space reserved by this sub-system? In the Linux ext2/ext3/ext4 file system, 5% hard disk space is usually reserved by default. if the hard disk is 4 TB, 200 GB space is wasted, we can use tune2fs to change the default setting of 5%, for example, reserve only 1% of the space. Can it be set to 0%? Yes, but it is not recommended. View the current hard disk space at www.2cto.com: # df-hFilesystem Size Used Avail Use % Mounted on/dev/mapper/vg_cloud22-lv_root 32G 1.1G 30G 4%/tmpfs 24G 0 24G 0%/dev/shm/dev/sda1 485 M 68 M 392 M 15%/boot/dev/mapper/vg_cloud22-lv_home 3.2G 70 M 2.9G 3%/home/dev/sdd1 1008G 161G 797G 17%/var/cloud adjustment /dev/sdd1, reserve only 1% of the space: # tune2fs-m 1/dev/sdd1tune2fs 1.41.12 (17-May-2010) Setting reserved blocks percentage to 1% (2684381 blocks)
After adjustment, check the released hard disk space and find that there is an extra space of 838-797 = 41 GB: www.2cto.com # df-hFilesystem Size Used Avail Use % Mounted on/dev/mapper/vg_cloud22-lv_root 32G 1.1G 30G 4%/tmpfs 24G 0 24G 0%/dev/shm/dev/ sda1 485 M 68 M 392 M 15%/boot/dev/mapper/vg_cloud22-lv_home 3.2G 70 M 2.9G 3%/home/dev/sdd1 1008G 161G 838G 17%/var/cloud
 
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.