mounting VMFS in linux

To simplify my backup system, it would be preferable for me to be able to mount a snapshot of the VMFS residing on my SAN. Is there a linux tool for that ?
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

palekarConnect With a Mentor Commented:
mount-vmfs is a program that mounts VMFS (VMware ESX Server File System) file systems. It is useful for automatically mounting partitions with valid VMFS file systems on the console operating system.

In its simplest usage, mount-vmfs does not take any arguments. It checks every SCSI device available to virtual machines for valid file systems. If a valid file system is found, mount-vmfs mounts it at /vmfs/vmhba<a>:<t>:<l>:<p>, where <a> specifies the SCSI adapter number, <t> specifies the SCSI target, <l> specifies the LUN (logical unit number) and <p> specifies the disk partition. If the disk has no partitions and the disk has a valid file system, <p> is zero.

If a partition has an associated file system name (vmkfstools -S), then
mount-vmfs also creates a symbolic link from /vmfs/<fsname> to the corresponding mount point (/vmfs/vmhba<a>:<t>:<l>:<p>).

The reverse operation - unmounting all VMFS partitions - can be performed by executing umount-vmfs.

By default, mount-vmfs does not mount any VMFS file systems that have the shared or public attribute. File systems with these attributes set are intended to be accessed by multiple ESX Server computers. Thus, it does not make sense to mount these file systems automatically on any one server. However, mount-vmfs will also mount any such file systems if you include the -f flag on the command line.

In addition, an individual file system can be mounted explicitly by supplying its device name or file system name as an argument to mount-vmfs. The format for the command is

mount-vmfs vmhba0:2:0:1

This mounts the file system on the specified partition if that partition holds a VMFS file system.

You can use the regular mount command to mount VMFS file systems. The file system type is vmfs and the device name is vmhba<a>:<t>:<l>:<p>. The format for the command is

mount -t vmfs vmhba0:1:0:2 /vmfs/vmhba0:1:0:2

This mounts partition 2 of the disk with target 1 on the adapter vmhba0.

Although VMFS file systems may appear similar to any other file system such as ext2, VMFS is mainly intended to store large files such as disk images. It does not support directory hierarchies. New file systems can be created using vmkfstools -C.

The reported file length of all VMFS files (disk images) is 512 bytes longer than the disk image. The additional 512 bytes contain certain file attributes such as the size of the disk image represented by the file. VMFS files that are not disk images do not incur this 512-byte overhead.


Disk images tend to be large. Unfortunately, the console operating system does not support files greater than 4GB and there is only limited functionality for files between 2GB and 4GB. The file size field of the stat system call has only 32 bits, therefore stat returns incorrect information for files equal to or bigger than 4GB. For such files, VMFS returns 4GB-1 as the file size in the stat system call. NFS and scp are known to run into this limitation, while FTP and cp are not affected by it.

VMFS files support standard permissions of read, write and execute for owner, group and other. The files do not support setuid or setgid flags. The VMFS directory has the same permissions as /tmp, which means that anyone can create a file in the directory, but users can read or modify only those files for which they have appropriate permissions.

Currently, VMFS file names are limited to 128 bytes.
larstrConnect With a Mentor Commented:
You can't mount vmfs from a normal linux machine. VMFS is a vmware proprietary file system that is only mounted (but not by "normal" means) in the Service Console on an ESX Server.

Through VCB you will however be able to mount virtual disk files, but VCB is currently only available on windows platform.

All Courses

From novice to tech pro — start learning today.