Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
vsp_41_esx_server_config.pdf
Скачиваний:
10
Добавлен:
06.02.2016
Размер:
2.67 Mб
Скачать

ESX Configuration Guide

or

/vmfs/volumes/file_system_label

nTo specify a VMFS file, use this format:

/vmfs/volumes/file system label|file system UUID/[dir]/myDisk.vmdk

You do not need to enter the entire path if the current working directory is the parent directory of myDisk.vmdk.

For example,

/vmfs/volumes/datastore1/rh9.vmdk

vmkfstools Options

The vmkfstools command has several options. Some of the options are suggested for advanced users only.

The long and single-letter forms of the options are equivalent. For example, the following commands are identical.

vmkfstools --createfs vmfs3 --blocksize 2m vml.vml_ID:1 vmkfstools -C vmfs3 -b 2m vml.vml_ID:1

-v Suboption

The -v suboption indicates the verbosity level of the command output. The format for this suboption is as follows:

-v --verbose number

You specify the number value as an integer from 1 through 10.

You can specify the -v suboption with any vmkfstools option. If the output of the option is not suitable for use with the -v suboption, vmkfstools ignores -v.

NOTE Because you can include the -v suboption in any vmkfstools command line, -v is not included as a suboption in the option descriptions.

File System Options

File system options allow you to create a VMFS file system. These options do not apply to NFS. You can perform many of these tasks through the vSphere Client.

Creating a VMFS File System

Use the vmkfstools command to create a VMFS file system.

-C --createfs vmfs3

-b --blocksize block_sizekK|mM -S --setfsname fsName

This option creates a VMFS-3 file system on the specified SCSI partition, such as vml.vml_ID:1. The partition becomes the file system's head partition.

VMFS-2 file systems are read-only on any ESX host. You cannot create or modify VMFS-2 file systems but you can read files stored on VMFS-2 file systems. VMFS-3 file systems are not accessible from ESX 2.x hosts.

CAUTION You can have only one VMFS volume for a LUN.

238

VMware, Inc.

Appendix C Using vmkfstools

You can specify the following suboptions with the -C option:

n-b --blocksize – Define the block size for the VMFS-3 file system. The default block size is 1MB. The block_size value you specify must be a multiple of 128kb, with a minimum value of 128kb. When you enter a size, indicate the unit type by adding a suffix of m or M. The unit type is not case sensitive. vmkfstools interprets m or M to mean megabytes and k or K to mean kilobytes.

n-S --setfsname – Define the volume label of a VMFS volume for the VMFS-3 file system you are creating. Use this suboption only in conjunction with the -C option. The label you specify can be up to 128 characters long and cannot contain any leading or trailing blank spaces.

After you define a volume label, you can use it whenever you specify the VMFS volume for the vmkfstools command. The volume label appears in listings generated for the Linux ls -l command and as a symbolic link to the VMFS volume under the /vmfs/volumes directory.

To change the VMFS volume label, use the Linux ln -sf command. Use the following as an example: ln -sf /vmfs/volumes/UUID /vmfs/volumes/fsName

fsName is the new volume label to use for the UUID VMFS.

Example for Creating a VMFS File System

This example illustrates creating a new VMFS-3 file system named my_vmfs on the vml.vml_ID:1 partition. The file block size is 1MB.

vmkfstools -C vmfs3 -b 1m -S my_vmfs /vmfs/devices/disks/vml.vml_ID:1

Extending an Existing VMFS-3 Volume

Use the vmkfstools command to add an extend to a VMFS volume.

-Z --extendfs extention-device existing-VMFS-volume

This option adds another extent to a previously created VMFS volume existing-VMFS-volume. You must specify the full path name, for example /vmfs/devices/disks/vml.vml_ID:1, not just the short name vml.vml_ID:1. Each time you use this option, you extend a VMFS-3 volume with a new extent so that the volume spans multiple partitions. At most, a logical VMFS-3 volume can have 32 physical extents.

CAUTION When you run this option, you lose all data that previously existed on the SCSI device you specified in extension-device.

Example for Extending a VMFS-3 Volume

This example extends the logical file system by allowing it to span to a new partition.

vmkfstools -Z /vmfs/devices/disks/vml.vml_ID_2:1 /vmfs/devices/disks/vml.vml_ID_1:1

The extended file system spans two partitions—vml.vml_ID_1:1 and vml.vml_ID_2:2. In this example, vml.vml_ID_1:1 is the name of the head partition.

Listing Attributes of a VMFS Volume

Use the vmkfstools command to list attributes of a VMFS volume.

-P --queryfs

-h --human-readable

VMware, Inc.

239

ESX Configuration Guide

When you use this option on any file or directory that resides on a VMFS volume, the option lists the attributes of the specified volume. The listed attributes include the VMFS version number (VMFS-2 or VMFS-3), the number of extents comprising the specified VMFS volume, the volume label if any, the UUID, and a listing of the device names where each extent resides.

NOTE If any device backing VMFS file system goes offline, the number of extents and available space change accordingly.

You can specify the -h suboption with the -P option. If you do so, vmkfstools lists the capacity of the volume in a more readable form, for example, 5k, 12.1M, or 2.1G.

Upgrading a VMFS-2 to VMFS-3

You can upgrade a VMFS-2 file system to VMFS-3.

CAUTION The VMFS-2 to VMFS-3 conversion is a one-way process. After you have converted a VMFS-2 volume to VMFS-3, you cannot revert it back to a VMFS-2 volume.

You can upgrade a VMFS-2 file system only if its file block size does not exceed 8 MB.

When upgrading the file system, use the following options:

n-T --tovmfs3 -x --upgradetype [zeroedthick|eagerzeroedthick|thin]

This option converts a VMFS-2 file system VMFS-3 preserving all files on the file system. Before conversion, unload the vmfs2 and vmfs3 drivers and load the auxiliary file system driver, fsaux, with a module option fsauxFunction=upgrade.

You must specify the upgrade type using the -x --upgradetype suboption as one of the following:

n -x zeroedthick (default) – Retains the properties of VMFS-2 thick files. With the zeroedthick file format, disk space is allocated to the files for future use and the unused data blocks are not zeroed out.

n -x eagerzeroedthick – Zeroes out unused data blocks in thick files during conversion. If you use this suboption, the upgrade process might take much longer than with the other options.

n -x thin – Converts the VMFS-2 thick files into thin-provisioned VMFS-3 files. As opposed to thick file format, the thin-provisioned format doesn't allow files to have extra space allocated for their future use, but instead provides the space on demand. During this conversion, unused blocks of the thick files are discarded.

During conversion, the ESX file-locking mechanism ensures that no other local process accesses the VMFS volume that is being converted, although you need to make sure that no remote ESX host is accessing this volume. The conversion might take several minutes and returns to the command prompt when complete.

After conversion, unload the fsaux driver and load vmfs3 and vmfs2 drivers to resume normal operations.

n-u --upgradefinish

This option completes the upgrade.

240

VMware, Inc.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]