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

Safe HaskellSafe
LanguageHaskell2010

System.Zfs.Zpool

Synopsis

Documentation

getZpool :: String -> Zfs Zpool #

Gets a Zpool by name

getZpoolName :: Zpool -> Zfs String #

Gets the name of some Zpool

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

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

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

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

getZpoolCount :: Zfs Int #

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

createZpool :: String -> [Vdev] -> Zfs () #

Create a zpool consisting of the given devices

getZpools :: Zfs [Zpool] #

Get all available Zpools. Implemented using forZpools.

getZpoolConfig :: Zpool -> Zfs ZpoolConfig #

Get Zpool config

destroyZpool :: Zpool -> Bool -> Zfs () #

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

getVdevs :: Zpool -> Zfs [Vdev] #

Get Vdevs. TODO: Whole disks, raidz

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

Iterate over all Vdevs in a pool