brintos

brintos / linux-shallow public Read only

0
0
Text · 3.0 KiB · b0f80ea Raw
145 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3Blocks4------5 6ext4 allocates storage space in units of “blocks”. A block is a group of7sectors between 1KiB and 64KiB, and the number of sectors must be an8integral power of 2. Blocks are in turn grouped into larger units called9block groups. Block size is specified at mkfs time and typically is104KiB. You may experience mounting problems if block size is greater than11page size (i.e. 64KiB blocks on a i386 which only has 4KiB memory12pages). By default a filesystem can contain 2^32 blocks; if the '64bit'13feature is enabled, then a filesystem can have 2^64 blocks. The location14of structures is stored in terms of the block number the structure lives15in and not the absolute offset on disk.16 17For 32-bit filesystems, limits are as follows:18 19.. list-table::20   :widths: 1 1 1 1 121   :header-rows: 122 23   * - Item24     - 1KiB25     - 2KiB26     - 4KiB27     - 64KiB28   * - Blocks29     - 2^3230     - 2^3231     - 2^3232     - 2^3233   * - Inodes34     - 2^3235     - 2^3236     - 2^3237     - 2^3238   * - File System Size39     - 4TiB40     - 8TiB41     - 16TiB42     - 256TiB43   * - Blocks Per Block Group44     - 8,19245     - 16,38446     - 32,76847     - 524,28848   * - Inodes Per Block Group49     - 8,19250     - 16,38451     - 32,76852     - 524,28853   * - Block Group Size54     - 8MiB55     - 32MiB56     - 128MiB57     - 32GiB58   * - Blocks Per File, Extents59     - 2^3260     - 2^3261     - 2^3262     - 2^3263   * - Blocks Per File, Block Maps64     - 16,843,02065     - 134,480,39666     - 1,074,791,43667     - 4,398,314,962,956 (really 2^32 due to field size limitations)68   * - File Size, Extents69     - 4TiB70     - 8TiB71     - 16TiB72     - 256TiB73   * - File Size, Block Maps74     - 16GiB75     - 256GiB76     - 4TiB77     - 256TiB78 79For 64-bit filesystems, limits are as follows:80 81.. list-table::82   :widths: 1 1 1 1 183   :header-rows: 184 85   * - Item86     - 1KiB87     - 2KiB88     - 4KiB89     - 64KiB90   * - Blocks91     - 2^6492     - 2^6493     - 2^6494     - 2^6495   * - Inodes96     - 2^3297     - 2^3298     - 2^3299     - 2^32100   * - File System Size101     - 16ZiB102     - 32ZiB103     - 64ZiB104     - 1YiB105   * - Blocks Per Block Group106     - 8,192107     - 16,384108     - 32,768109     - 524,288110   * - Inodes Per Block Group111     - 8,192112     - 16,384113     - 32,768114     - 524,288115   * - Block Group Size116     - 8MiB117     - 32MiB118     - 128MiB119     - 32GiB120   * - Blocks Per File, Extents121     - 2^32122     - 2^32123     - 2^32124     - 2^32125   * - Blocks Per File, Block Maps126     - 16,843,020127     - 134,480,396128     - 1,074,791,436129     - 4,398,314,962,956 (really 2^32 due to field size limitations)130   * - File Size, Extents131     - 4TiB132     - 8TiB133     - 16TiB134     - 256TiB135   * - File Size, Block Maps136     - 16GiB137     - 256GiB138     - 4TiB139     - 256TiB140 141Note: Files not using extents (i.e. files using block maps) must be142placed within the first 2^32 blocks of a filesystem. Files with extents143must be placed within the first 2^48 blocks of a filesystem. It's not144clear what happens with larger filesystems.145