block size more than 4096 in ext2/3 - Linux

This is a discussion on block size more than 4096 in ext2/3 - Linux ; hi, can any one know how to change the block size >4096 ,i changed it to 1024,2048,4096 by mke2fs tool....but now i want to change more than 4096 ,its not allowing to change ... i think we can extend the ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: block size more than 4096 in ext2/3

  1. block size more than 4096 in ext2/3

    hi,
    can any one know how to change the block size >4096 ,i changed it to
    1024,2048,4096 by mke2fs tool....but now i want to change more than
    4096 ,its not allowing to change ...

    i think we can extend the block size upto page size(16 bit ) =64k,,,at
    least i want to change upto 16k....is there any way to achieve
    this..........
    presently i'm using redhat version 9(kernel 2.4.20-8)


  2. Re: block size more than 4096 in ext2/3

    In Linux 2.4, page size is (12 bits)=4k not 64k.
    nag wrote:
    > hi,
    > can any one know how to change the block size >4096 ,i changed it to
    > 1024,2048,4096 by mke2fs tool....but now i want to change more than
    > 4096 ,its not allowing to change ...
    >
    > i think we can extend the block size upto page size(16 bit ) =64k,,,at
    > least i want to change upto 16k....is there any way to achieve
    > this..........
    > presently i'm using redhat version 9(kernel 2.4.20-8)



  3. Re: block size more than 4096 in ext2/3

    nag wrote:

    > hi,
    > can any one know how to change the block size >4096 ,i changed it to
    > 1024,2048,4096 by mke2fs tool....but now i want to change more than
    > 4096 ,its not allowing to change ...
    >
    > i think we can extend the block size upto page size(16 bit ) =64k,,,at
    > least i want to change upto 16k....is there any way to achieve
    > this..........
    > presently i'm using redhat version 9(kernel 2.4.20-8)


    Why in hell would you want to do such a damn fool thing as that? Is your
    brain crippled by MS fat file system thinking. There is no problem in
    building a terabyte file system in ext2/ext3 with 4096 byte blocks.

    --
    JosephKK
    Gegen dummheit kampfen die Gotter Selbst, vergebens.**
    --Schiller

  4. Re: block size more than 4096 in ext2/3

    bcoz , i want to capture the video stream ,for that i want big block
    size ,,,it will take less time to write or read a big block..
    joseph2k wrote:
    > nag wrote:
    >
    > > hi,
    > > can any one know how to change the block size >4096 ,i changed it to
    > > 1024,2048,4096 by mke2fs tool....but now i want to change more than
    > > 4096 ,its not allowing to change ...
    > >
    > > i think we can extend the block size upto page size(16 bit ) =64k,,,at
    > > least i want to change upto 16k....is there any way to achieve
    > > this..........
    > > presently i'm using redhat version 9(kernel 2.4.20-8)

    >
    > Why in hell would you want to do such a damn fool thing as that? Is your
    > brain crippled by MS fat file system thinking. There is no problem in
    > building a terabyte file system in ext2/ext3 with 4096 byte blocks.
    >
    > --
    > JosephKK
    > Gegen dummheit kampfen die Gotter Selbst, vergebens.
    > --Schiller



  5. Re: block size more than 4096 in ext2/3


    nag wrote:
    > hi,
    > can any one know how to change the block size >4096 ,i changed it to
    > 1024,2048,4096 by mke2fs tool....but now i want to change more than
    > 4096 ,its not allowing to change ...


    You've been given the answer before, when you asked last week. Of
    course, since you multiposted to so many groups, you probably missed
    the answer you were given.

    > i think we can extend the block size upto page size(16 bit ) =64k


    Blocksize is just one part of the change. The /other/ part will break
    compatability with current ext2 and ext3 implementations. But, you
    would have known that (along with /which/ parts these are) if you had
    read the responses you got the last time you asked.

    > ,,,at least i want to change upto 16k


    And I want a million dollars, tax free. I think the chances of you
    getting a 16Kb blocksize in ext2 are worse than my getting a free
    million bucks.

    > ....is there any way to achieve this..........


    Read the previous replies.

    Short answer: no, it can't be done (by you, without breaking anything)

    > presently i'm using redhat version 9(kernel 2.4.20-8)


    You have my condolences

    --
    Lew Pitcher


  6. Re: block size more than 4096 in ext2/3

    hi,just see the below changes....and comment ..

    ext3: Extends blocksize up to pagesize
    All 10 messages in topic - view as tree
    From: Takashi Sato - view profile
    Date: Wed, Jan 18 2006 6:10 pm
    Email: "Takashi Sato"
    Groups: linux.kernel
    Not yet ratedRating:
    show options
    Reply | Reply to Author | Forward | Print | Individual Message | Show
    original | Report Abuse | Find messages by this author


    Hi,

    As a disk tends to get large, a disk storage has had a capacity to
    supply multi-TB. But now, ext3 can't support more than 8TB filesystem
    when blocksize is 4KB. That's why I think ext3 needs to be
    more than 8TB.


    Therefore I think filesystem size can increase on architectures
    which has more than 4KB pagesize by extending blocksize to pagesize on
    ext3. For example, the following is in case of ia64. (Blocksize have
    already been supported up to pagesize on ext2. Why is the max blocksize

    restricted to 4KB on ext3?)


    Max filesystem size on ia64:
    Original :4096(blocksize) * 2^31 =
    8TB
    After modification [pagesize=16KB(default)]:16384(blocksize) * 2^31 =
    32TB
    After modification [pagesize=64KB(max)] :65536(blocksize) * 2^31 =
    128TB


    The followings are the contents of modification.
    - ext3_fill_super
    In checking blocksize on mount, allow blocksize up to pagesize.


    - ext3_readdir
    Currently read-ahead 16 sectors when reading a directory, but not
    if blocksize is more than 8KB. Then I modified to read-ahead
    one fs-block if blocksize is more than 8KB.


    Any feedback and comments are welcome.


    Signed-off-by: Takashi Sato
    ---


    diff -uprN -X linux-2.6.16-rc1.org/Documentation/dontdiff
    linux-2.6.16-rc1.org/fs/ext3/dir.c
    linux-2.6.16-rc1-bigblk/fs/ext3/dir.c
    --- linux-2.6.16-rc1.org/fs/ext3/dir.c 2006-01-18 08:10:26.000000000
    +0900
    +++ linux-2.6.16-rc1-bigblk/fs/ext3/dir.c 2006-01-18
    08:12:05.000000000 +0900
    @@ -142,7 +142,13 @@ static int ext3_readdir(struct file * fi
    * Do the readahead
    */
    if (!offset) {
    - for (i = 16 >> (EXT3_BLOCK_SIZE_BITS(sb) - 9),
    num = 0;
    + int readcnt;
    + if (sb->s_blocksize > 8192) {
    + readcnt = sb->s_blocksize >>
    EXT3_SECTOR_BITS;
    + } else {
    + readcnt = 16;
    + }
    + for (i = readcnt >> (EXT3_BLOCK_SIZE_BITS(sb) -
    9), num = 0;
    i > 0; i--) {
    tmp = ext3_getblk (NULL, inode, ++blk,
    0, &err);
    if (tmp && !buffer_uptodate(tmp) &&
    diff -uprN -X linux-2.6.16-rc1.org/Documentation/dontdiff
    linux-2.6.16-rc1.org/fs/ext3/super.c
    linux-2.6.16-rc1-bigblk/fs/ext3/super.c
    --- linux-2.6.16-rc1.org/fs/ext3/super.c 2006-01-18
    08:10:26.000000000 +0900
    +++ linux-2.6.16-rc1-bigblk/fs/ext3/super.c 2006-01-18
    08:12:05.000000000 +0900
    @@ -1461,6 +1461,7 @@ static int ext3_fill_super (struct super
    blocksize = BLOCK_SIZE << le32_to_cpu(es->s_log_block_size);


    if (blocksize < EXT3_MIN_BLOCK_SIZE ||
    + blocksize > PAGE_SIZE ||
    blocksize > EXT3_MAX_BLOCK_SIZE) {
    printk(KERN_ERR
    "EXT3-fs: Unsupported filesystem blocksize %d on
    %s.\n",
    diff -uprN -X linux-2.6.16-rc1.org/Documentation/dontdiff
    linux-2.6.16-rc1.org/include/linux/ext2_fs.h
    linux-2.6.16-rc1-bigblk/include/linux/ext2_fs.h
    --- linux-2.6.16-rc1.org/include/linux/ext2_fs.h 2006-01-18
    08:10:56.000000000 +0900
    +++ linux-2.6.16-rc1-bigblk/include/linux/ext2_fs.h 2006-01-18
    08:12:05.000000000 +0900
    @@ -90,7 +90,7 @@ static inline struct ext2_sb_info *EXT2_
    * Macro-instructions used to manage several block sizes
    */
    #define EXT2_MIN_BLOCK_SIZE 1024
    -#define EXT2_MAX_BLOCK_SIZE 4096
    +#define EXT2_MAX_BLOCK_SIZE 65536
    #define EXT2_MIN_BLOCK_LOG_SIZE 10
    #ifdef __KERNEL__
    # define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize)
    diff -uprN -X linux-2.6.16-rc1.org/Documentation/dontdiff
    linux-2.6.16-rc1.org/include/linux/ext3_fs.h
    linux-2.6.16-rc1-bigblk/include/linux/ext3_fs.h
    --- linux-2.6.16-rc1.org/include/linux/ext3_fs.h 2006-01-18
    08:10:53.000000000 +0900
    +++ linux-2.6.16-rc1-bigblk/include/linux/ext3_fs.h 2006-01-18
    20:13:36.309026768 +0900
    @@ -84,7 +84,7 @@ struct statfs;
    * Macro-instructions used to manage several block sizes
    */
    #define EXT3_MIN_BLOCK_SIZE 1024
    -#define EXT3_MAX_BLOCK_SIZE 4096
    +#define EXT3_MAX_BLOCK_SIZE 65536
    #define EXT3_MIN_BLOCK_LOG_SIZE 10
    #ifdef __KERNEL__
    # define EXT3_BLOCK_SIZE(s) ((s)->s_blocksize)
    @@ -97,6 +97,7 @@ struct statfs;
    #else
    # define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
    #endif
    +#define EXT3_SECTOR_BITS 9 /* log2(SECTOR_SIZE) */
    #ifdef __KERNEL__
    #define EXT3_ADDR_PER_BLOCK_BITS(s)
    (EXT3_SB(s)->s_addr_per_block_bits)
    #define EXT3_INODE_SIZE(s) (EXT3_SB(s)->s_inode_size)


    -



    Lew Pitcher wrote:
    > nag wrote:
    > > hi,
    > > can any one know how to change the block size >4096 ,i changed it to
    > > 1024,2048,4096 by mke2fs tool....but now i want to change more than
    > > 4096 ,its not allowing to change ...

    >
    > You've been given the answer before, when you asked last week. Of
    > course, since you multiposted to so many groups, you probably missed
    > the answer you were given.
    >
    > > i think we can extend the block size upto page size(16 bit ) =64k

    >
    > Blocksize is just one part of the change. The /other/ part will break
    > compatability with current ext2 and ext3 implementations. But, you
    > would have known that (along with /which/ parts these are) if you had
    > read the responses you got the last time you asked.
    >
    > > ,,,at least i want to change upto 16k

    >
    > And I want a million dollars, tax free. I think the chances of you
    > getting a 16Kb blocksize in ext2 are worse than my getting a free
    > million bucks.
    >
    > > ....is there any way to achieve this..........

    >
    > Read the previous replies.
    >
    > Short answer: no, it can't be done (by you, without breaking anything)
    >
    > > presently i'm using redhat version 9(kernel 2.4.20-8)

    >
    > You have my condolences
    >
    > --
    > Lew Pitcher



  7. Re: block size more than 4096 in ext2/3

    In comp.os.linux.development.system nag :
    > hi,
    > can any one know how to change the block size >4096 ,i changed it to
    > 1024,2048,4096 by mke2fs tool....but now i want to change more than
    > 4096 ,its not allowing to change ...


    > i think we can extend the block size upto page size(16 bit ) =64k,,,at
    > least i want to change upto 16k....is there any way to achieve
    > this..........
    > presently i'm using redhat version 9(kernel 2.4.20-8)


    Ouch, you can't make block devices larger then 2TB on kernel 2.4,
    no matter which FS. This is a kernel restriction and has nothing
    to do with the FS used.

    Anyway this sounds like the original RH9 install kernel, I'd
    strongly suggest to reinstall the system with something more
    recent! You stuff is EOL. Kernel 2.6 should allow for larger
    block devices.

    Good luck

    --
    Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
    mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
    #bofh excuse 111: The salesman drove over the CPU board.

  8. Re: block size more than 4096 in ext2/3

    nag wrote:

    > bcoz , i want to capture the video stream ,for that i want big block
    > size ,,,it will take less time to write or read a big block..
    > joseph2k wrote:
    >> nag wrote:
    >>
    >> > hi,
    >> > can any one know how to change the block size >4096 ,i changed it to
    >> > 1024,2048,4096 by mke2fs tool....but now i want to change more than
    >> > 4096 ,its not allowing to change ...
    >> >
    >> > i think we can extend the block size upto page size(16 bit ) =64k,,,at
    >> > least i want to change upto 16k....is there any way to achieve
    >> > this..........
    >> > presently i'm using redhat version 9(kernel 2.4.20-8)

    >>
    >> Why in hell would you want to do such a damn fool thing as that? Is your
    >> brain crippled by MS fat file system thinking. There is no problem in
    >> building a terabyte file system in ext2/ext3 with 4096 byte blocks.
    >>
    >> --
    >> JosephKK
    >> Gegen dummheit kampfen die Gotter Selbst, vergebens.
    >> --Schiller


    Even HD video at DV50 captures just fine in ext2 at 4096, even 2048. Do not
    use ext3 for video capture as it has added overhead from journaling. Block
    size is not really important to video streaming; disk speed (rpm and seek
    time) makes the most difference, followed by IO speed. Do not mess up a
    reasonable, well balanced chasing an ill conceived idea about what makes a
    disk sub-system fast.

    --
    JosephKK
    Gegen dummheit kampfen die Gotter Selbst, vergebens.**
    --Schiller

+ Reply to Thread