I set-up a server with LVM, and I just recently extended one of my logical volumes from 25TB to 35.
root@server:/home/user# df -h /dev/mapper/vg--data-lv--data
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg--data-lv--data 25T 9.3T 15T 40% /DATA
root@server:/home/user# lvs /dev/mapper/vg--data-lv--data
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv-data vg-data -wi-ao---- 34.90t
In order to apply the change to the filesystem, I ran e2fsck and then resize2fs, but resize2fs keeps asking me to run e2fsck first :
root@server:/home/user# resize2fs /dev/vg-data/lv-data
resize2fs 1.43.5 (04-Aug-2017)
Please run 'e2fsck -f /dev/vg-data/lv-data' first.
root@server:/home/user# e2fsck -f /dev/vg-data/lv-data
e2fsck 1.43.5 (04-Aug-2017)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/vg-data/lv-data: 672943/836247552 files (3.1% non-contiguous), 2546845858/6689948672 blocks
root@server:/home/user# resize2fs /dev/vg-data/lv-data
resize2fs 1.43.5 (04-Aug-2017)
Please run 'e2fsck -f /dev/vg-data/lv-data' first
I've been looking all over the web, but I still can't get what the problem is about. I found someone having a similar issue, and it was because e2fsck and resize2fs were running on different versions. This is not my case as you can see above (e2fsprogs is version 1.43.5).
I also found this very old Ubuntu bug report refering to a time issue. I checked, and I indeed had a network issue which resulted in a wrong time on my system. I fixed it, and I even checked the hwclock was synced with the systems date. But it still doesn't work, and I still can't resize my filesystem.
I absolutely don't get this, since there's not even a single error/warning message (and since it worked one day before when doing the exact same operation on a smaller lvm partition).
Maybe someone has an idea ??
EDIT :
Problem solved thanks to wurtel ! Easy solution : don't unmount the partition and do an online resizing... The solution is so easy and seems so obvious... I feel really stupid... Thank you very much
root@server:/home/user# mount -a
root@server:/home/user# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg--data-lv--data 25T 9.3T 15T 40% /DATA
root@server:/home/user# resize2fs /dev/vg-data/lv-data
resize2fs 1.43.5 (04-Aug-2017)
Filesystem at /dev/vg-data/lv-data is mounted on /DATA; on-line resizing required
old_desc_blocks = 3191, new_desc_blocks = 4467
The filesystem on /dev/vg-data/lv-data is now 9367890944 (4k) blocks long.
root@server:/home/user# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg--data-lv--data 35T 9.3T 24T 29% /DATA