Linux filsystem og forbrug

From HoerupWiki
Revision as of 13:10, 3 August 2020 by Tommyb (talk | contribs) (16384 bytes-per-inode (default))
Jump to: navigation, search

Lille liste lavet på baggrund af server med mange phpsessions der løb tør for inodes med 100gb fri plads.

Ext4

16384 bytes-per-inode (default)

[root@inodetest ~]# mkfs.ext4 /dev/vdb
[root@inodetest ~]# df -i /mnt/test/
Filesystem     Inodes IUsed  IFree IUse% Mounted on
/dev/vdb       655360    11 655349    1% /mnt/test
[root@inodetest ~]# df -h /mnt/test/
Filesystem      Size  Used Avail Use% Mounted on
/dev/vdb        9.8G   37M  9.3G   1% /mnt/test

8192 bytes-per-inode

[root@inodetest ~]# mkfs.ext4 -i 8192 /dev/vdb 
[root@inodetest ~]# df -i /mnt/test/
Filesystem      Inodes IUsed   IFree IUse% Mounted on
/dev/vdb       1310720    11 1310709    1% /mnt/test
[root@inodetest ~]# df -h /mnt/test/
Filesystem      Size  Used Avail Use% Mounted on
/dev/vdb        9.7G   37M  9.1G   1% /mnt/test

1024 bytes-per-inode

[root@inodetest ~]# mkfs.ext4 -i 1024 /dev/vdb 
[root@inodetest ~]# df -i /mnt/test/
Filesystem       Inodes IUsed    IFree IUse% Mounted on
/dev/vdb       10485760    11 10485749    1% /mnt/test
[root@inodetest ~]# df -h /mnt/test/
Filesystem      Size  Used Avail Use% Mounted on
/dev/vdb        7.5G   49M  6.9G   1% /mnt/test

XFS default

[root@inodetest ~]# mkfs.xfs /dev/vdb 
[root@inodetest ~]# df -i /mnt/test/
Filesystem      Inodes IUsed   IFree IUse% Mounted on
/dev/vdb       5242880     3 5242877    1% /mnt/test
[root@inodetest ~]# df -h /mnt/test/
Filesystem      Size  Used Avail Use% Mounted on
/dev/vdb         10G  104M  9.9G   2% /mnt/test

BRTFS

root@inodetest:~# mkfs.btrfs -f /dev/vdb 
root@inodetest:~# df -i /mnt/test/
Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/vdb            0     0     0     - /mnt/test
root@inodetest:~# df -h /mnt/test/
Filesystem      Size  Used Avail Use% Mounted on
/dev/vdb         10G   17M  8.0G   1% /mnt/test

ReiserFS

root@inodetest:~# mkfs.reiserfs /dev/vdb 
root@inodetest:~# df -i /mnt/test/
Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/vdb            0     0     0     - /mnt/test
root@inodetest:~# df -h /mnt/test/
Filesystem      Size  Used Avail Use% Mounted on
/dev/vdb         10G   33M   10G   1% /mnt/test