3.4.5.1.4 Removing Disk Objects

The server MUST maintain a list of detected disks. When the server discovers that a disk was removed, it MUST remove the corresponding disk object from the list of storage management objects. For each callback object that is registered in the list of callback objects, the server MUST call the callback object's IVdsAdviseSink::OnNotify (Opnum 3) method with a VDS_NOTIFICATION structure that has the following attributes:

  • objectType member is VDS_NTT_DISK.

  • disk member is a VDS_DISK_NOTIFICATION that has the following attributes:

    • ulEvent is VDS_NF_DISK_DEPART.

    • diskId is the VDS_OBJECT_ID of the disk object that was removed.

If the disk being removed is a basic disk, the pack that the disk belongs to is also removed. In this case, the server MUST remove the corresponding pack object from the list of storage management objects. Then, for each callback object that is registered in the list of callback objects, the server MUST call the callback object's IVdsAdviseSink::OnNotify (Opnum 3) method with a VDS_NOTIFICATION structure that has the following attributes:

  • objectType member is VDS_NTT_PACK.

  • pack member is a VDS_PACK_NOTIFICATION that has the following attributes:

    • ulEvent is VDS_NF_PACK_DEPART.

    • packId is the VDS_OBJECT_ID of the pack object that was removed.