Creating and pre-allocating a file (cvmkfile), Creating and pre-allocating a file ( cvmkfile ) – Apple Xsan 1.1 User Manual
Page 115

Appendix B
Using the Command Line
115
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 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.