[pve-devel] introduce linked disks

Stefan Priebe - Profihost AG s.priebe at profihost.ag
Mon Dec 17 11:27:00 CET 2012


Hi Dietmar,
Am 17.12.2012 11:20, schrieb Dietmar Maurer:
>> Am 17.12.2012 11:08, schrieb Dietmar Maurer:
>>>>> store1:/0/vm-0-disk-1.raw
>>>>>
>>>>> (owner is VM 0). But I am not sure if that is a good idea.
>>>>
>>>> The idea is to have entries like this one:
>>>> shared_scsi1:vm-117-disk-5
>>>> shared_virtio2:vm-117-disk-9
>>>>
>>>> We don't need the path as the PVE code always rely on the vm-(\d+)
>>>> number. So my idea was to do this here too.
>>>
>>> So how do we detect that a volume is shared? When storage name has
>> prefix 'shared_'?
>>
>> We have to possibilies:
>> 1.) Volume is shared FROM another guest:
>> shared_scsi1
>> So thisis pretty easy to detect by the shared_ prefix.
>>
>> 2.) Volume is shared TO another guest:
>> I can imagine to possibilities here:
>> - add an option to disk when the disk gets shared by another VM:
>> ...,cache=writeback,shared=1
>> or
>> to loop through all VMs when we need to know this.
>
> That sounds clumsy. What is wrong with my proposal?

So your idea is to prefix the controller (scsi, ide, virtio) on ALL 
guests. And the owner is just detected by the ID? (vm-$ID-disk-$I)

Stefan



More information about the pve-devel mailing list