Re: [ovirt-devel] Storage in VDSM questions

2016-06-27 Thread Shmuel Melamud
Hi!

On Thu, Jun 23, 2016 at 9:51 AM, Liron Aravot  wrote:

>
> 3. What hsm.spmSchedule() method does?
>>
> Schedules a task to be executed as SPM (used to perform operation that
> alter
> the shared storage or data operations currently).
>

​But SPM is a particular host.​ What does this method do, if it is called
not on SPM host? Returns error? Or somehow transfers the task to the SPM
host?



> 7. Why in HSM we are using vars.task.getSharedLock(STORAGE, sdUUID)
>> sometimes instead of domain lock?
>>
> The task lock (which uses the resource manager) is used to acquire in
> memory logical lock within the current host.
> Theoretical example- you wouldn't want to attempt to delete a domain while
> you create a volume on it.
>

​But this lock works only inside the host. So, if some other host will try
to create a volume, this lock will not help. So what's​

11. What methods dom.linkBCImage(imgPath, imgUUID) and
> dom.unlinkBCImage(imgUUID) do?
>
Creates/Removes a symlink to a given image.

​Where this symlink is located? What is its purpose?​

​​

> ​
> ​
> ​
> ​> ​
> 12. What methods dom.activateVolumes(imgUUID, imgVolumes) and
> dom.deactivateImage(imgUUID) do?
>
> ​
​
​
Can you be a bit more specific in the question? I don't have much to add
> ​
​
​
over the method names.

​I understand that it activates/deactivates volumes. But what does it mean?
What is an "active" volume and how does it differ from "inactive"?​

​Shmuel​
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] Storage in VDSM questions

2016-06-22 Thread Liron Aravot
>
> -- Forwarded message --
> From: Shmuel Melamud 
> Date: Wed, Jun 22, 2016 at 4:51 PM
> Subject: [ovirt-devel] Storage in VDSM questions
> To: devel 
>
>
> Hi!
>
> I have a bunch of questions related to storage in VDSM. I would be happy
> if anybody familiar with the subject can help me with them.
>
> 1. What is HSM? IRS?
>

IRS = SPM
HSM=non SPM host


> 2. What is SDM?
>
SDM= Storage Domain Management
A feature currently under development that provides alternate method to SPM
to manage shared storage.


> 3. What hsm.spmSchedule() method does?
>
Schedules a task to be executed as SPM (used to perform operation that alter
the shared storage or data operations currently).


> 4. What does domainMonitor.getHostId(vol_info.sd_id) method return?
>
I'd recomment to do some SANLock reading (see below).
Basically, its the id the host uses to acquire locks on the shared storage.

http://linux.die.net/man/8/sanlock
http://old.ovirt.org/SANLock

>
> Storage domain
>
> 5. What is StorageDomainManifest? Why there are separate StorageDomain and
> StorageDomainManifest classes? (And the same with Volume and
> VolumeManifest.)
>
Those are changes made in order to share "SPM" related code with "SDM"
related code (as not all of the code is relevant for both).
alitke/nsoffer could share more information on the decisions behind adding
those.

> 6. What does sd_manifest.domain_lock(host_id) guard? Why do we need the
> host_id parameter?
>
see answer to question 4.


> 7. Why in HSM we are using vars.task.getSharedLock(STORAGE, sdUUID)
> sometimes instead of domain lock?
>
The task lock (which uses the resource manager) is used to acquire in
memory logical lock within the current host.
Theoretical example- you wouldn't want to attempt to delete a domain while
you create a volume on it.

8. What does sd_manifest.get_volume_artifacts(img_id, vol_id) return?
>
> Resource manager
>
> 9. What is ResourceManager?
>
Resource manager is basically a in memory lock manager in vdsm.

> 10. What rmanager.acquireResource(image_res_ns, img_id, lockType) does?
> What types of resources it may be used with?
>

Well, the best answer would be the simple one - its used to acquire a
resource, you can specify a namespace and id, the lock will be taken on
namespace_ID
so basically you can acquire lock on the same id under different namespaces.

>
> Images and volumes
>
> 11. What methods dom.linkBCImage(imgPath, imgUUID) and
> dom.unlinkBCImage(imgUUID) do?
>
Creates/Removes a symlink to a given image.


> 12. What methods dom.activateVolumes(imgUUID, imgVolumes) and
> dom.deactivateImage(imgUUID) do?
>
Can you be a bit more specific in the question? I don't have much to add
over the method names.

>
>
13. What method dom.getVolumeLease(imgUUID, volUUID) does?
>
see related SANLock question before.

> 14. What methods volume.prepare() and volume.teardown() do?
>
> Thanks in advance for your answers!
>
> Shmuel
>
> ___
> Devel mailing list
> Devel@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
>
>
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

[ovirt-devel] Storage in VDSM questions

2016-06-22 Thread Shmuel Melamud
Hi!

I have a bunch of questions related to storage in VDSM. I would be happy if
anybody familiar with the subject can help me with them.

1. What is HSM? IRS?
2. What is SDM?
3. What hsm.spmSchedule() method does?
4. What does domainMonitor.getHostId(vol_info.sd_id) method return?

Storage domain

5. What is StorageDomainManifest? Why there are separate StorageDomain and
StorageDomainManifest classes? (And the same with Volume and
VolumeManifest.)
6. What does sd_manifest.domain_lock(host_id) guard? Why do we need the
host_id parameter?
7. Why in HSM we are using vars.task.getSharedLock(STORAGE, sdUUID)
sometimes instead of domain lock?
8. What does sd_manifest.get_volume_artifacts(img_id, vol_id) return?

Resource manager

9. What is ResourceManager?
10. What rmanager.acquireResource(image_res_ns, img_id, lockType) does?
What types of resources it may be used with?

Images and volumes

11. What methods dom.linkBCImage(imgPath, imgUUID) and
dom.unlinkBCImage(imgUUID) do?
12. What methods dom.activateVolumes(imgUUID, imgVolumes) and
dom.deactivateImage(imgUUID) do?
13. What method dom.getVolumeLease(imgUUID, volUUID) does?
14. What methods volume.prepare() and volume.teardown() do?

Thanks in advance for your answers!

Shmuel
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel