Recovering reserved space from ext4

具体请查看: http://blog.flexion.org/2010/01/07/recovering-reserved-space-ext4/

 

以下是原文,来自上面的链接地址。

Recovering reserved space from ext4


The Ext4 file system, like Ext3, reserves 5% of the blocks on the file system for the root user. The reserved blocks are there for root’s use as a safe guard if the filesystem gets full, it provides some wiggle room to enable the really important programs to still function. But in some cases there’s not much point in having space reserved for root.

I’ve recently upgrade my workstation with a 6TB internal RAID 0 array for data storage (music, videos, photos, etc) and an external 6TB RAID 0 array as a backup. My OS boot from a 1TB drive. For my 6TB arrays I want the maximum available storage and was interested to see what effect removing the reserved space would have. So, this is what I did.

First I made the Ext4 file system, mounted it and queried how much space was available.
sudo mkfs.ext4 /dev/sdh1
sudo mount /dev/sdh1 /mnt
df -h

Looks like I have 5.1TB of available space.
/dev/sdh1             5.4T  186M  5.1T   1% /mnt

Then I unmounted the file system, removed the reserved blocks, checked the consistency of the file system, mounted it and queried how much space was available.
sudo umount /mnt
sudo tune2fs -m 0 /dev/sdh1
sudo e2fsck /dev/sdh1
df -h

Looks like I have 5.4TB available now, a saving of 300GB.
/dev/sdh1             5.4T  186M  5.4T   1% /mnt

Now, I could have simply created the files system without the reserved blocks in the first place, but I was interested to see the comparison.
sudo mkfs.ext4 -m 0 /dev/sdh1

Before you start removing the reserved blocks from your ext3/ext4 file systems do a bit a research first.
Disk capacity, free space, and Ext3 reserved blocks
Ext3 Filesystem Tips

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值