It is actually fairly easy to test.
1) Using Putty (or other solution) SSH into your ESX host.
2) If you’re not already, upgrade your login session to root by typing su – and enter root pass.
3) Create a directory by typing mkdir /mnt/test and then hitting enter.
4) Map this directory to the repository share by using the appropriate command below.
a. If your hosts are ESX3:
i. mount –t smbfs //repositoryname or IP/share /mnt/test –o username=xxxxxx
1. Note for above: repositoryname or IP means you can put the name of the repository device, server, etc or you can put the IP address of the same but there is no space there and you only put one or the other. You then, with no space, put the / and the share on that same device. Again with no space. There is a space between the –o (that is the letter o not a zero) and username=xxxxx. You need to put the username that you would use to access the repository where the xxxxx is. If it is a domain account you would put domain/username.
ii. Once you have typed in the command just hit enter and it should ask you for the password to the username that you typed in.
iii. If all is working it should return you to the command prompt. Proceed to other tests below.
iv. If there is an error you should work to resolve as vRanger will mostlikely not work until it is corrected.
b. If your hosts are ESX4:
i. mount –t cifs //repositoryname or IP/share /mnt/test –o username=xxxxxx
1. Note for above: repositoryname or IP means you can put the name of the repository device, server, etc or you can put the IP address of the same but there is no space there and you only put one or the other. You then, with no space, put the / and the share on that same device. Again with no space. There is a space between the –o (that is the letter o not a zero) and username=xxxxx. You need to put the username that you would use to access the repository where the xxxxx is. If it is a domain account you would put domain/username.
ii. Once you have typed in the command just hit enter and it should ask you for the password to the username that you typed in.
iii. If all is working it should return you to the command prompt. Proceed to other tests below.
iv. If there is an error you should work to resolve as vRanger will mostlikely not work until it is corrected.
You have validated that the ESX host can, at a minimum, make a connection. Please continue to ensure that all is working properly.
Just because the connection is made doesn’t mean all connectivity is working correctly. Keep in mind that the ESX host needs to be able to read and write large files to and from the repository uninterrupted.
Next we need to ensure that a file can be created and read from the repository.
1) Type cd /mnt/test and hit enter. This ensures we are in the right directory.
2) Type touch text.txt and hit enter. This will create a text.txt file that should appear in your repository share.
3) Using windows explorer go to the repository and open that text.txt. Type in this is a test and save and close the text.txt file.
4) Go back to your putty or ssh connection and type cat /mnt/test/text.txt and hit enter.
5) The text this is a test should appear above or at the beginning of your command prompt.
a. If you had any errors within this process they may point out that while you are able to connect to the repository you may not have read and/or write access to the repository.
Once you have done these two tests and things have worked correctly you can be fairly certain that access to your repository is working. If you have jobs that seem to start to copy data and then fail at some other point before they complete you may also want to try the following to ensure that a consistant reliable connection is being maintained. This may also be a good test if you are seeing slow network based backups as this will show you how long it takes to simply copy a file of a certain size from the ESX host to the repository.
To test the sustained copy ability you really need a file of fairly good size to copy. Usually these are available in an ESX environment as there are VMs that have good size disks. You can go to Virtual Center and create a snapshot of a VM and then use it’s VMName-flat.vmdk to copy to the repository but that would envolve using a possibly production machine so we will do this differently so that a non-prod machine can be used.
1) Go to Virtual Center and create a VM with a disk the size of the file you want to test copy with. Do not install an OS or even turn the machine on.
2) Return to your putty or SSH session and change directory (CD) into the directory of the VM that you created. (see below for help)
3) If the name of your VM you created was VMachine then you would use the following command:
a. cp VMachine-flat.vmdk /mnt/test (remember these commands are case sensitive.)
If the file is copied and shows completely in your repository then at this point you can be reasonably sure that the connectivity between this ESX host and the repositlry is working correctly.
Getting to the VMFS volumes where the VMs are located from the command line is fairly simple. From the original prompt when you first login you need to get into the mount point /vmfs. From here you need to go into volumes. Here you will see your volumes listed and you can access.
1) Connect to your ESX host with Putty or some other SSH client.
2) Once logged in upgrade your session to root level by typing su – and then hit enter.
3) From here you can simply type cd /vmfs/volumes and hit enter.
4) You are now in the location of all the VMFS volumes that your ESX host sees.
5) You can see a list of them by typing ls –lah and hitting enter.
6) These can be accessed by typing cd volumename and hitting enter.
a. Example: cd disk1
i. Helpful commands:
1. ls –lah list contents of the directory
2. vdf –h tells about space on VMFS volumes
3. cp copy
4. mv move a file or rename
5. rm –rf remove directory even if not empty
6. rm delete a file
**cleanup**
Once you are done with this testing you can easily remove the connection you made to /mnt/test.
1) Type umount /mnt/test and hit enter.
2) Also go to Virtual Center and delete the VM that you created to test the copy with.