[ovirt-users] lvscan on rhv host

Nir Soffer nsoffer at redhat.com
Mon Mar 6 08:20:19 UTC 2017


On Mon, Mar 6, 2017 at 1:03 AM, Marcin Kruk <askifyouneed at gmail.com> wrote:

Please reply to the list, other users may find this discussion valuable.

> 1. perfect and clear explanation
> 2. Could you explain "These are probably OVF_STORE volumes, used to keep vms
> ovs.", what is vms ovs,
> and what valuable information is in te ovf file which you extracted?

OVF is standard format for describing a VM:
https://en.wikipedia.org/wiki/Open_Virtualization_Format

All the VM that have a disk on a storage domain are stored in
the OVF_STORE disks using OVF format, so you can restore
all the VM from storage if you lost your engine database.

Or, if you want to move entire storage domain from one setup to another,
you can detach the storage domain from one setup, attach to the other
setup, and import all the VMs.

The OVF is also used by hosted engine to obtain engine vm setup from
storage, and start the engine vm after a host is rebooted.

> 3. perfect and clear
> Thank you
>
> 2017-03-05 12:32 GMT+01:00 Nir Soffer <nsoffer at redhat.com>:
>>
>> On Sun, Mar 5, 2017 at 10:08 AM, Marcin Kruk <askifyouneed at gmail.com>
>> wrote:
>> > VDSM side, means RHV HOST side, right?
>> > I missed LVM tags, so the command:
>> > lvs -o vg_name,name,lv_tags is very helpful, thanks.
>> >
>> > 1. Is it a tool in command line to show: disk ID, alias, atached to
>> > fields?
>>
>> No, you need to extract this info manually.
>>
>> Here is an example
>>
>> # lvs -o lv_name,size,attr,tags aed577ea-d1ca-4ebe-af80-f852c7ce59bb
>>   LV                                   LSize   Attr       LV Tags
>>   91799827-85b8-450d-a521-42de12fa08e6   1.00g -wi-ao----
>>
>> IU_db343be2-f709-4835-b1c5-a1bbdb650b2a,MD_8,PU_93331705-46be-4cb8-9dc2-c1559843fd4a
>>   93331705-46be-4cb8-9dc2-c1559843fd4a   3.00g -wi-ao----
>>
>> IU_239d9e96-ad7d-4a7d-83af-d593877db11b,MD_7,PU_00000000-0000-0000-0000-000000000000
>>   dfbf69fc-3371-42d4-8298-415a6ad4244a 128.00m -wi-------
>>
>> IU_7324cafc-905f-475e-8217-1a919bcca9e9,MD_5,PU_00000000-0000-0000-0000-000000000000
>>   ea556b30-e62b-4d66-b832-459a5dd01890 128.00m -wi-------
>>
>> IU_aab45dbc-c016-4990-b834-ce455bbc4fef,MD_4,PU_00000000-0000-0000-0000-000000000000
>>   ids                                  128.00m -wi-ao----
>>   inbox                                128.00m -wi-a-----
>>   leases                                 2.00g -wi-a-----
>>   master                                 1.00g -wi-ao----
>>   metadata                             512.00m -wi-a-----
>>   outbox                               128.00m -wi-a-----
>>   xleases                                1.00g -wi-a-----
>>
>> What is dfbf69fc-3371-42d4-8298-415a6ad4244a?
>>
>> MD_5 means this volume metadata is at offset 5 * 512 in
>> 143dc2d0-8e1a-4b95-a306-2a26a7b4832f metadata
>>
>> # dd if=/dev/aed577ea-d1ca-4ebe-af80-f852c7ce59bb/metadata bs=512 count=1
>> skip=5
>>
>> # dd if=/dev/aed577ea-d1ca-4ebe-af80-f852c7ce59bb/metadata bs=512 count=1
>> skip=5
>> DOMAIN=aed577ea-d1ca-4ebe-af80-f852c7ce59bb
>> CTIME=1487525999
>> FORMAT=RAW
>> DISKTYPE=2
>> LEGALITY=LEGAL
>> SIZE=262144
>> VOLTYPE=LEAF
>> DESCRIPTION={"Updated":true,"Size":30720,"Last Updated":"Fri Feb 24
>> 20:49:24 EST 2017","Storage
>> Domains":[{"uuid":"aed577ea-d1ca-4ebe-af80-f852c7ce59bb"}],"Disk
>> Description":"OVF_STORE"}
>> IMAGE=7324cafc-905f-475e-8217-1a919bcca9e9
>> PUUID=00000000-0000-0000-0000-000000000000
>> MTIME=0
>> POOL_UUID=
>> TYPE=PREALLOCATED
>> GEN=0
>> EOF
>> 1+0 records in
>> 1+0 records out
>> 512 bytes (512 B) copied, 0.00146441 s, 350 kB/s
>>
>> So this is OVF_STORE disk, see bellow
>>
>> >
>> > 2. I found information about metadata, outbox etc volumes,
>> > but I can not find info about lvm volumes with 128 MiB size.
>> > Are these any metadata volumes? ex: from lvscan:
>> > ACTIVE
>> >
>> > '/dev/b41214a0-4748-47a8-85f2-9ad1e573ab10/57e904c5-3267-4d94-a52c-babb06912d90'
>> > [128.00 MiB] inherit' [128.00 MiB] inherit?
>>
>> These are probably OVF_STORE volumes, used to keep vms ovs.
>>
>> You can extract the data from these volumes like this:
>>
>> lvchange -ay
>> aed577ea-d1ca-4ebe-af80-f852c7ce59bb/dfbf69fc-3371-42d4-8298-415a6ad4244a
>>
>> # tar tvf
>> /dev/aed577ea-d1ca-4ebe-af80-f852c7ce59bb/dfbf69fc-3371-42d4-8298-415a6ad4244a
>> -rw-r--r-- 0/0             138 2017-02-25 03:49 info.json
>> -rw-r--r-- 0/0           11068 2017-02-25 03:49
>> 55e347d5-4074-4408-b782-c43011483845.ovf
>> -rw-r--r-- 0/0           10306 2017-02-25 03:49
>> bcb03d22-0799-4b0e-bcb3-f69954e6f5eb.ovf
>>
>> # tar xvf
>> /dev/aed577ea-d1ca-4ebe-af80-f852c7ce59bb/dfbf69fc-3371-42d4-8298-415a6ad4244a
>> bcb03d22-0799-4b0e-bcb3-f69954e6f5eb.ovf
>> bcb03d22-0799-4b0e-bcb3-f69954e6f5eb.ovf
>>
>> # dd if=bcb03d22-0799-4b0e-bcb3-f69954e6f5eb.ovf bs=512 count=1
>> <?xml version="1.0" encoding="UTF-8"?><ovf:Envelope
>> xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1/"
>>
>> xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
>>
>> xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> ovf:version="4.1.0.0"><References><File
>>
>> ovf:href="239d9e96-ad7d-4a7d-83af-d593877db11b/93331705-46be-4cb8-9dc2-c1559843fd4a"
>> ovf:id="93331705-46be-4cb8-9dc2-c15598431+0 records in
>> 1+0 records out
>> 512 bytes (512 B) copied, 8.0163e-05 s, 6.4 MB/s
>>
>> >
>> > 3. Are they removed? When, for example, the virtual machine or disk will
>> > be
>> > deleted ?
>>
>> Yes, we create an lv when you create a disk or create snapshot, and remove
>> them
>> when you delete vm, disk, or snapshot.
>>
>> Nir
>
>


More information about the Users mailing list