volume

package
v1.31.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatVolume

func FormatVolume(volumeID string) (err error)

FormatVolume - Formats a volume with the NTFS format.

func GetDiskNumberFromVolumeID

func GetDiskNumberFromVolumeID(volumeID string) (uint32, error)

GetDiskNumberFromVolumeID - gets the disk number where the volume is.

func GetVolumeIDFromTargetPath

func GetVolumeIDFromTargetPath(mount string) (string, error)

GetVolumeIDFromTargetPath - gets the volume ID given a mount point, the function is recursive until it find a volume or errors out

func IsVolumeFormatted

func IsVolumeFormatted(volumeID string) (bool, error)

IsVolumeFormatted - Check if the volume is formatted with the pre specified filesystem(typically ntfs).

func ListVolumesOnDisk

func ListVolumesOnDisk(diskNumber uint32, partitionNumber uint32) (volumeIDs []string, err error)

ListVolumesOnDisk - returns back list of volumes(volumeIDs) in a disk and a partition.

func MountVolume

func MountVolume(volumeID, path string) error

MountVolume - mounts a volume to a path. This is done using the Add-PartitionAccessPath for presenting the volume via a path.

func ResizeVolume

func ResizeVolume(volumeID string, size int64) error

ResizeVolume - resizes a volume with the given size, if size == 0 then max supported size is used

func UnmountVolume

func UnmountVolume(volumeID, path string) error

UnmountVolume - unmounts the volume path by removing the partition access path

func WriteVolumeCache

func WriteVolumeCache(volumeID string) (err error)

WriteVolumeCache - Writes the file system cache to disk with the given volume id

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL