Linux – How to resize an EXT3 if default block size is changed to 1K from 4K

linuxrhel5

I am working over RHEL 5.4 and using LVMs over the storage LUNs for storing my files. Each LVM infact reaches the size up to 16TB on ext3 even. And my server is in production. Just for introduction of criticality of the server.

I have created an LVM partition with size 1TB initially. Actually this LVM is formatted with 1K block size which is different from default 4K block size. I achieved this by running the below command.

mkfs.ext3 -b 1024 /dev/mapper/<VGName>-<logical volume>

Now, I would like to increase a 2TB size for the above logical volume and ran the below command

lvextend -L +2T /dev/mapper/<VGName>-<logical volume>

But when I am trying to run resize2fs command as below:

nohup resize2fs /dev/mapper/<VGName>-<logical volume> &

I got the exit status as 1 and if I see in the nohup.out file, I could see the below lines:

resize2fs 1.39 (29-May-2006)
resize2fs: File too large while trying to determine filesystem size

Now, I could not understand how could I increase the size of the LVM partition. I provided you the inputs expecting the change in the block size may be the issue. If that is not the case please let me know for any other requirements.

Suggest me on urgent basis as it is in production.

Best Answer

Using mkfs command to change block site and also other utility to change the block site which below: 1) gpart 2) parted

Other option:

root@space:~# mkfs.ext4 –m 0 -b 4096 /dev/rootfs