By default 5% blocks are reserved for administration purpose, there is no point to reserve blocks for partition like /home.
But do NOT set reserved block percentage to 0% for /, /var, /opt etc...
This applied to ext2, ext3 and ext4.
Traditional partition:
tune2fs -l /dev/sdXx | grep Reserved block count
LVM
tune2fs -l /dev/volume_group/logical_volume
or
tune2fs - /dev/mapper/volume_group-logical_volume
Change the reserved-blocks-percentage to 1%
tune2fs -m 1 /volume_group/logical_volume
Change Reserved block count to a certain number
tune2fs -r 25600 /dev/volume_group/logical_volume
df -hT and compare the extra space gained (released)
Before
root@tux:/etc/init.d# df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/ubuntu-root ext4 19G 6.8G 11G 39% / none devtmpfs 1002M 364K 1002M 1% /dev none tmpfs 1006M 1.4M 1005M 1% /dev/shm none tmpfs 1006M 356K 1006M 1% /var/run none tmpfs 1006M 0 1006M 0% /var/lock none tmpfs 1006M 0 1006M 0% /lib/init/rw /dev/sda3 ext2 89M 34M 51M 40% /boot /dev/mapper/ubuntu-home ext4 82G 7.6G 71G 10% /home
After setting reserved-blocks-percentage of /home to 0%
root@tux:/etc/init.d# df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/ubuntu-root ext4 19G 6.8G 11G 39% / none devtmpfs 1002M 364K 1002M 1% /dev none tmpfs 1006M 1.4M 1005M 1% /dev/shm none tmpfs 1006M 356K 1006M 1% /var/run none tmpfs 1006M 0 1006M 0% /var/lock none tmpfs 1006M 0 1006M 0% /lib/init/rw /dev/sda3 ext2 89M 34M 51M 40% /boot /dev/mapper/ubuntu-home ext4 82G 7.6G 75G 10% /home
Output of tune2fs -l /dev/ubuntu/home
root@tux:/etc/init.d# tune2fs -l /dev/ubuntu/home tune2fs 1.41.11 (14-Mar-2010) Filesystem volume name: <none> Last mounted on: /home Filesystem UUID: 41dcc9d8-f741-4191-aeaf-95f4c9e2fe28 Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize Filesystem flags: signed_directory_hash Default mount options: (none) Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: 5447680 Block count: 21778432 Reserved block count: 0 Free blocks: 19465624 Free inodes: 5397000 First block: 0 Block size: 4096 Fragment size: 4096 Reserved GDT blocks: 1018 Blocks per group: 32768 Fragments per group: 32768 Inodes per group: 8192 Inode blocks per group: 512 Flex block group size: 16 Filesystem created: Wed Oct 28 18:06:50 2009 Last mount time: Mon May 31 07:16:10 2010 Last write time: Mon May 31 10:59:38 2010 Mount count: 23 Maximum mount count: 27 Last checked: Tue May 4 07:04:43 2010 Check interval: 15552000 (6 months) Next check after: Sun Oct 31 08:04:43 2010 Lifetime writes: 221 GB Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 256 Required extra isize: 28 Desired extra isize: 28 Journal inode: 8 First orphan inode: 393319 Default directory hash: half_md4 Directory Hash Seed: f2249b1d-ffc5-493d-a497-54919163d968 Journal backup: inode blocks