Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMountPointNotFound = errors.New("mount point not found")
ErrMountPointNotFound is returned when a given path does not appear to be a mount point.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // AddToDB adds the iSCSI node record for the target. AddToDB() error // DeviceOpened determines if the device is in use elsewhere // on the system, i.e. still mounted. DeviceOpened(pathname string) (bool, error) // FormatAndMount formats the given disk, if needed, and mounts it. That is // if the disk is not formatted and it is not being mounted as read-only it // will format it first then mount it. Otherwise, if the disk is already // formatted or it is being mounted as read-only, it will be mounted without // formatting. FormatAndMount(source string, target string, fstype string, options []string) error // Login logs into the iSCSI target. Login() error // Logout logs out the iSCSI target. Logout() error // RemoveFromDB removes the iSCSI target from the database. RemoveFromDB() error // SetAutomaticLogin sets the iSCSI node to automatically login at machine // start-up. SetAutomaticLogin() error // UnmountPath is a common unmount routine that unmounts the given path and // deletes the remaining directory if successful. UnmountPath(path string) error }
Interface mounts iSCSI voumes.
func NewFromDevicePath ¶
NewFromDevicePath extracts the IQN, IPv4 address, and port from a iSCSI mount device path. i.e. /dev/disk/by-path/ip-<ip>:<port>-iscsi-<IQN>-lun-1
func NewFromMountPointPath ¶
NewFromMountPointPath gets /dev/disk/by-path/ip-<ip>:<port>-iscsi-<IQN>-lun-1 from the given mount point path.
Click to show internal directories.
Click to hide internal directories.