Clone Functions

Clone functions provide the ability to create and destroy snap clones of files.

CLib does not provide the ability to determine the clone status of a file. To determine a file’s clone status utilise the GPFS command mmclone show <filename>.

Description

Examples

Create a clone of a file

>>> from arcapix.fs.gpfs.clib.clone import clone_snap, clone_copy
>>>
>>> # create clone parent 'base.img' of file 'test01.img'
... clone_snap('test01.img', 'base.img')
>>>
>>> # use clone parent to create file clone 'test02.img'
... clone_copy('base.img', 'test02.img')

Split a clone from its parent

>>> from arcapix.fs.gpfs.clib.clone import declone, clone_split
>>>
>>> # if a clone is non-empty, it has to be 'decloned'
... # before it can be split to remove clone references
... declone('test01.img')
>>>
>>> # split the decloned file from its parent
... clone_split('test01.img')