lsm_local_disk_link_type_get - Man Page

Query disk link type.

Synopsis

int lsm_local_disk_link_type_get (const char *disk_path, lsm_disk_link_type *link_type, lsm_error **lsm_err);

Arguments

disk_path

String. The path of disk, example "/dev/sdb".:

link_type

Output pointer of lsm_disk_link_type.

lsm_err

Output pointer of lsm_error. Error message could be: retrieved via lsm_error_message_get. Memory should be freed by lsm_error_free.

Version

1.3

Description

Query the disk link type of specified disk path. For SATA disks connected to SAS SES enclosure, will return LSM_SCSI_LINK_TYPE_ATA. Require permission to open /dev/sdX(root user or disk group).

Possible value of lsm_disk_link_type:
* LSM_DISK_LINK_TYPE_UNKNOWN
   When error or unknown.
* LSM_DISK_LINK_TYPE_FC
    Fibre Channel.
* LSM_DISK_LINK_TYPE_SSA
    Serial Storage Architecture, Old IBM tech.
* LSM_DISK_LINK_TYPE_SBP
    Serial Bus Protocol, used by IEEE 1394.
* LSM_DISK_LINK_TYPE_SRP
    SCSI RDMA Protocol.
* LSM_DISK_LINK_TYPE_ISCSI
    Internet Small Computer System Interface.
* LSM_DISK_LINK_TYPE_SAS
    Serial Attached SCSI.
* LSM_DISK_LINK_TYPE_ADT
    Automation/Drive Interface Transport Protocol, often used by Tape.
* LSM_DISK_LINK_TYPE_ATA
    PATA/IDE or SATA.
* LSM_DISK_LINK_TYPE_USB
    USB disk.
* LSM_DISK_LINK_TYPE_SOP
    SCSI over PCI-E.
* LSM_DISK_LINK_TYPE_PCIE
    PCI-E, e.g. NVMe.

Return

Error code as enumerated by 'lsm_error_number':
   * LSM_ERR_OK
       On success.
   * LSM_ERR_INVALID_ARGUMENT
       When any argument is NULL
   * LSM_ERR_NO_MEMORY
       When no memory.
   * LSM_ERR_LIB_BUG
       When something unexpected happens.
   * LSM_ERR_NOT_FOUND_DISK
       When provided disk path not found.
   * LSM_ERR_PERMISSION_DENIED
       Insufficient permission to access provided disk path.

Info

April 2021 Libstoragemgmt C API Manual