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've done that:

mkfs.ext4 -j -b 8192 /dev/sda3

Now I'm trying to mount it with:

sudo mount -t ext4 /dev/sda3 foo 

But I'm getting this error:

mount: wrong fs type, bad option, bad superblock on /dev/sda3

What's the problem?

share|improve this question
    
Is there some additional information in dmesg output? –  osgx Mar 8 '12 at 14:36
add comment

migrated from stackoverflow.com Mar 8 '12 at 14:50

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

1 Answer

up vote 1 down vote accepted

As I know, such huge block is not supported on x86 platform. The problem is: ext*fs is based on generic VFS framework and it can't work when block size is greater than page size (4096 on x86). On Itanium and other exotic architectures with > 4KB memory pages (but not on x86/x86_64 with 2MB or 4MB pages) such blocksize may work. The same problem in linux is with ufs2 with fragment size > 4096.

This knowledge is based on information from one UFS2/Linux developer. There are also some letters in lists, like question answer

Citing answer from "Andreas Dilger"

Linux requires blocksize <= PAGE_SIZE, so basically all filesystems use blocksize <= 4096 unless they implement support internally for reading/writing partial disk blocks from the page or buffer cache.

With ext2/3 it is possible to change the number of inodes allocated without changing the blocksize (less inodes per block group).

For UFS2 there is an explicit check for fragment_size <= 4096. I think there is the same check in ext*fs.

Basically you need not to set so huge blocksize for ext4, if extents are enabled. Extents are very like huge blocks for huge files. With extens you will have more performance and less fragmentation, but they are unsupported (not backward compatible) in older Linux kernels or some older drivers for third OSes, like Windows.

share|improve this answer
    
So at my x86 is impossible to have an partition with block size greater than 4096? Even if it's not ext*? –  Frederico Schardong Mar 8 '12 at 14:39
    
This is true for UFS1/UFS2, ext2, sunVFS and similar fs. Any other may work or may not work. Also, What is your task? If you want less fragmentation, use ext4 with extens enabled (extent is just like huge variable-sized blocks); if you want to use more space of your HDD, play with options of mkfs. –  osgx Mar 8 '12 at 14:41
add comment

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.