holdSnapshot

Undocumented in source. Be warned that the author may not have intended to support it.
@SILdoc(`Create user holds on snapshots. If there is a hold on a snapshot, the snapshot can not be destroyed. (However, it can be marked for deletion by destroySnaps{defer:true} ). Parameters: string[string] holds: the dictionary of names of the snapshots to hold mapped to the hold names. int fileDescriptor: result of opening file Returns: string[] : list of snapshots that do not exist Errors: HoldFailure: if a hold was impossible on one or more of the snapshots. BadHoldCleanupFD: if fd is not a valid file descriptor associated with /dev/zfs The snapshots must all be in the same pool. If cleanupFd is set, then when the Fd is closed (including on process termination), the holds will be released. If the system is shut down uncleanly, the holds will be released when the pool is next opened or imported. Holds for snapshots which dont exist will be skipped and have an entry added to the return value, but will not cause an overall failure. No exceptions is raised if all holds, for snapshots that existed, were succesfully created. `)
void
holdSnapshot
(
string[string] holdsMap
,
int cleanupFd = -1
)

Meta