Translated message

A translation of this page exists in English.

4096 より大きいブロックサイズ (8192 など) で、ext3、ext4、xfsファイルシステムを作成することは可能ですか?

Solution Verified - Updated -

Issue

  • Ext3、Ext4、XFS などのローカルファイルシステムでブロックサイズを 8192 にしたいです。
  • ブロックサイズが 4KiB (4096 バイト) を超える Ext3、Ext4、または XFS ファイルシステムを作成することはできますか?
  • RHEL でサポートされている Ext3、Ext4 ブロックの最大サイズは何ですか?

    • ブロックサイズが 4 KiB を超える ext4 ファイルシステムをマウントできないのはなぜですか?
    • ブロックサイズが 4k を超える ext4 ファイルシステムを作成した後にマウントしようとすると、次のエラーメッセージが返されます。

      # mount -t ext4 /dev/sda1 /mnt
      mount: wrong fs type, bad option, bad superblock on /dev/sda1,
         missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
         dmesg | tail  or so.
      
      # dmesg | tail 
      EXT4-fs (sda1): bad block size 32768
      
  • RHEL でサポートされている XFS ブロックの最大サイズは何ですか?

    • XFS でサポートされる最大 pagesize は何ですか?
    • man mkfs.xfs によると、ブロックサイズは 65536 まで指定できます。

      $ man mkfs.xfs
      :
      -b block_size_options
             This option specifies the fundamental block size of the filesystem
             The valid block_size_options are: log=value or size=value
             and only one can be  supplied.   The  block  size  is  specified
             either as a base two logarithm value with log=, or in bytes with
             size=.  The default value is 4096 bytes (4 KiB), the minimum  is
             512,  and the maximum is 65536 (64 KiB).  XFS on Linux currently
             only supports pagesize or smaller blocks.
      :
      
    • 65536 まで指定できることを確認しました (下記参照)。ただし、Linux 上の XFS は現在、ページサイズ以下のブロックのみをサポートしているとも書かれています。

    # mkfs -t xfs -f -s size=4096 -b size=16384 /dev/sdb1
    meta-data=/dev/sdb1              isize=256    agcount=4, agsize=16368 blks
             =                       sectsz=4096  attr=2, projid32bit=1
             =                       crc=0        finobt=0
    data     =                       bsize=16384  blocks=65472, imaxpct=25
             =                       sunit=0      swidth=0 blks
    naming   =version 2              bsize=16384  ascii-ci=0 ftype=0
    log      =internal log           bsize=16384  blocks=512, version=2
             =                       sectsz=4096  sunit=1 blks, lazy-count=1
    realtime =none                   extsz=16384  blocks=0, rtextents=0
    
    mkfs -t xfs -f -s size=4096 -b size=32768 /dev/sdb1
    meta-data=/dev/sdb1              isize=256    agcount=4, agsize=8184 blks
             =                       sectsz=4096  attr=2, projid32bit=1
             =                       crc=0        finobt=0
    data     =                       bsize=32768  blocks=32736, imaxpct=25
             =                       sunit=0      swidth=0 blks
    naming   =version 2              bsize=32768  ascii-ci=0 ftype=0
    log      =internal log           bsize=32768  blocks=512, version=2
             =                       sectsz=4096  sunit=1 blks, lazy-count=1
    realtime =none                   extsz=32768  blocks=0, rtextents=0
    
    # mkfs -t xfs -f -s size=4096 -b size=65536 /dev/sdb1
    meta-data=/dev/sdb1              isize=256    agcount=4, agsize=4092 blks
             =                       sectsz=4096  attr=2, projid32bit=1
             =                       crc=0        finobt=0
    data     =                       bsize=65536  blocks=16368, imaxpct=25
             =                       sunit=0      swidth=0 blks
    naming   =version 2              bsize=65536  ascii-ci=0 ftype=0
    log      =internal log           bsize=65536  blocks=512, version=2
             =                       sectsz=4096  sunit=1 blks, lazy-count=1
    realtime =none                   extsz=65536  blocks=0, rtextents=0
    
    # mkfs -t xfs -f -s size=4096 -b size=131072 /dev/sdb1
    illegal block size 131072
    Usage: mkfs.xfs
    :
    • pagesize を超えて指定できるのに、ブロックサイズが pagesize を超えると、Red Hat も XFS をサポートしないということですか?

Environment

  • Red Hat Enterprise Linux (RHEL) 4、5、6、7、8
  • x86 アーキテクチャー
  • EXT3、EXT4、XFS などのローカルファイルシステム
    • xfsprogs

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content