![]() sudo pvcreate /dev/sdb3 (sda3 is where my logical volume resides).Booted back into my Ubuntu Server and ran these commands:.Booted into LiveCD again and used GParted to create exactly the same partitions on this new VHDX hard drive (sdb) that I had on my existing 6 TB dynamically expanding VHDX hard drive (sda) - even setting the flags, etc.Used Hyper-V to create a new dynamically expanding VHDX hard drive (this time only 250 GB) and attached it to my existing Ubuntu Server Hyper-V.So next I found this answer: How do I move my LVM 250 GB root partition to a new 120GB hard disk? This is where my question above picks up. Then I went into GParted GUI on the LiveCD and used that to shrink the partition to it's new 155 GB size and was left with a ton of unallocated space. I also think something along these lines might have worked but I didn't try: sudo lvreduce -resizefs -L 155G /dev// I believe the above commands: checks for errors, then shrinks the file system, then shrinks the logical volume (don't shrink to something smaller than new file system size you just shrunk), then extends the file system to use all available space on the logical volume. You should replace and with appropriate entries for your system. ![]() I booted into a LiveCD (Ubuntu Desktop 20.04) and in terminal ran these commands (I think - my memory is a bit hazy at this point): sudo e2fsck -f /dev/ ![]() How can I resize an LVM partition? (i.e: physical volume) OK, so I actually think I figured it out (with help from some of the websites below) - it was not easy.įirst, as mentioned, I had to previously (prior to asking the above question) reduce the size of everything in Ubuntu Server (posting below just to be complete) - I did that following the below websites:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |