Simulator Discussions

How to commit files to WORM state on simulator using snaplock volume via java application

bberg
5,886 Views

We have insatlled simulator 7-mode on to a VM and created a snaplock volume .I am able to write a file on to it via java application. Next thing what i need is to commit that file to a WORM state . Following are the steps suggested by compliance and management pdf.

 

1. Create a storage system connection

 

2. Set the retention period by getting volume complicance time .

 

3. Set the file to WORM state by using the retention period calculated in step 2

 

4. close storage system

 

My questiion is how to connect to simulator to get volume compliance time?

 

Is there any other way to commit a file to WORM state without using ONTApi

 

Thanks

1 ACCEPTED SOLUTION

Harry_Redl
5,874 Views

Hello,

set the file attributes to ReadOnly (remove the write permission) OR set the autocommit period (2hrs minimum) on the volume level and wait.

Harry

View solution in original post

10 REPLIES 10

Harry_Redl
5,875 Views

Hello,

set the file attributes to ReadOnly (remove the write permission) OR set the autocommit period (2hrs minimum) on the volume level and wait.

Harry

bberg
5,850 Views

Hi i have set the attriubutes to read (chmod 444 <filename> . How long i have to wait to see the affect because i dont want toi use the autocommit feature .

 

Thanks

Harry_Redl
5,844 Views

Hi,

once the file is set to ReadOnly (444 in you case) then it is commited to WORM immediately. Check the file status (ONTAP CLI command) using "file fingerprint -x pathname" - should return detailed information.

Have you initialized the compliance clock? How is your retention set?

Harry

bberg
5,837 Views

My Compliance clock is intialized when creating the volume. I did not explicitly set the retention of file . 

 

<fingerprint><fingerprint-info><fingerprint-algorithm>sha-256</fingerprint-algorithm><fingerprint-start-time>1453756045</fingerprint-start-time><formatted-fingerprint-start-time>Mon Jan 25 21:07:25 GMT 2016</formatted-fingerprint-start-time><fingerprint-scope>data_and_metadata</fingerprint-scope><fingerprint-version>2</fingerprint-version><fingerprint-input-path>/vol/vol0/shantanu/copyfile.txt</fingerprint-input-path><filer-id>4082367488</filer-id><filer-name>cluster1</filer-name><snaplock-license>compliance</snaplock-license><snaplock-system-compliance-clock>1453741464</snaplock-system-compliance-clock><formatted-snaplock-system-compliance-clock>Mon Jan 25 17:04:24 GMT 2016</formatted-snaplock-system-compliance-clock><volume-name>vol0</volume-name><volume-uuid>7dcbe876-8813-4928-8b76-fef6350480a7</volume-uuid><volume-type>flexible</volume-type><volume-containing-aggregate>aggr0</volume-containing-aggregate><aggregate-uuid>8935d82a-44db-4ddb-b5cb-381c7047b585</aggregate-uuid><metadata-files><file-fingerprint-info><path>/vol/vol0/shantanu/copyfile.txt</path><fsid>3177631895</fsid><fileid>22893</fileid><file-type>regular</file-type><file-size>68</file-size><creation-time>1453740052</creation-time><formatted-creation-time>Mon Jan 25 16:40:52 GMT 2016</formatted-creation-time><modified-time>1453751174</modified-time><formatted-modified-time>Mon Jan 25 19:46:14 GMT 2016</formatted-modified-time><changed-time>1453751186</changed-time><formatted-changed-time>Mon Jan 25 19:46:26 GMT 2016</formatted-changed-time><access-time>1453752454</access-time><formatted-access-time>Mon Jan 25 20:07:34 GMT 2016</formatted-access-time><owner-id>500</owner-id><group-id>500</group-id><data-fingerprint>VVjMppsuIy+z27Q4YSa+gOqywF1RR0Q0sU18Kjzfne0=</data-fingerprint><metadata-fingerprint>ac63++NnU0PlFE8TsSpO6/ldLteLmFS9UQ6S7eKcUEQ=</metadata-fingerprint></file-fingerprint-info></metadata-files><fingerprint-end-time>1453756045</fingerprint-end-time><formatted-fingerprint-end-time>Mon Jan 25 21:07:25 GMT 2016</formatted-fingerprint-end-time></fingerprint-info></fingerprint>

 

Above is my output for fingerprint command i ran

Harry_Redl
5,832 Views

Hi,

if I read the output correctly, your file is "/vol/vol0/shantanu/copyfile.txt"

It seems you have created the file on the root volume, which is not SnapLock volume.

You need to create a new aggregate with "-L" option (enterprise or compliance) and then a volume in this aggregate.

Harry

bberg
5,826 Views

It looks wierd but i think this is my actual snaplock volume . Is there any command i can use to make it sure that thius volume is my sanplock volume? 

Harry_Redl
5,823 Views

Hi,

this is from my ONTAP simulator

testnasrzsim1> vol options snaplock_12y
nosnap=off, nosnapdir=off, minra=off, no_atime_update=on, nvfail=off,
ignore_inconsistent=off, snapmirrored=off, create_ucode=off,
convert_ucode=off, maxdirsize=16291, schedsnapname=ordinal,
fs_size_fixed=off, snaplock_enterprise, guarantee=volume,
svo_enable=off, svo_checksum=off, svo_allow_rman=off,
svo_reject_errors=off, no_i2p=off, fractional_reserve=100,
snaplock_autocommit_period=2h, snaplock_default_period=12d,
snaplock_minimum_period=0y, snaplock_maximum_period=30y, extent=off,
try_first=volume_grow, read_realloc=off, snapshot_clone_dependency=off,
dlog_hole_reserve=off, nbu_archival_snap=off

 

Harry

bberg
5,807 Views

Hi hary,

 

You were right this is not snaplock volume. I am able to figure out my snaplock compliance share .I am figuring out how to mount that share.

 

Thanks

bberg
4,074 Views

Hi,

 

I am trying to mount the snaplock share is getting mounted only as root. Is there any permisiion i need to change or snaplock share always get mounbted as root?

 

 

bberg
5,833 Views

I tried one more file and set retention using touch -a -t 201601260000 <filename> command and then changed the mode  to readonly still i am getting file type as<regular> and not worm

 

 

 

Public