Defining 64KiB block size for VirtualBox VDI hard disk
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Defining 64KiB block size for VirtualBox VDI hard disk
Hi there,
I would like to do some testing of the ext4 filesystem on a device with a 64KiB block size. Not having one of those to hand, unsurprisingly, I thought I could look into creating a VirtualBox VM hard disk with a 64KiB block size, then installing Linux on it.
Does anybody know how (i) I can specify the block size of a VirtualBox VDI hard disk when I am creating it (or am I constrained by the physical structure of the underlying disk where the VDI is stored?); (ii) Whether I'll have any problems installing Linux on such a device?
Of course there may be alternative ways of emulating a 64KiB block sized device so that mke2fs allows creation of a 64KiB-blocksize ext4 filesystem on it without producing warnings - I'm all ears!
You have to emulate it (use the "-b block-size" of mke2fs).
As far as I know, there are no disks that implement a 64k block size. A RAID controller CAN do that (it would take 16 disks with a 4k native block size) - but even there it still defaults (to my knowledge) to a 4K default (and you want to make the block size the span size of the RAID configuration).
Part of the reason for using that size would be to force preallocation (the smallest file would be one block - 64kb in size)...
Note that the kernel's ext4 driver does not support block sizes larger than 4096 bytes. That's what the warning is about. You would have to install the fuseext2 package to use such a filesystem.
stripe=n Number of filesystem blocks that mballoc will try
to use for allocation size and alignment. For RAID5/6
systems this should be the number of data
disks * RAID chunk size in file system blocks.
And there is no specific limitation on the block size.
From what I can find, it appears the only limitations is the system page size...
stripe=n Number of filesystem blocks that mballoc will try
to use for allocation size and alignment. For RAID5/6
systems this should be the number of data
disks * RAID chunk size in file system blocks.
And there is no specific limitation on the block size.
From what I can find, it appears the only limitations is the system page size...
Yes, and the system page size on x86 is 4096 bytes. If you build a filesystem with a larger block size ("-b" option), the kernel's driver won't be able to mount it. The "stripe=n" parameter is a mount option. You can use that to get allocation and alignment in units larger than the filesystem block size.
Out of curiosity, did you try to mount using the stripe= option instead?
No, because I wanted to try out the 64KiB block size, as in create, mount and run the filesystem with the actual structure oriented round 64KiB blocks and the superblock field s_log_block_size set to 6. I assumed that the stripe=n mount option would keep the structure at 4KiB and s_log_block_size set at 2, only affecting mballoc's allocation of contiguous blocks, or something like that.
However, to be honest, I don't really understand RAID or strides/stripes.
Did you try the fuseext2 package, which is available for Mint 17? My understanding is that the fuseext2 command should be able to mount that filesystem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.