Dengan menggunakan tune2fs alat dengan opsi, -l , ukuran inode dari sistem file dapat dilihat. Menggunakan opsi yang sama, informasi lain dari superblok sistem file juga dapat dilihat. Superblok berisi informasi tentang sistem file, seperti jumlah blok gratis yang tersedia, dan jumlah pemasangan, yang mungkin berguna untuk tujuan penyetelan.
Berikut adalah contoh bagaimana pengguna dapat menentukan opsi -l. Contoh yang digunakan di sini adalah sistem RHEL 7:
# tune2fs -l /dev/sda1 tune2fs 1.42.9 (28-Dec-2013) Filesystem volume name: [none] Last mounted on: /boot Filesystem UUID: 1a678f4f-85e4-43c6-b4b3-af1a732510ac Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize Filesystem flags: signed_directory_hash Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: 65536 Block count: 262144 Reserved block count: 13107 Free blocks: 228732 Free inodes: 65200 First block: 0 Block size: 4096 Fragment size: 4096 Group descriptor size: 64 Reserved GDT blocks: 127 Blocks per group: 32768 Fragments per group: 32768 Inodes per group: 8192 Inode blocks per group: 512 RAID stride: 64 RAID stripe width: 64 Flex block group size: 16 Filesystem created: Tue Jan 26 18:26:17 2016 Last mount time: Sun Jun 26 00:03:14 2016 Last write time: Sun Jun 26 00:03:14 2016 Mount count: 5 Maximum mount count: -1 Last checked: Tue Jan 26 18:26:17 2016 Check interval: 0 ([none]) Lifetime writes: 176 MB 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 Default directory hash: half_md4 Directory Hash Seed: 27bb8d92-09a4-4734-89b8-f767a5f34fb3 Journal backup: inode blocks
Untuk mendapatkan ukuran inode, gunakan :
# tune2fs -l /dev/sda1 | grep -i inode Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize Inode count: 65536 Free inodes: 65200 Inodes per group: 8192 Inode blocks per group: 512 First inode: 11 Inode size: 256 Journal inode: 8 Journal backup: inode blocks
Seperti yang ditunjukkan di atas, ukuran inode di RHEL 7 pada sistem ext4 adalah 256 byte.
Anda juga dapat menggunakan df -i perintah untuk mendapatkan jumlah total inode yang tersedia dan berapa banyak dari mereka yang sudah digunakan.
# df -i /dev/sda1 Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda1 65536 1919 63617 3% /boot
Bagaimana cara menghitung jumlah inode pada ext4/etx3 FS sebelum membuatnya?
Seperti yang tertulis di halaman manual, nilainya didasarkan pada jumlah blok dan rasio byte-per-inode byte-per-inode =(blok/inode) * block_size.
-N number-of-inodes Overrides the default calculation of the number of inodes that should be reserved for the filesystem (which is based on the number of blocks and the bytes per-inode ratio). This allows the user to specify the number of desired inodes directly.
Untuk memeriksa berapa banyak inode yang akan Anda miliki, gunakan opsi -n dengan mkfs.ext3/4.
# mkfs.ext4 -n /dev/sda mke2fs 1.42.9 (28-Dec-2013) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=0 blocks, Stripe width=512 blocks 32768 inodes, 131072 blocks 6553 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=33685504 16 block groups 8192 blocks per group, 8192 fragments per group 2048 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729