- Begin by finding the uuid of the SR:
- Get the volume group device name:
- Create the new logical volume, with a proper name:
- Tell XenServer to scan the SR:
1 2 3 4 5 6 7 | root@xen1~]# <strong><span style="color: #0000ff;">xe sr-list</span></strong> uuid ( RO) : b55e5f09-8fef-4b5d-8dae-9410d630f205 name-label ( RW): SATA_7.2K 20T name-description ( RW): Hardware HBA SR host ( RO): type ( RO): lvmohba content-type ( RO): |
1 2 | root@xen1 ~]# <strong><span style="color: #0000ff;">vgs | awk '{print $1}' | grep b55e5f09-8fef-4b5d-8dae-9410d630f205</span></strong> VG_XenStorage-b55e5f09-8fef-4b5d-8dae-9410d630f205 |
1 2 | root@xen1 ~]# <strong><span style="color: #0000ff;">lvcreate -L3T -n"LV-"$(uuidgen) VG_XenStorage-b55e5f09-8fef-4b5d-8dae-9410d630f205</span></strong> Logical volume "LV-4e3da1e4-9e1a-4e12-96a1-d3c233efc0d5" created |
1 | root@xen1 ~]# <span style="color: #0000ff;"><strong>xe sr-scan uuid=b55e5f09-8fef-4b5d-8dae-9410d630f205</strong></span> |
After scanning the SR, the new VDI magically appeared under the Storage tab for this SR in XenCenter.
I then gave it a name and description, and assigned it to a VM just like any other VDI.
I always have to make a bunch of 2TB VDs, attach them to the VM, then sew them back together in the VM with ZFS or LVM. Which is tricky because FreeBSD is unsupported, and without Xentools you are limited to 3 attached VDs and 1 is used by the VM itself! So FreeBSD ZFS over 4TB is always an unsupported hack.
Have you tried this in a pool with an iscsi SR? If so, which node would I run lvcreate on? On any of them? I’m kinda loathe to setup iscsi iniators on each VM.
Another “work-around” I recently saw suggested in the forums was to bypass the XenServer SR and directly attach iSCSI storage to your VM. Although this would (may?) cause some headaches with regard to snapshots and/or migration.