Windows NFS: Don’t Forget .maphosts
I recently mentioned that I was trying out NFS Services on Windows 2003. It actually has been working quite well for me – faster and less CPU than NFS to my OpenFiler server, in fact. OK, to be fair, the OpenFiler server is a bit older and running a pair of hyper-threaded Xeons while the Windows server sports a much newer 2.66 Quad core. Perhaps the processor makes a difference?
Anywho, on the Windows server I’m using the User Name Mapping service to map *nix user accounts to Windows user accounts. There are other ways to do this, but it seemed the simplest and easiest for my purposes. I just mapped the root user from the ESXi server to my domain account and then use NFS shares from Windows for backup purposes (using ghettoVCB).
Last week I thought it would be prudent to ensure that I could actually do something with these backups I’m stacking up. Since they’re already on an NFS share I figured I’d just connect to that share with my Windows 7 machine running VMware Workstation.
Wrestling with ESXi Client Backups
Continued from Fun with ESXi and HP issues. Learning Lessons.
To recap, I had two new drives and a backplane en route and really wanted to get complete image backups of the VM clients running on this VMware ESXi server before I started swapping drives. I’d tried the vSphere built-in file copy utility, FTP and SCP but all had timeout issues on copying the large disk image (.vmdk) files.
While looking for more backup options I recalled reading about ghettoVCB in the past and this seemed like a great time to check it out. This is a very well written – free! – script that you can use to backup ESX(i) clients’ files to direct attached storage (which I’m avoiding for obvious reasons!) as well as NFS or iSCSI volumes. While I don’t have anything currently offering NFS or iSCSI drives I figured I could whip something together easily enough.
First off, I was looking at one of my Windows 2003 file servers. This machine has tons of unused storage and an unused network card so I figured it would be a good place to start. Unused network card is nice to keep all the network traffic for NFS/iSCSI off of the main network.
Hey, did you know that Windows Services for NFS is built-in to Windows 2003 and 2008 Server versions? I didn’t either until last week. Seemed worth a shot so I checked the box on the Windows Component Installer and gave it a shot.
Tip: When prompted for Windows media pay attention to the differences between x32 and x64 versions. I had no issues installing this component from x32 media – alas, the server is x64 and the service definitely didn’t start! Took an uninstall and a reboot to get back on track…
Once I sorted through some “user issues” I was ready to try connecting the ESXi server to the Windows exported NFS share. Sadly, no matter what I tried I couldn’t seem to hit the right combination of options to get this to work.
A few days later I noticed that checking “Microsoft Services for NFS” doesn’t give you all of the NFS service options… In particular, you don’t get the options around authentication and user mapping. This could very well explain why I couldn’t get it working. I will be revisiting this in the near future. I guess the other way to do this is via Windows Services for Unix, something I have very little experience with but might check into.
Time being of essence I set aside the Windows option and moved on to try with my OpenFiler server (first mentioned back in December of ‘09). Enabling the secondary network card and then configuring NFS on it took about 5 minutes. Connecting the ESXi server to it took about another minute. Easy!
I configured ghettoVCB and gave it a try. The first few machines backed up nicely! Alas, the next one had issues – a few file copy restarts and then it finally gave up after a timeout error.
Side note: My OpenFiler server is running an older pair of Hyper-Threaded Xeon 3.0 Ghz processors. When the backup to NFS is running it is seriously bogged down. That caught me by surprise.
After farting around with backups for (literally) over 12 hours I finally opted to accept the fact that I wasn’t going to get them all backed up and went ahead and did the hardware swaps. I figured perhaps the drives being in a degraded state were causing my issues.
Nope.
All the hardware has been replaced. All drives happy, RAID arrays rebuilt and everything is “green” and good to go on the server. I still can’t get reliable ghettoVCB backups and, perhaps related, I still can’t get full copies of the images using vSphere, FTP or SCP either.
At the moment I’m thinking this may be more of an ESXi issue since I can’t get good copies with or without NFS in the mix. Or maybe I need to try iSCSI from the OpenFiler server? I’ll need to spend more time on this one as I think ghettoVCB backups would be invaluable – once I can get all my stuff working.
Mount a VMware .vmdk File
After years of using VMware products, I still stumble over features and utilities all the time. Here’s my latest discovery.
I hate to risk losing data or configurations so before I retire a server I convert it to a virtual machine. The same with employee PCs. When someone leaves, I convert it to a VM before it gets rebuilt for the next use. I can’t deny that this habit has saved more more than once over the past few years when you suddenly realize a key file only existed on Billy’s machine – and Billy’s old machine has been reloaded twice since he left! Just fire up the virtual machine and grab that file.
There’s a small wrinkle though. After converting servers and desktops to VMs for a few years, the storage needs grow dramatically! Storing VMs is the primary purpose for my Openfiler server (first mentioned). However, now when I need to fire up a machine it is a lot more tedious moving the VM image to the ESXi server or my local VMware Workstation machine (powering them up over the LAN is even more tedious imho).
While watching one copy last week I wondered aloud, “Wouldn’t it be handy if I could just treat that virtual hard drive (.vmdk) like any other drive?” VMware was already way ahead of me. Enter the VMware Workstation Disk Mount Utility. Note: There’s not much to see at that link. Just accept the agreement and you’ll get the download.
This is a command line utility so a glance at the docs wouldn’t be a bad idea.
Run vmware-mount with no arguments to see what is currently mounted. To mount a .vmdk file to a drive letter run
vmware-mount [driveletter:] [path to .vmdk] [arguments]
This works fine even while the .vmdk file is on another server. Assuming you have proper access you can specify the “path to .vmdk” portion in UNC form (\\servername\share\path\to\file.vmdk). As you might guess, this saves me a lot of time shuffling around big files over the network.
When done just run vmware-mount [driveletter:] /d to dismount it.
One small note: While this has worked for me every time I’ve used it, it may have quirks.
Recycling an Old Server with Openfiler
A month or so ago I retired my old VMware Server hardware when I brought the new ESXi server online. Since then it had been sitting in the rack, dark and dusty. A shameful thing to do with over a terabyte of storage, right? Sure, the server specs aren’t cutting edge (dual hyper-threaded 3.0 Xeons) but it certainly isn’t garbage either.
This week I took the plunge and installed Openfiler on that server to make it easier to use all that idle storage.
Openfiler converts an industry standard x86/64 architecture system into a full-fledged NAS/SAN appliance or IP storage gateway and provides storage administrators with a powerful tool to cope with burgeoning storage needs.
The base is rPath Linux, a “vanilla distribution” and if you’ve ever installed Linux you will be right at home with this installer. That being said, be sure to follow the guidance in the Installation How-Tos. There are some wrinkles to be aware of… Like, be sure to setup your partitions manually as automagically won’t work.
Everything is managed via a web interface. Slick and well-polished and easy to find options. I like it and it definitely beats the tar out of wandering through text files to get everything configured (I’m sure that’s an option if you’re into masochism though! There is a console and login access).
Once I had it installed I decided that I wanted to integrate Openfiler with my existing Active Directory network for the users and permissions management. This could be a bit more intuitive… and I should point out that while the product is free, there’s little doubt that one goal of the Openfiler folks is to sell support. This may explain why there aren’t tons of docs on the site.
All cynicism aside, most tasks are easy to puzzle out – but not AD integration! My first attempt didn’t work at all. Fortunately, I found an article at EduGeek.net that was immensely helpful, “Openfiler 2.3 Integration with Active Directory.” Without it I’d probably still be stumbling around. With it, I was up and going within 10 minutes.
There are tons of options that I haven’t even glanced at. iScsi, CIFS, NFS, rsync, NIC bonding, snapshots, etc. etc. Check out the tour for more information.
If you have an old server laying around, Openfiler seems like a great way to bring some storage online.




