Changes between Version 1 and Version 2 of ESGFPublicationZFS


Ignore:
Timestamp:
Jun 6, 2017 4:10:15 PM (4 years ago)
Author:
zequi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ESGFPublicationZFS

    v1 v2  
    33Institutions store their datasets in different formats according to their own needs. Publication to projects, such as CORDEX, require from common formats that datasets must follow. Here we present a use case of ZFS to prepare data for publication.
    44
    5 = Background =
     5== Background ==
    66
    77Suppose that we have a zfs like this:
     
    1818== ZFS snapshots and clones ==
    1919
     20In first place, we would create a snapshot of the filesystem. This would not have any additional cost, since zfs snapshots only require disk space if the files are modified.
     21
     22{{{
     23# zfs snapshot tank/test/datasetA@today
     24# zfs list -r tank/test
     25NAME                       USED  AVAIL  REFER  MOUNTPOINT
     26tank/test                  104M  66.2G    23K  /tank/test
     27tank/test/datasetA         104M  66.2G   104M  /tank/test/productA
     28tank/test/datasetA@today      0      -   104M  -
     29}}}
     30
     31Now, we can change dataset attributes, for example, via ncatted and we would have two datasets: the modified one "tank/test/datasetA" and the legacy one "tank/test/datasetA@today" having required only the disk space for the original dataset.
     32
     33We also can make clones of the {{{tank/test/datasetA@today}}} in order to modify the legacy dataset, since zfs snapshots are read-only filesystems.
     34
     35{{{
     36# zfs clone tank/test/datasetA@today tank/test/datasetA
     37# zfs list -r tank/test
     38NAME                       USED  AVAIL  REFER  MOUNTPOINT
     39tank/test                  104M  66.2G    23K  /tank/test
     40tank/test/datasetA         104M  66.2G   104M  /tank/test/datasetA
     41tank/test/datasetA@today      0      -   104M  -
     42tank/test/datasetAClone       0  66.2G   104M  /tank/test/datasetAClone
     43}}}
     44
     45This clone can be promoted in case we need to use the legacy dataset again.
     46
     47{{{
     48# zfs promote tank/test/datasetAClone
     49# zfs list -r tank/test
     50NAME                       USED  AVAIL  REFER  MOUNTPOINT
     51tank/test                  104M  66.2G    23K  /tank/test
     52tank/test/datasetA            0  66.2G   104M  /tank/test/datasetA
     53tank/test/datasetA@today      0      -   104M  -
     54tank/test/datasetAClone    104M  66.2G   104M  /tank/test/datasetAClone
     55}}}
     56
     57For more information see http://docs.oracle.com/cd/E19253-01/819-5461/gbcxz/index.html.