PSTORAGE

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
PSTORAGE ATTRIBUTES
ADVANCED ATTRIBUTES
EXIT STATUS
EXAMPLES
AUTHOR
SEE ALSO

NAME

pstorage-set-attr, pstorage-get-attr − a tool for managing file/directory pstorage attributes

SYNOPSIS

pstorage [−c cluster] get−attr [−p] path

pstorage [−c cluster] set−attr [−R] [−p] path attr=value

DESCRIPTION

pstorage−set−attr(1) and pstorage−get−attr(1) are cluster management commands which allow you to retrieve and modify the current file/directory pstorage attributes, such as the number of replicas which should be maintained by the storage.

There are two syntaxes are avialable for your convenience:

1. Normally, when a mount point is available, a path to the file is provided. In this case, you do not need to specify cluster name as it will be deducted from the mount.

2. When the cluster is not mounted or the mount point is unknown for some reason, it is still possible to manipulate the attributes using the −p option. In this case, a relative cluster path must be used and the cluster name must be specified using the −c option.

Some attribute changes (e.g., increasing the number of data replicas) may take a long time before fully applied. The execution of the pstorage−set−attr(1) command completes as soon as the attributes are successfully modified but before they are fully applied to the data.

File attributes are inherited from directory attributes on creation.

OPTIONS

−c, −−cluster=CLUSTER_NAME (used together with −p option)

The name of the cluster to connect to. A valid cluster associated with the name is discovered using DNS or zeroconf (multicast). If the −c option is omitted, the cluster name is either deducted from the specified path or the PSTORAGE_NAME environment variable is used.

−p

Used to specify the relative cluster path if the mount point is not available. In this case, the cluster name must be specified using the −c option.

−R

Apply attribute changes recursively.

PSTORAGE ATTRIBUTES

replicas=norm[:min] − Replication level.

norm is the number of replicas to maintain normally. min is the minimum required number of replicas. For writes to a file chunk to succeed, the number of available replicas must be equal or larger than the min value. The number of replicas can go below the norm value if one or more Chunk Servers are unavailable at the moment.

If the min parameter is omitted, it is calculated automatically as follows:

• norm=1 â min=1

• norm=2 â min=1

• norm=3 â min=2 (recommended in production)

• norm>3 â min=n−2

The number of replicas must be in the range of 1−16.

a failure−domain=room|row|rack|host|disk − Placement policy for data replicas.

+ This parameter controls how replicas are distributed across Chunk Servers in the cluster. Together with host configuration files, it allows to configure failure domains to prevent the allocation of all chunk replicas from within the same failure domain (e.g., on the same host or rack). The proper configuration of failure domains may be very important for data availability in large−scale clusters. The default policy (failure−domain=host) prevents the allocation of more then single copy on the same host.

+ See pstorage−failure−domain(1) for more details.

tier=0−3 − Storage tier for file replicas.

Storage tiers can be configured during CS creation (pstorage−make−cs(1)) and changed dynamically for files to move data across different kinds of storage depending on performance requirements (e.g., SSD/SATA).

Depending on the global parameter mds.alloc.strict_tier (pstorage−config(1)), the tiering policy can be strict or advisory.

client−ssd−cache=0−1 − If set to 0, the file will not be placed in the SSD cache on the client. New files and directories inherit this attribute from the parent directory upon creation.

ADVANCED ATTRIBUTES

The following parameters are internal and MUST NOT be changed unless you are ABSOLUTELY sure of what you are doing. There is no guarantee that non−default values of these parameters will work in future versions.

mds−storage=0−1 − If set to 1, the file will be placed in the MDS journal instead of Chunk Servers. May be set at the directory level only. Files inherit it implicitly from the parent directory. Must NOT be used for conventional data, because it may consume MDS RAM.

chunk−size=4096−2147483648 − Internal data chunk size. The higher the value the less metadata is tracked in the cluster and the lower is MDS RAM usage.

stripe−depth=1−16 and strip−width=4096−2147483648 − Data striping parameters. Allows configuring data striping across multipe Chunk Servers for higher random I/O rates on small datasets. These parameters may be deprecated in the future as data split into chunks already produces random I/O to be striped on data volumes larger than a single chunk.

EXIT STATUS

0

Success

Non−zero

Failure (syntax or usage error, configuration error, cluster failure, unexpected error).

EXAMPLES

Get root directory attributes using a path relative to the cluster root:

pstorage −c CLUSTER get−attr −p /

Get directory attributes using a local (mount) path:

pstorage get−attr /mount_point/directory

Set 3 replicas for the whole cluster:

pstorage −c CLUSTER set−attr −R −p / replicas=3

pstorage set−attr −R /mount_point replicas=3

Disable client SSD caching for the files of a specific VM/CT:

pstorage set−attr −R /mount_point/vmprivate/VM.pvm client−ssd−cache=0

AUTHOR

Copyright © 2011−2013, Parallels, Inc. All rights reserved.

SEE ALSO

pstorage(7), pstorage−overview(7), pstorage−stat(1), pstorage−mount(1), pstorage−config−files(7), pstorage−failure−domain(1)