I have a headless Ubuntu server install inside a VM, running on Hyper-V using lvm
. I have full access to the VM, but no access to the Hyper-V environment (so can't boot with a LiveCD).
I need to expand my filesystem as I've already eexpanded my physical disk at the virtual level, but am having issues as sda1-5 are already in use.
Is there anything I can do to make use of the space assigned to the server but not used?
My mounted volumes:
root@SRVLIN01:~# mount | grep --regexp "^//[0-9]" --regexp "^/dev"
/dev/mapper/SRVLIN01--vg-root on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/sda1 on /boot type ext2 (rw,relatime,block_validity,barrier,user_xattr,acl,stripe=4)
root@SRVLIN01:~#
My logical volumes:
root@SRVLIN01:~# lvdisplay --maps
--- Logical volume ---
LV Path /dev/SRVLIN01-vg/root
LV Name root
VG Name SRVLIN01-vg
LV UUID 0GWjvA-b7H7-nLqX-TOtV-VNdR-QFT3-nhucpd
LV Write Access read/write
LV Creation host, time SRVLIN01, 2017-05-04 09:40:59 +0100
LV Status available
# open 1
LV Size 117.51 GiB
Current LE 30083
Segments 3
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Segments ---
Logical extents 0 to 14722:
Type linear
Physical volume /dev/sda5
Physical extents 0 to 14722
Logical extents 14723 to 14725:
Type linear
Physical volume /dev/sda5
Physical extents 15234 to 15236
Logical extents 14726 to 30082:
Type linear
Physical volume /dev/sda4
Physical extents 0 to 15356
--- Logical volume ---
LV Path /dev/SRVLIN01-vg/swap_1
LV Name swap_1
VG Name SRVLIN01-vg
LV UUID KFFa26-3GQY-Fbc3-QIU2-BdRe-h7Af-s16fKE
LV Write Access read/write
LV Creation host, time SRVLIN01, 2017-05-04 09:40:59 +0100
LV Status available
# open 2
LV Size 2.00 GiB
Current LE 511
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
--- Segments ---
Logical extents 0 to 510:
Type linear
Physical volume /dev/sda5
Physical extents 14723 to 15233
My physical volumes:
root@SRVLIN01:~# pvdisplay
--- Physical volume ---
PV Name /dev/sda5
VG Name SRVLIN01-vg
PV Size 59.52 GiB / not usable 2.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 15237
Free PE 0
Allocated PE 15237
PV UUID ljFlcO-kfjd-bx2d-74DJ-BY3S-zoKM-dBmfiJ
--- Physical volume ---
PV Name /dev/sda4
VG Name SRVLIN01-vg
PV Size 60.00 GiB / not usable 0
Allocatable yes
PE Size 4.00 MiB
Total PE 15360
Free PE 3
Allocated PE 15357
PV UUID WY90Op-u2Bz-nVTf-D2ed-q4Zu-lEgW-e4ZLfY
sda3
-sda5
are not mounted. What is preventing you from shrinkingsda4
and adding its space tosda5
? 0:-) – Fabby Jul 10 '19 at 19:22The honest answer is because I don't know how to ..I'm not even sure how you've determined that sda3-5 aren't mounted?
– c-hri-s Jul 12 '19 at 07:49df -h
, so assuming they're not mounted. andsda2
is just an extended partition. Please [edit] your question and provide the output tomount | grep --regexp "^//[0-9]" --regexp "^/dev"
, then leave a comment @Fabby – Fabby Jul 12 '19 at 08:57