libzfs-0.1.0.2: Bindings to libzfs, for dealing with the Z File System and Zpools.

Safe HaskellSafe
LanguageHaskell2010

System.Zfs.Zpool

Synopsis

Documentation

getZpool :: String -> Zfs z (Zpool z) Source

Gets a Zpool by name

getZpoolName :: Zpool z -> Zfs z String Source

Gets the name of some Zpool

forZpools :: MonadIO m => (Zpool z -> ZfsT z IO a) -> ZfsT z m [a] Source

Run some function for all available Zpools and return the results as a list

forZpools_ :: MonadIO m => (Zpool z -> ZfsT z IO ()) -> ZfsT z m () Source

Run some function for all available Zpools without result. Less expensive than forZpools.

getZpoolCount :: Zfs z Int Source

Get the number of available Zpools. Less expensive than `length $ getZpools'.

createZpool :: String -> [Vdev] -> Zfs z () Source

Create a zpool consisting of the given devices

getZpools :: Zfs z [Zpool z] Source

Get all available Zpools. Implemented using forZpools.

getZpoolConfig :: Zpool z -> Zfs z ZpoolConfig Source

Get Zpool config

destroyZpool :: Zpool z -> Bool -> Zfs z () Source

Destroy a zpool. If second argument is True, unmounting is enforced.

getVdevs :: Zpool z -> Zfs z [Vdev] Source

Get Vdevs. TODO: Whole disks, raidz

forVdevs :: MonadIO m => Zpool z -> (Vdev -> ZfsT z m a) -> ZfsT z m [a] Source

Iterate over all Vdevs in a pool