beautypg.com

Creating a folder with an affinity (cvmkdir), Creating and pre-allocating a file (cvmkfile), Creating a folder with an affinity ( cvmkdir ) – Apple Xsan 1.0 User Manual

Page 91: Creating and pre-allocating a file ( cvmkfile )

background image

Appendix B

Using the Command Line

91

Creating a Folder With an Affinity (cvmkdir)

You can use the

cvmkdir

command to create a folder with an affinity for a particular

storage pool in an Xsan volume.

$ cvmkdir [-k affinity] directory

Creating and Pre-Allocating a File (cvmkfile)

You can use the

cvmkfile

command to allocate space for a file on an Xsan volume.

$ cvmkfile [-k affinity] [-p] [-s] [-w] [-z] size(k|m|g) filename

Example

Allocate 2 GB of space for the file

data1

on the storage pool

datasets

:

$ cvmkfile -k datasets 2g data1

Parameter

Description

-k

Optional parameter for specifying the name of the storage pool to
be associated with the directory (folder). If you omit this parameter,
Xsan creates a folder without an affinity.

affinity

The name of a storage pool’s affinity key. In Xsan, this is the same
as the name of the storage pool. You can use the cvadmin show
long

command to see a storage pool’s affinity key.

directory

The name of the folder.

Parameter

Description

-k affinity

Allocate space for the file on the storage pool with the specified
affinity key.

affinity

– the affinity key (in Xsan, the affinity key is the same

as the name of the storage pool)

You can use the cvadmin show long command to see a
storage pool’s affinity key.

-p

Force future extensions of the file to be aligned on block
boundaries.

-s

Force the file allocation to align with block boundaries.

-w

Set file size as indicated by size.

-z

Set the contents of the file to zeros.

size(k|m|g)

A number specifying the amount of space to allocate to the file.

size

– a number

k

– kilobytes

m

– megabytes

g

– gigabytes

filename

The name of the file to allocate.

LL0192.book Page 91 Thursday, July 29, 2004 5:20 PM