From: Andreas Dilger Date: Wed, 8 Jun 2011 08:34:44 +0000 (-0600) Subject: LU-399 do not use mke2fs -E resize for large LUNs X-Git-Tag: 2.0.63.0~13 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=82a3a9d16c5a9c09255f43b324e160b79cb73e0d;p=fs%2Flustre-release.git LU-399 do not use mke2fs -E resize for large LUNs The mo_device_size variable is in units of kB, so take this into account correctly when computing the filesystem block count. The "-E resize" option is being used to align metadata on 1MB IO boundaries, but it does not work for devices larger than 2^32 blocks. A better long-term solution is to fix mke2fs so that it does this alignment itself based on the s_raid_stride value. Change-Id: I2e4104b8ad490076bfaa6a49842124d79e3bf880 Signed-off-by: Andreas Dilger Reviewed-on: http://review.whamcloud.com/912 Tested-by: Hudson Reviewed-by: Yu Jian Tested-by: Yu Jian Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index 53b9317..b0062cb 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -721,7 +721,7 @@ int make_lustre_backfs(struct mkfs_opts *mop) * Only useful for filesystems with < 2^32 blocks due to resize * limitations. */ if (IS_OST(&mop->mo_ldd) && mop->mo_device_sz > 100 * 1024 && - mop->mo_device_sz / L_BLOCK_SIZE <= 0xffffffff) { + mop->mo_device_sz * 1024 / L_BLOCK_SIZE <= 0xffffffffULL) { unsigned group_blocks = L_BLOCK_SIZE * 8; unsigned desc_per_block = L_BLOCK_SIZE / 32; unsigned resize_blks;