* [linux-lvm] lvreduce used before resizing file system, what now? @ 2016-12-11 2:38 veleiro 2016-12-11 3:12 ` veleiro 0 siblings, 1 reply; 3+ messages in thread From: veleiro @ 2016-12-11 2:38 UTC (permalink / raw) To: linux-lvm Hello, I was following this guide https://help.ubuntu.com/community/ResizeEncryptedPartitions#Detailed_resizing_.2BAH4_Reducing_an_encrypted_partition on how to reduce the size of an lvm partition. Its kind of confusing, so going from a ext4 420G partition to 390G partition, I did the steps in the wrong order: sudo e2fsck -f /dev/mapper/ubuntu--vg-root # worked sudo lvreduce -L -30G /dev/ubuntu--vg/root # data warning sudo resize2fs -p /dev/mapper/ubuntu--vg-root 390g i tried to undo this by sudo resize2fs -p /dev/mapper/ubuntu--vg-root 420g # doesnt do anything, not enough blocks sudo lvresize -l +30G /dev/ubuntu-vg/root #clearly didnt do anything or work either Is there any procedures to get back to where i started at 420g OR to fix it for 390g? Thanks! veleiro ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] lvreduce used before resizing file system, what now? 2016-12-11 2:38 [linux-lvm] lvreduce used before resizing file system, what now? veleiro @ 2016-12-11 3:12 ` veleiro 2016-12-12 10:37 ` Zdenek Kabelac 0 siblings, 1 reply; 3+ messages in thread From: veleiro @ 2016-12-11 3:12 UTC (permalink / raw) To: linux-lvm Nevermind. Figured it out. resizing to max available did the trick. I was lucky! sudo lvresize -l +100%FREE /dev/ubuntu-vg/root On 2016-12-10 21:38, veleiro@openmailbox.org wrote: > Hello, > > I was following this guide > https://help.ubuntu.com/community/ResizeEncryptedPartitions#Detailed_resizing_.2BAH4_Reducing_an_encrypted_partition > on how to reduce the size of an lvm partition. Its kind of confusing, > so going from a ext4 420G partition to 390G partition, I did the steps > in the wrong order: > > sudo e2fsck -f /dev/mapper/ubuntu--vg-root > # worked > sudo lvreduce -L -30G /dev/ubuntu--vg/root > # data warning > sudo resize2fs -p /dev/mapper/ubuntu--vg-root 390g > > i tried to undo this by > sudo resize2fs -p /dev/mapper/ubuntu--vg-root 420g # doesnt do > anything, not enough blocks > sudo lvresize -l +30G /dev/ubuntu-vg/root #clearly didnt do anything > or work either > > Is there any procedures to get back to where i started at 420g OR to > fix it for 390g? > > Thanks! > veleiro ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] lvreduce used before resizing file system, what now? 2016-12-11 3:12 ` veleiro @ 2016-12-12 10:37 ` Zdenek Kabelac 0 siblings, 0 replies; 3+ messages in thread From: Zdenek Kabelac @ 2016-12-12 10:37 UTC (permalink / raw) To: LVM general discussion and development Dne 11.12.2016 v 04:12 veleiro@openmailbox.org napsal(a): > Nevermind. Figured it out. resizing to max available did the trick. I was lucky! > > sudo lvresize -l +100%FREE /dev/ubuntu-vg/root > > On 2016-12-10 21:38, veleiro@openmailbox.org wrote: >> Hello, >> >> I was following this guide >> https://help.ubuntu.com/community/ResizeEncryptedPartitions#Detailed_resizing_.2BAH4_Reducing_an_encrypted_partition >> And next time you will try to follow some 'dated' help pages - it's always good idea to check 'man' page as well. If you would did that, you would know about: lvreduce -r Regards Zdenek PS: BOLD warnings with '!' are not there just for fun... ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-12 10:37 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-12-11 2:38 [linux-lvm] lvreduce used before resizing file system, what now? veleiro 2016-12-11 3:12 ` veleiro 2016-12-12 10:37 ` Zdenek Kabelac
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).