Friday, March 27, 2009

Homemade ISO storage using Linux-based NAS server

A month ago or so I started to run out of space on my ESX lab server. A quick look at the Datastore revealed that about 80 Gb was used for ISO images (I admit making the mistake of using my VMFS to store the ISOs...). I had to free that space somehow. I decided to re-purpose older desktop hardware that was languishing in my basement and build a NAS server. That old desktop had a 60 Gb harddrive in it and it would work perfectly as ISO storage.

I downloaded UBUNTU Server 8.1 and instaled it on the old hardware. The installation went without a hitch.  Once the installation completed, I installed the NFS server by the following command (logged in as root): 
  • apt-get install nfs-kernel-server nfs-common portmap
That command downloads the NFS server package and then installs it.
After that, I created my ISO file share using the following command:
  • mkdir /ISO
Then, I edited the exports file. The exports file tells the NFS server which directories to make available to the NFS clients (i.e. my ESX server), along with any options. I only added one line:

  • \ISO is my file share
  • specifies that only clients on this subnet will be able to access the file share
  •  “no_root_squash” allows the VirtualCenter read/write access to the volume
I saved the file and restarted the NFS server:
  • /etc/init.d/nfs-kernel-server restart:

I then went to my Virtual Center and added this file share to the list of my Storage. I called the new Storage NAS-ISOs:

Now, that NAS fileshare appears in the list of my Storage and is ready to use:

I can now copy all my ISO's to that fileshare and free the space on my VMFS partition.

No comments:

Post a Comment