Sample Header Ad - 728x90

LUKS-LVM partition resize problems

1 vote
1 answer
1009 views
I have a concerning adventure while trying to resize(shrink) my LUKS lvm partition. I wanted to shrink my partition so that I can easily copy my system to a new smaller sized drive. Before I started anything I deleted some files from my old disk to make some space available. Afterwards I booted from USB live ubuntu and I used the KDE partition manager to firstly unlock the LUKS partition. Afterwards I had my LVM root partition available and I used the resize option of the KDE partition manager to shrink it. This unfortunately resulted to the same issue as described here: https://unix.stackexchange.com/questions/565923/either-the-superblock-or-the-partition-table-is-likely-to-be-corrupt-after-pa And my problems started from a misunderstanding of one of the answers. So what I ended up doing is that I run the following command:
e2fsck -f /dev/the_unlocked_lvm_root
With the following selection of options:
e2fsck 1.45.5 (07-Jan-2020)
The filesystem size (according to the superblock) is 239771648 blocks
The physical size of the device is 125080576 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? no
Pass 1: Checking inodes, blocks, and sizes
Error reading block 126877728 (Input/output error) while getting next inode from scan.  Ignore error? yes
Force rewrite? yes
I pressed yes some times until I realized that I was not doing what I should. Right now I didn't restart my computer and I didn't do anything more. My question is basically how much damage I did, is the problem recoverable or did I loose all of my data? I am pretty concerned since when I stopped the e2fsck command it stated "Filesystem modified". Any feedback is appreciated!
Asked by VGe0rge (579 rep)
Jul 16, 2021, 10:31 PM
Last activity: Jun 5, 2022, 03:37 PM