/// Export given bdev over iscsi. That involves creating iscsi target and
/// adding the bdev as LUN to it.
Export given bdev over iscsi. That involves creating iscsi target and
adding the bdev as LUN to it.
Export given bdev over iscsi . That involves creating iscsi target and adding the bdev as LUN to it .
pub fn share(bdev_name: &str, bdev: &Bdev, side: Side) -> Result<()> {
    let iqn = match side {
        Side::Nexus => share_as_iscsi_target(
            bdev_name,
            bdev,
            ISCSI_PORTAL_GROUP_NEXUS,
            ISCSI_INITIATOR_GROUP,
        )?,
        Side::Replica => share_as_iscsi_target(
            bdev_name,
            bdev,
            ISCSI_PORTAL_GROUP_REPLICA,
            ISCSI_INITIATOR_GROUP,
        )?,
    };
    info!("Created iscsi target {} for {}", iqn, bdev_name);
    Ok(())
}
pub fn share ( bdev_name : & str , bdev : & Bdev , side : Side ) -> Result < ( ) > { let iqn = match side { Side :: Nexus => share_as_iscsi_target ( bdev_name , bdev , ISCSI_PORTAL_GROUP_NEXUS , ISCSI_INITIATOR_GROUP , ) ? , Side :: Replica => share_as_iscsi_target ( bdev_name , bdev , ISCSI_PORTAL_GROUP_REPLICA , ISCSI_INITIATOR_GROUP , ) ? , } ; info ! ( " " iqn bdev_name ) ; Ok ( ( ) ) }
Export given bdev over iscsi.
Export given bdev over iscsi .
bdev_name
&str
bdev
&Bdev
side
Side