Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You can use the "-i" option in mkfs.ext{234} to specify the number of bytes per inode. Right now you have one inode per 16K bytes (4 blocks) and are using ~90% of your inodes but just ~70% of the data blocks, so it looks like you need a bytes-per-inode somewhat smaller than 16K. Yes, you need to re-make the filesystem to change that ratio.
You can use the "-i" option in mkfs.ext{234} to specify the number of bytes per inode. Right now you have one inode per 16K bytes (4 blocks) and are using ~90% of your inodes but just ~70% of the data blocks, so it looks like you need a bytes-per-inode somewhat smaller than 16K. Yes, you need to re-make the filesystem to change that ratio.
My idea is not to increase the size of the filesystem because I do not need extra space, but extra inodes.
If I set bytes-per-inode = 8K, I think maximum size of the partition becomes lower, or not?
My idea is not to increase the size of the filesystem because I do not need extra space, but extra inodes.
If I set bytes-per-inode = 8K, I think maximum size of the partition becomes lower, or not?
Smaller yes, but only by a tiny percentage. The inode size is 256 bytes, so doubling the number of inodes from the current 6553600 would use an additional 1600 MiB of space. That's about 1.56% of the total 102396 MiB used by the filesystem.
Does the inode space be counted on the reserved space (usually 5%) or is it extra?
No, it isn't reserved but already used (the I-node table is PRE-allocated), so its size is subtracted from the total amount available (the I-node table is not a file, so isn't in the "used" amount. The journal IS a file, so its size is in the amount used.
With the command "tune2fs -l /dev/sd??" you can see how many I-nodes there are.
Doubling the inode space, inodes will fill 3200 MiB.
Does the inode space be counted on the reserved space (usually 5%) or is it extra?
It's part of the filesystem formatting overhead, which includes group descriptors, block bitmaps, and super blocks, as well as inode tables. That space is the reason that the space computed from the block total reported by df is less than the space represented by the "Block count" reported by "tune2fs -l". Example:
Code:
# tune2fs -l /dev/mapper/vg_sys3g-var | grep "Block count"
Block count: 14848000
# df -B 4k /var
Filesystem 4K-blocks Used Available Use% Mounted on
/dev/mapper/vg_sys3g-var
14581811 3752428 10087303 28% /var
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.