In the previous article, we looked at the scope of the ‘isi get’ CLI command. To compliment this, OneFS also provides the ‘isi set’ utility, which allows configuration of OneFS-specific file attributes.

 

This command works similarly to the UNIX ‘chmod’ command, but on OneFS-centric attributes, such as protection, caching, encoding, etc. As with isi set, files can be specified by path or LIN. Here are some examples of the command in action.

 

For example, the following syntax will recursively configure a protection policy of +2d:1n on /ifs/data/testdir1 and its contents:


# isi set –R -p +2:1 /ifs/data/testdir1


To enable write caching coalescer on testdir1 and its contents, run:


# isi set –R -c on /ifs/data/testdir1


With the addition of the –n flag, no changes will actually be made. Instead, the list of files and directories that would have write enabled is returned:


# isi set –R –n -c on /ifs/data/testdir2


The following command will configure ISO-8859-1 filename encoding on testdir3 and contents:


# isi set –R –e ISO-8859-1 /ifs/data/testdir3


To configure streaming layout on the file ‘test1’, run:


# isi set -l streaming test1


The following syntax will set a metadata-write SSD strategy on testdir1 and its contents:


# isi set –R -s metadata-write /ifs/data/testdir1


To performs a file restripe operation on the file2:


# isi set –r file2


To configure write caching on file2 via its LIN address, rather than file name:


# isi set –c on –L ` # isi get -DD file1 | grep -i LIN: | awk {'print $3}'`

1:0054:00f6

 

If you set streaming access, isi get reports that streaming prefetch is enabled:


# isi get file2.tst

default   6+2/2 concurrency on file2.tst

# isi set -a streaming file2.tst

# isi get file2.tst

POLICY    LEVEL PERFORMANCE COAL  FILE

default   6+2/2 streaming on    file2.tst

 

For streaming layout, the ‘@’ suffix notation indicates how many drives the file is written over. Streaming layout  optimizes for a larger number of spindles than concurrency or random.

 

# isi get file2.tst

POLICY    LEVEL PERFORMANCE COAL  FILE

default   6+2/2 concurrency on file2.tst

# isi set -l streaming file2.tst

# isi get file2.tst

POLICY    LEVEL PERFORMANCE COAL  FILE

default   6+2/2 streaming/@18 on    file2.tst

 

You can specify the number of drives to spread file across with ‘isi get –d’


# isi set -d 6 file2.tst

# isi get file2.tst

POLICY    LEVEL PERFORMANCE COAL  FILE

default   6+2/2 streaming/@6 on    file2.tst

 

The following table describes in more detail the various flags and options available for the isi set command:

 

Command Option

Description

-f

Suppresses warnings on failures to change a file.

-F

Includes the /ifs/.ifsvar directory content and any of its subdirectories. Without -F, the /ifs/.ifsvar directory content and any of its subdirectories are skipped. This setting allows the specification of potentially dangerous, unsupported protection policies.

-L

Specifies file arguments by LIN instead of path.

-n

Displays the list of files that would be changed without taking any action.

-v

Displays each file as it is reached.

-r

Performs a restripe on specified file.

-R

Sets protection recursively on files.

-p <policy>

Specifies protection policies in the following forms: +M Where M is the number of node failures that can be tolerated without loss of data.

+M must be a number from, where numbers 1 through 4 are valid.

+D:M Where D indicates the number of drive failures and M indicates number of node failures that can be tolerated without loss of data. D must be a number from 1 through 4 and M must be any value that divides into D evenly. For example, +2:2 and +4:2 are valid, but +1:2 and +3:2 are not.

Nx Where N is the number of independent mirrored copies of the data that will be stored. N must be a number, with 1 through 8 being valid choices.

-w <width>

Specifies the number of nodes across which a file is striped. Typically, w = N + M, but width can also mean the total of the number of nodes that are used. You can set a maximum width policy of 32, but the actual protection is still subject to the limitations on N and M.

-c {on | off}

Specifies whether write-caching (coalescing) is enabled.

-g <restripe goal>

Used in conjunction with the -r flag, -g specifies the restripe goal. The following values are valid:

  • repair
  • reprotect
  • rebalance
  • retune

-e <encoding>

Specifies the encoding of the filename.

-d <@r drives>

Specifies the minimum number of drives that the file is spread across.

-a <value>

Specifies the file access pattern optimization setting. Ie. default, streaming, random, custom, disabled.

-l <value>

Specifies the file layout optimization setting. This is equivalent to setting both the -a and -d flags. Values are concurrency, streaming, or random

--diskpool <id | name>

Sets the preferred diskpool for a file.

-A {on | off}

Specifies whether file access and protections settings should be managed manually.

-P {on | off}

Specifies whether the file inherits values from the applicable file pool policy.

-s <value>

Sets the SSD strategy for a file. The following values are valid: If the value is metadata-write, all copies of the file's metadata are laid out on SSD storage if possible, and user data still avoids SSDs. If the value is data, Both the file's meta- data and user data (one copy if using mirrored protection, all blocks if FEC) are laid out on SSD storage if possible.

avoid Writes all associated file data and metadata to HDDs only. The data and metadata of the file are stored so that SSD storage is avoided, unless doing so would result in an out-of-space condition.

metadata Writes both file data and metadata to HDDs. One mirror of the metadata for the file is on SSD storage if possible, but the strategy for data is to avoid SSD storage.

metadata-write Writes file data to HDDs and metadata to SSDs, when available. All copies of metadata for the file are on SSD storage if possible, and the strategy for data is to avoid SSD storage.

data Uses SSD node pools for both data and metadata. Both the metadata for the file and user data, one copy if using mirrored protection and all blocks if FEC, are on SSD storage if possible.

<file> {<path> | <lin>} Specifies a file by path or LIN.

--nodepool <id | name>

Sets the preferred nodepool for a file.

--packing {on | off}

Enables storage efficient packing off a small file into a shadow store container.

--mm-[access | packing | protection] { on|off}

The ‘manually manage’ prefix flag for the access, packing, and protection options described above. This ‘—mm’ flag controls whether the SmartPools job will act on the specified file or not. On means SmartPools will ignore the file, and vice versa.