Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
01-22-2017, 05:48 PM
|
#1
|
LQ Newbie
Registered: Jan 2014
Posts: 11
Rep:
|
Neither specifying inode ratio nor inode quantity seems to have an effect on mkfs.ext2
Creating Partition to Archive Large files of type Video/ISO. Partition of 302 GiB to have ext2 filesystem, using Kernel 4.9.0. Expect to fit about 350 files in, at most 500. So start with - Inode every 64M
Code:
root@porteus:/home/guest# mkfs.ext2 -b 4096 -m 0 -i 67108864 /dev/sdb3
mke2fs 1.43.1 (08-Jun-2016)
Creating filesystem with 79167488 4k blocks and 38656 inodes
Filesystem UUID: 3aab194d-8ef5-4905-bbdc-748fdf507674
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Expect just 16 x 302 = 4832 inodes. However have 38656 inodes, giving 8M per inode.
- Inode every 512M
Code:
root@porteus:/home/guest# mkfs.ext2 -b 4096 -m 0 -i 536870912 /dev/sdb3
mkfs.ext2: invalid inode ratio 536870912 (min 1024/max 67108864)
- Inode every 48M
Code:
root@porteus:/home/guest# mkfs.ext2 -b 4096 -m0 -i50331648 /dev/sdb3
mke2fs 1.43.1 (08-Jun-2016)
/dev/sdb3 contains a ext2 file system
last mounted on Sun Jan 22 02:40:04 2017
Proceed anyway? (y,n) y
Creating filesystem with 79167488 4k blocks and 38656 inodes
Filesystem UUID: cd62f259-2a4a-4be8-8d13-a9229e88f119
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Still 38656 inodes @ 8M/inode.
- Inode every 48M (ext4)
Code:
root@porteus:/home/guest# time mkfs.ext4 -b 4096 -m0 -i50331648 /dev/sdb3
mke2fs 1.43.1 (08-Jun-2016)
/dev/sdb3 contains a ext2 file system
created on Sun Jan 22 16:10:58 2017
Proceed anyway? (y,n) y
Creating filesystem with 79167488 4k blocks and 38656 inodes
Filesystem UUID: 2671309d-1c79-455a-9a6b-b9cfd879eb25
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
real 0m20.955s
user 0m0.028s
sys 0m0.457s
No improvement.
- MKE2FS Man Page
Quote:
-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.
|
Code:
root@porteus:/home/guest# time mkfs.ext2 -b 4096 -m0 -N4096 /dev/sdb3
mke2fs 1.43.1 (08-Jun-2016)
/dev/sdb3 contains a ext4 file system
last mounted on Sun Jan 22 17:23:19 2017
Proceed anyway? (y,n) y
Creating filesystem with 79167488 4k blocks and 38656 inodes
Filesystem UUID: b48aacde-ee9f-4ed5-ab6c-ad09bfa8aca3
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
real 0m32.970s
user 0m0.029s
sys 0m0.282s
Still 38656 inodes. No override!
- By Way of Experiment
Code:
root@porteus:/home/guest# time mkfs.ext2 -b 8192 -m0 -N 4096 /dev/sdb3
Warning: blocksize 8192 not usable on most systems.
mke2fs 1.43.1 (08-Jun-2016)
/dev/sdb3 contains a ext2 file system
created on Sun Jan 22 21:30:13 2017
Proceed anyway? (y,n) y
mkfs.ext2: 8192-byte blocks too big for system (max 4096)
Proceed anyway? (y,n) y
Warning: 8192-byte blocks too big for system (max 4096), forced to continue
Creating filesystem with 39583744 8k blocks and 19360 inodes
Filesystem UUID: 40711675-e673-4a14-a9cf-66403251f442
Superblock backups stored on blocks:
65528, 196584, 327640, 458696, 589752, 1638200, 1769256, 3210872,
5307768, 8191000, 15923304, 22476104
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
real 0m35.978s
user 0m0.017s
sys 0m0.127s
Looks like for Block Size of 4096 bytes, max of 8 MiB per inode Ratio is Hardcoded in.
|
|
|
01-22-2017, 06:14 PM
|
#2
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,253
|
Why ext2 ?. That (native) code is so old there have been serious discussions to remove the support for it altogether.
As for trying to force allocation, have a look at "-T". Probably won't work on ext2, but there is no reason to even consider that IMHO.
There are also other (better ?) filesystems for really large file allocation.
|
|
|
01-23-2017, 07:26 PM
|
#3
|
LQ Newbie
Registered: Jan 2014
Posts: 11
Original Poster
Rep:
|
^ There is no point in suggesting -T if one has not tried it themselves. The most that -T does is 6 MiB an inode, or something of that order. Example #4 was done with ext4, and resulted in the same limitations. Ext2 does not have journalling, and for my purposes journalling would be just a superfluous overhead .
Last edited by Bogomips_; 01-23-2017 at 07:28 PM.
|
|
|
01-23-2017, 07:49 PM
|
#4
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,253
|
You can run ext4 without journalling. Best of both worlds - you get the new code for large allocations, extents etc as well.
-T worked fine when I have used it - but only tried it on ext4. I did say it might not be of assistance on ext2.
|
|
|
01-24-2017, 07:24 PM
|
#5
|
LQ Newbie
Registered: Jan 2014
Posts: 11
Original Poster
Rep:
|
Quote:
Originally Posted by syg00
You can run ext4 without journalling. Best of both worlds
|
Thanks for heads up.
Going with it: - High inode density.
Code:
root@porteus:/home/guest# mkfs.ext4 -b 4096 -m 0 -T huge -O ^has_journal /dev/sdb3
mke2fs 1.43.1 (08-Jun-2016)
/dev/sdb3 contains a ext2 file system
created on Sun Jan 22 21:35:29 2017
Proceed anyway? (y,n) y
Creating filesystem with 79167488 4k blocks and 4947968 inodes
Filesystem UUID: eb1bfdd0-78d7-4a82-818a-e3b5589e6718
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
root@porteus:/home/guest# tune2fs -l /dev/sdb3 | awk -F: ' \
> /^Block count:/ { blocks = $2 } \
> /^Inode count:/ { inodes = $2 } \
> /^Block size:/ { block_size = $2 } \
> END { blocks_per_inode = blocks/inodes; \
> print "blocks per inode:\t", blocks_per_inode, \
> "\nbytes per inode:\t", blocks_per_inode * block_size }'
blocks per inode: 16
bytes per inode: 65536
- 4 MiBs per Inode
Code:
root@porteus:/home/guest# mkfs.ext4 -b 4096 -m 0 -T largefile4 -O ^has_journal /dev/sdb3
mke2fs 1.43.1 (08-Jun-2016)
/dev/sdb3 contains a ext4 file system
created on Tue Jan 24 16:26:10 2017
Proceed anyway? (y,n) y
Creating filesystem with 79167488 4k blocks and 77312 inodes
Filesystem UUID: 7ff6af42-a63f-4e57-a282-38e80a2b9879
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
root@porteus:/home/guest# tune2fs -l /dev/sdb3 | awk -F: ' \
/^Block count:/ { blocks = $2 } \
/^Inode count:/ { inodes = $2 } \
/^Block size:/ { block_size = $2 } \
END { blocks_per_inode = blocks/inodes; \
print "blocks per inode:\t", blocks_per_inode, \
"\nbytes per inode:\t", blocks_per_inode * block_size }'
blocks per inode: 1024
bytes per inode: 4194304
- 38656 Inodes
- -T -i Specified
Code:
root@porteus:/home/guest# mkfs.ext4 -b 4096 -m 0 -T largefile4 -O ^has_journal -i 67108864 /dev/sdb3
mke2fs 1.43.1 (08-Jun-2016)
/dev/sdb3 contains a ext4 file system
created on Tue Jan 24 16:35:06 2017
Proceed anyway? (y,n) y
Creating filesystem with 79167488 4k blocks and 38656 inodes
Filesystem UUID: 2b178c74-264f-4f65-b183-61860ca77492
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
- -T -i -N Specified
Code:
root@porteus:/home/guest# mkfs.ext4 -b 4096 -m 0 -T largefile4 -O ^has_journal -i 67108864 /dev/sdb3
mke2fs 1.43.1 (08-Jun-2016)
/dev/sdb3 contains a ext4 file system
created on Tue Jan 24 16:35:06 2017
Proceed anyway? (y,n) y
Creating filesystem with 79167488 4k blocks and 38656 inodes
Filesystem UUID: 2b178c74-264f-4f65-b183-61860ca77492
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
- Just -N Specified. Again 38656 Inodes.
Code:
root@porteus:/home/guest# time mkfs.ext4 -b 4096 -m 0 -N 4096 -O ^has_journal /dev/sdb3mke2fs 1.43.1 (08-Jun-2016)
/dev/sdb3 contains a ext4 file system
created on Tue Jan 24 17:17:04 2017
Proceed anyway? (y,n) y
Creating filesystem with 79167488 4k blocks and 38656 inodes
Filesystem UUID: d5038994-c3be-4403-9750-4d874a944ef2
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
real 0m11.345s
user 0m0.026s
sys 0m0.188s
root@porteus:/home/guest# tune2fs -l /dev/sdb3 | awk -F: ' \
/^Block count:/ { blocks = $2 } \
/^Inode count:/ { inodes = $2 } \
/^Block size:/ { block_size = $2 } \
END { blocks_per_inode = blocks/inodes; \
print "blocks per inode:\t", blocks_per_inode, \
"\nbytes per inode:\t", blocks_per_inode * block_size }'
blocks per inode: 2048
bytes per inode: 8388608
Inode Ratio of 8 MiB to the Inode
Looks like will have to report this as a deficiency, which is a bore, but they are apparently short of resources for testing.
|
|
|
All times are GMT -5. The time now is 06:15 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|