Hot answers tagged resize2fs
4
You should not use df because it shows the size as reported by the filesystem (in this case, ext4).
Use the dumpe2fs -h /dev/mapper/ExistingExt4 command to find out the real size of the partition. The -h option makes dumpe2fs show super block info without a lot other unnecessary details. From the output, you need the block count and block size.
...
...
3
You must tell apart the resizing of a block device (here: /dev/sdb4) from the resizing of a file system. A file system can be smaller but not bigger than the underlying block device.
You should make a backup of the partition table:
sfdisk -d /dev/sdb > ~/sfdisk_sdb.txt
Then you make a copy of that file and adapt the line that looks similar to this:
...
2
If you shrinked your LV without shrinking your filesystem first, it's corrupt and the data on it is lost, since files were likely stored in the now longer accessible areas. Filesystems do not like this at all and you may not be able to repair it.
If you didn't write any data yet to the other LV which now occupies the space, your best bet is to restore the ...
1
Is /dev/sdb5 still a different partition? Then what you have to do is either repartition the space and combine /dev/sdb4 with /dev/sdb5.
Oh I assume nothing is in /dev/sdb5 that is important because you're its going to be destroyed in the process.
Another way, still destructive:
- pvcreate /dev/sdb5
- vgextend ..... /dev/sdb5
- lvextend .....
- ...
Only top voted, non community-wiki answers of a minimum length are eligible
