Greetings,
I'm having trouble wrapping my head around the situation I've created for myself.
I have Hypervisor running KVM call it KVM01.
I have a guest VM named "NVR" running Ubuntu 18.04.
I was making a habit of passing LVMs to the guest, by creating an LVM storage
pool in KVM.
I now want to extend an LVM but I'm lost on the procedure.
Ubuntu Guest disk from dumpxml:
Code:
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source dev='/dev/vg2/NVR_video'/>
<backingStore/>
<target dev='vde' bus='virtio'/>
<alias name='virtio-disk4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
</disk>
On KVM01 I extended the LVM (was 9.77TB and now 11.77TB):
Code:
lvextend -L+2TB /dev/vg2/NVR_video
lvdisplay /dev/vg2/NVR_video
--- Logical volume ---
LV Path /dev/vg2/NVR_video
LV Name NVR_video
VG Name vg2
LV UUID d6jrxd-vvU8-LSBB-8yZ3-GZxa-7yzd-5ZOXi2
LV Write Access read/write
LV Creation host, time kvm002, 2019-10-13 11:28:38 -0400
LV Status available
# open 1
LV Size 11.77 TiB
Current LE 3084288
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 254:9
The guest does not see the space increase so On KVM01
I check disks on KVM01:
Code:
fdisk -l
Disk /dev/mapper/vg2-NVR_video: 11.8 TiB, 12936441495552 bytes, 25266487296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 2097152 bytes
Disklabel type: gpt
Disk identifier: 87730D55-9A95-4B85-873D-6287B581D174
Device Start End Sectors Size Type
/dev/mapper/vg2-NVR_video-part1 2048 20971517951 20971515904 9.8T Linux LVM
On the Guest:
Code:
root@nvr:~# pvdisplay
--- Physical volume ---
PV Name /dev/vde1
VG Name vg1
PV Size <9.77 TiB / not usable 2.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 2559999
Free PE 69631
Allocated PE 2490368
PV UUID XpwbsF-rIYU-Yliw-QlNL-5W1P-d6la-1puvbF
root@nvr:~# vgdisplay
--- Volume group ---
VG Name vg1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size <9.77 TiB
PE Size 4.00 MiB
Total PE 2559999
Alloc PE / Size 2490368 / 9.50 TiB
Free PE / Size 69631 / <272.00 GiB
VG UUID CRIFei-bQTd-DBef-bZfA-7MMg-QTvx-59YuVx
fdisk -l
Disk /dev/mapper/vg1-unifiVideo: 9.5 TiB, 10445360463872 bytes, 20401094656 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
What do I have to do on the host to get the increased size on
Code:
/dev/mapper/vg2-NVR_video-part1 2048 20971517951 20971515904 9.8T Linux LVM
I tried (without success):
Code:
# lvextend -L+2TB /dev/mapper/vg2-NVR_video-part1
skip_dev_dir: Couldn't split up device name vg2-NVR_video-part1.
"/dev/mapper/vg2-NVR_video-part1": Invalid path for Logical Volume.
Run `lvextend --help' for more information.
Here's how I added the disk and created the filesystem on the guest:
Code:
mkdir /videos
chown unifi-video:unifi-video /videos
parted /dev/vde
mklabel gpt
mkpart
start 2048s
end 100%
set 1 lvm on
align-check > opt > 1
quit
create LVM
vgcreate pvcreate /dev/vde1
vgcreate vg1 /dev/vde1
lvcreate -L 9.5TB -n unifiVideo vg1
mkfs.xfs /dev/vg1/unifiVideo
I think the above is where I goofed, by creating a "nested" LVM.
I should've simplly created a partition on /dev/vde then
formated that partition.
Where do I go from here?
Thanks in advance.
Bookmarks