How do I use SnapLock in the simulator?

          

Once licensed SnapLock is easy to use and has the advantage that disks with the SnapLock property can be physically destroyed without affecting real hardware.

  1. License SnapLock. SnapLock Enterprise is easier to work than SnapLock Compliance as you can simply offline and destroy an Enterprise volume.
  2. Run vol create -L with a number of disks that you want to add. For example (the warning messages don't appear if you are using SnapLock Enterprise):
    sim> vol create mywormvolume –L 2
    WARNING: You have requested the creation of a SnapLock volume. SnapLock volumes CANNOT be destroyed.
    The disks for this volume will be permanently allocated and will not be reusable for any other purpose.

    Are you REALLY sure you want to create this SnapLock volume? Yes
    Creation of a volume with 2 disks has been initiated.
    The disks need to be zeroed before addition to the volume. The process has been initiated and you will be notified by the system log as disks are added.
    sim> [snip]
    Thu May 22 16:56:26 GMT [config_async_0:notice]: Volume mywormvolume has been added to the system.
    sim>
  3. Perform any testing as appropriate. Note that if you manually create files instead of using an application designed for SnapLock then files will not be made WORM until you perform either a Linux chmod –w, use DOS attrib +R, or tick on Read Only in Windows Explorer. Once set, that’s it! Simply copying a read-only file to the simulator will not make it WORM.


Once your testing is complete the SnapLock volume can be destroyed using the following method:

  1. Take the volume offline.
    sim> vol offline mywormvolume
    Volume ‘mywormvolume’ is now offline.
  2. If you are using SnapLock Enterprise then simply vol destroy your volume. You need go no further - the disks are marked as spares and are available.

  3. Figure out which disks make up the volume and disk simpull them.
    sim> vol status –r mywormvolume
    Volume mywormvolume (offline, normal) (block checksums)
    Plex /mywormvolume/plex0 (online, normal, active)
    RAID group /mywormvolume/plex0/rg0 (normal)

    RAID Disk Device [snip the rest, not important]
    -------------------------
    parity v0.3
    data v0.4
    sim> disk simpull v0.3
    sim> Thu May 22 17:22:37 GMT [raid.config.filesystem.disk.missing:info]: Disk /mywormvolume/plex0/rg0/v0.3 Shelf 0 Bay 3
    [snip]
    Thu May 22 17:22:37 GMT [raid.disk.pulled:error]: Disk v0.3 has been pulled from the system.

    sim> disk simpull v0.4
    [snip]

    sim> halt
    CIFS local server is shutting down…

    [snip]
    [root@localhost /sim]# ./setup.sh –z –p
    Unattended install or reconfig.
    Deleting pulled disks.
    Loading defaults.
    [snip]
    [root@localhost /sim]#
  4. The disks are now deleted and can be re-created if required.