VMware Cloud Community
adave007
Contributor
Contributor

Mount an eSata hard drive enclosure in ESX or ESXi

Please see the attached picture and you should see what I'm trying to do. So pretty much what I do is copy my VM's from my SAN to another ESXi box that has a large 1.5TB hard drive. However I'm having issues with the eSata portion. I'm not understanding the mount command perhaps someone can help me with this.

What I want to do is mount the eSata hard drive then copy the files from datastore to the other durring the day and then unmount the drive when it's finished this way I can take the hard drive off site and not worried about backup.

If you can help me with the mount -t fs:type command and unmount commands and perhaps the ability to rescan the storage later.

Thanks,

Amit

0 Kudos
23 Replies
kjb007
Immortal
Immortal

First, is the disk even seen on your server? You should be able to run 'fdisk -l' on the console to see if the disk is recognized. If it is, then is the drive formatted? What filesystem? FAT32/EXT3/NTFS?

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
adave007
Contributor
Contributor

I can see the disk and have formated it at vmfs.

0 Kudos
kjb007
Immortal
Immortal

If you can see the drive, and have formatted it using the GUI or vmkfstools, then it should show up under /vmfs/volumes/<something_here>, and don't have to worry about a specific mount command.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
adave007
Contributor
Contributor

So I can freely remove the drive and take it off sight then come back later and add it again. Do you know if there is a command line to rescan all local and hba storage systems I know you can do this in the gui but I'm not sure where to look for the command.

0 Kudos
kjb007
Immortal
Immortal

If you know the vmhba number, then you can use: esxcfg-rescan vmhba<0 1 2 3 4>

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
adave007
Contributor
Contributor

Okay sounds good how about unmount or mount? Do I need to worry about this or as long as i'm not writing to this storage I can pull the disk out and rescan it later on to copy my offline vm's to this for backup purposes.

Thanks,

Amit

0 Kudos
kjb007
Immortal
Immortal

There isn't a specific mount/unmount command for vmfs volumes. If you're not using it, then do what you need to do with the disk, then rescan.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
adave007
Contributor
Contributor

Excellent I'll give it a try and hope it goes well without any dataloss.

Thanks again.

0 Kudos
adave007
Contributor
Contributor

So when I try and remove the disk and add it back in it freezes the ESXi server. So I'm not sure how to do hot swap hard drives or if there is away to unmount the hard disk? I've tried multiple things do you know if there is away to command line remove storage? Is this the same as mount or unmount command.

0 Kudos
DSTAVERT
Immortal
Immortal

Use something other than an attached drive. Try using an NFS capable device. You can get small network attached enclosures add your big drives. You can add and remove them quite easily.

-- David -- VMware Communities Moderator
0 Kudos
adave007
Contributor
Contributor

I know that I'm wanting a faster solution since NFS would go over ethernet and this would be over sata i'm getting faster transfer rates.

0 Kudos
DSTAVERT
Immortal
Immortal

How fast is a frozen server?

-- David -- VMware Communities Moderator
0 Kudos
adave007
Contributor
Contributor

pretty much locks up after I pull the drive. I think it's still trying to write something to it. So I was thinking of unmounting it but can't figure out how to do this with the vmfs filesystem. or better yet does anyone know how to unmount devices in esxi?

0 Kudos
DSTAVERT
Immortal
Immortal

So why would you want to jeopardize the health of you server. It totaly defeats your disaster recovery plan if you are the one creating the disaster. Do as little to the disturb the ESXi host as possible. Look at options available with you san.

-- David -- VMware Communities Moderator
0 Kudos
adave007
Contributor
Contributor

this is a offline esxi server only used to copy over fiber to a remote location so I'm just trying to figure out away to keep the speed. I've looked at other options with the SAN however I haven't been able to figure out away for windows or linux to talk or see the vmfs filesystem.

0 Kudos
kjb007
Immortal
Immortal

The eSATA piece is what's causing the headache. Since it's an internal connection means made external, it's not like USB. It's not really meant to be attached/detached in a hot swap fashion, or at least not with the card that you may be using. Others have used a USB drive, mounted to the service console with either FAT32/EXT3, that the files are copied off to.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
adave007
Contributor
Contributor

I agree i've done it on other linux peices however after I putty into the box I can't figure out the command to unmount. I tried umount, u-mount, unmount and none of these works. I guess if I went with hotswap then the issue I would run into would be to find a suitable controller that esx server would see.

0 Kudos
kjb007
Immortal
Immortal

This may be a silly question, but did you poweroff your drive before trying to unplug it?

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
adave007
Contributor
Contributor

I have not tried that but only issue I could see would be to add the datastore back in later. Or is that easy to do?

0 Kudos