get_block_for_drive


Description:

public Block get_block_for_drive (Drive drive, bool get_physical)

Gets a block device corresponding to drive.

The returned block device, if any, is for the whole disk drive, e.g. a partition block device is never returned.

Set get_physical to true if you need a block device that you can send low-level SCSI commands with (for multipath, this returns one of the physical paths). Set it to false if you need a block device that you can read/write data with (for multipath, this returns the mapped device).

Parameters:

this

A Client.

drive

A Drive.

get_physical

true to get a physical device, false to get the logical device.

Returns:

A Block or null if the requested kind of block device is not available - use unref to free the returned object.