Solved

mounting VMFS in linux

Posted on 2008-06-11
2
13,618 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
ID: 21762401
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
ID: 21762989
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I show you step by step with screenshots to assist you - HOW TO: Deploy and Install the VMware vCenter Server Appliance 6.5 (VCSA 6.5), with some helpful tips along the way.
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

807 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