I installed Ubuntu with encryption and LVM on my entire haddisk...

Now I want to resize it.

How do I do This...

Following this link gave me errors on step 2 -

How can I resize an LVM partition? (i.e: physical volume)


ubuntu@ubuntu:~$ sudo e2fsck -f /dev/sda5 e2fsck 1.42.5 (29-Jul-2012) ext2fs_open2: Bad magic number in super-block e2fsck: Superblock invalid, trying backup blocks... e2fsck: Bad magic number in super-block while trying to open /dev/sda5

The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193

what do I do?

  • I guess /dev/sda5 is encrypted volume, with an LVM PV on top of that, not the volume containing a filesystem. Please post full output of pvs, vgs, lvs, cat /etc/crypttab and fdisk -l somewhere. You'll probably end up resizing: partition, crypto volume, LVM PV, LVM VG, LVM LV and filesystem. Yes, a lot of work. – gertvdijk Nov 14 '12 at 22:52

You should concern that when your volume is encrypted it means everything on it,is encrypted; even your file table and you should connect to it through your encrypting application.if you are using as a volume for a virtual machine first mount it (It will automatically done when you start VM) then its mounted.

generally you can copy all the data to another bigger volume.sounds like your file is something like loop files in Linux.that contains an operating system or data.its not easy to type every detail on commands as i'm on mobile browser.but if you don't know how to make bigger file, format it,copy all data and mount again, tell that I'll help you later

Second edit:

Like I misunderstood,thought you are working on a file.its a logical partiton but nothing changed at whole story.i guess secret is behind your encryption fact.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.