- #UBUNTU VOLUME MANAGER HOW TO#
- #UBUNTU VOLUME MANAGER INSTALL#
- #UBUNTU VOLUME MANAGER UPDATE#
- #UBUNTU VOLUME MANAGER WINDOWS 8#
I installed Ubuntu 14.10 LTS using entire disk one huge LVM (I know what's the point of one huge LVM) but wanted to add another two LVM's for another OS and a data drive. Replace your new UUID in place of the old-uuid UUID=9e99b37a-38af-4987-85eb-92048abd9825 none swap sw 0 0Īlternatively, you could replace the UUID mechanism and use /dev/ubuntu/swap_1, e.g. Which outputs /dev/ubuntu/swap_1: UUID="9e99b37a-38af-4987-85eb-92048abd9825" TYPE="swap"Įdit /etc/fstab from your root LV and insert the UUID value in place of the old UUID. Steps for blkid on my system are as follows:
#UBUNTU VOLUME MANAGER UPDATE#
In the fstab file you need to find the swap entry similar to below and update the hexidecimal after UUID= with the value reported by blkid. Once the resizing is all finished, you will need to mount /dev/ubuntu/root /mnt edit /mnt**/etc/fstab**. The new swap, if you create a new one to ensure it's appended to the root LV as I suggest above, will have a different UUID and therefore your /etc/fstab will not match. That way you can be sure you're A) using all of the partition's size for LVM and not losing space by making it inaccessible, and B) not cutting off vital data from the PV by misinterpreting binary KiB/MiB/GiB for decimal KB/MB/GB or vice versa during the fdisk operation.
Then it's the scary part in editing the partition table ( fdisk) to downsize the partition to the PV's new size, thereby freeing up space for the Windows installer to use.įor the downsizing of the partition I'd recommend to go slightly larger, by a few MB, than the PV reports it's size as and upsize the PV and root LV to fill the free extents. Once that is done you should be able to pvresize the physical volume. This should force it to be directly appended to the root LV in terms of position. I'd, now that you've got the smaller root LV, lvremove the swap LV and recreate it. dev/sda5 ubuntu lvm2 a- 698.04g 150g yyy zzz 0 freeĪfter that use the gparted and resize the LVM to maximum used area and rest will be in unallocated space. dev/sda5 ubuntu lvm2 a- 698.04g 150g xxx nnn swap 0 linear /dev/sda5:xxx-yyy(-1) Now use the command below to remove external fragmentation - sudo pvmove -alloc anywhere /dev/sda5:yyy-zzz dev/sda5 ubuntu lvm2 a- 698.04g 150g yyy zzz swap 0 linear /dev/sda5:yyy-zzz dev/sda5 ubuntu lvm2 a- 698.04g 150g xxx nnn 0 free dev/sda5 ubuntu lvm2 a- 698.04g 150g 0 xxx root 0 linear /dev/sda:0-xxx Pvs -v -segments /dev/sda5 This will show the output like below So, you need to move that free space using the command below That means after root and swap_1 partition. You have to rearrange the unallocated space at the end of the LVM. So I thought I could run pvresize -setphysicalvolumesize /dev/sda5 /dev/sda5: cannot resize to xxxxx extents as later ones are allocated.
#UBUNTU VOLUME MANAGER INSTALL#
Now I need to shrink the Physical Partition down so I can create a new Physical partition with the space to install Windows 8. Which successfully shrunk the logical partition. So, after some extended chat I came down to this command sudo lvresize -verbose -resizefs -L -150G /dev/ubuntu/root I am asking here if this is the correct thing to do before I bust my system.
This prevents me from doing anything, I can select the partition, and there is an option for "deactivate" which If I am correct I believe is deactivating swap? If I do that I can manipulate the partition. So, the Ubuntu partition has a lock icon next to it.
#UBUNTU VOLUME MANAGER HOW TO#
The issue is that I cannot work out how to shrink the partition, normally it's fine from the Gparted (gparted-live-0.14.1-6-i486.iso) live iso, Simply resize and you are good to go.īut this time Ubuntu has been installed with LVM.
#UBUNTU VOLUME MANAGER WINDOWS 8#
I wish to resize this to 450GB, so I can install Windows 8 as a dual boot. I told Ubuntu to overwrite everything as I was in a hurry, hence I only have the two partitions Ubuntu creates, the Boot Partition of a couple a hundred MB, and then everything else. I have installed Ubuntu 12.10 as the only OS on my system.