Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to format a disk in ext3 file system with the block size as 4096. Is there any possibility to do so? What if we do not write Inode Bitmap while formatting?

share|improve this question

migrated from stackoverflow.com May 1 '13 at 16:04

This question came from our site for professional and enthusiast programmers.

    
Why do you want a block size > 4KiB? –  derobert May 1 '13 at 16:16

2 Answers 2

This link may help you.

Let me know if you need more help.

share|improve this answer
    
... that has nothing to do with the block size. –  derobert May 1 '13 at 16:14
    
I have tried to format a disk with 8192 block size but it is not getting mounted. @derobert : I just want to reduce number of block groups so that disk can be formatted in less time. –  Parshv Shah May 2 '13 at 14:01

ext2/3/4 do not support disk block sizes greater than the page size. On x86-32 and x86-64, the page size is 4K, so that's the largest block size you can use. (OTOH, if you can dig up a DEC Alpha machine, I hear those had 8K pages.)

From your comment, you want to speed up mkfs. There are a couple of approaches you could take:

  1. If you don't need all the inodes (remember, adding more will require reformatting), you can decrease the number of inodes. You can use the -i or -N options to do that. Or use one of the other types (e.g., -T largefile).
  2. You could use ext4 instead. ext4 can leave block groups uninitialized until they're needed (-O uninit_bg -E lazy_itable_init, which are usually the default). Also has the advantage of greatly speeding up fsck.

If you really want to reduce the number of block groups (which you shouldn't), there is a -g option for that.

share|improve this answer
    
Right now I am using largefile4 option to reduce number of inodes per block group. So it helps me to reduce formatting time a quite but it is not enough for me. Still it takes time(around 7-8 minutes for 2TB HDD) to write bitmaps i.e, block bitmap and inode bitmap which is quite a long. I thought only the way to reduce the time is to reduce number of block groups which is not possible as commented before. So is there any possibility if I do not write bitmaps in the disk? As I am using a linux version which does not have ext4 file system support, I am not able to use it. –  Parshv Shah May 3 '13 at 6:21
    
@ParshvShah I don't see your comment about not being able to change the number of groups. (Also, you can use -i/-N to get even fewer inodes than largefile4...) But let's go back a step here, what's the problem you're trying to solve? I mean, for "normal" use, you hardly ever run mkfs, so taking 10 minutes isn't a huge deal. What are you trying to do? –  derobert May 3 '13 at 15:45
    
Thanks for your help. Actually 10 minutes are OK for me but I thought if is there any possibility to reduce time then obviously it would be better that is why I put a comment. But heartily thanks a lot for suggestions. It worked for me. At least I am able to reduce a time by 50%. –  Parshv Shah May 3 '13 at 18:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.