Solved

mounting VMFS in linux

Posted on 2008-06-11
2
13,391 Views
Last Modified: 2013-12-16
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 ?
0
Comment
Question by:drezzzz
2 Comments
 

Accepted Solution

by:
palekar earned 250 total points
Comment Utility
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.

Limitations

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.
0
 
LVL 18

Assisted Solution

by:larstr
larstr earned 250 total points
Comment Utility
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.

Lars
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

VM backup deduplication is a method of reducing the amount of storage space needed to save VM backups. In most organizations, VMs contain many duplicate copies of data, such as VMs deployed from the same template, VMs with the same OS, or VMs that h…
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Teach the user how to install log collectors and how to configure ESXi 5.5 for remote logging Open console session and mount vCenter Server installer: Install vSphere Core Dump Collector: Install vSphere Syslog Collector: Open vSphere Client: Config…
This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now