Friday, August 07, 2009

How-To: FreeNAS SAN on ESXi

Just a quick how-to, as a follow-up to my last post.

  1. Add Disks (Disks>Mgmt), add 2 (RAID1), or add 3+(RAID5).
  2. Format the disks you just created (Disks>Format, Choose the 1st disk, set the FileSystem to SoftwareRAID, click Format, Disks>Format, Choose the 2nd disk, set the FileSystem to SoftwareRAID, click Format).
  3. Create RAID Level (Disks>Software RAID> RAID1, Select both disks created in step)
  4. Format the RAID as an EXT2 file system (if you don't do this, you're going to get an error when you create the mount point. VMware ESXi will want the EXT2 filesystem... but you can then format it after it's been mounted to whatever you want. This includes if you're just adding storage capacity to a Windows system and using the initiator to mount this as a mount point. It's easiest to format the RAID EXT2 initially, and then do whatever you want later).
  5. Create a mount point (Disks>Mount Point, MBR1 type, and records your mount point .. e.g. /dev/mirror/Raids1).
  6. Unmount RAID if need be (Disks>Mount Point>Mgmt Tools>Tools tab, unmount).
  7. Add the iSCSI target (Services>iSCSI>Add New Extent, Skip the Device, Add New Target)
  8. Now you can mount this target on a Windows Server (Download and Install Microsoft iSCSI Initiator, Discovery Tab, add the IP address of the FreeNAS serverm... Computer, Manage, Delete the new partition that is now visible, and create a new NTFS partition, and Quick format it).

2 comments:

Perry said...

After browsing through both related articles that I found very inspiring, I wondered if your specific steps given here are taken within ESXi or FreeNAS. I'm looking into this cold, with no experience with either, so I don't immediately identify the menus/commands given. Thanks!!

Nick said...

Once you fire-up an instance of FreeNAS and look at the UI, it should make more sense. This was all done from the FreeNAS interface (e.g. Disks>Mgmt, etc.). After you carve it up... the rest of this comment is about how you'd use that storage from a vSphere host. Thus... you can mount it from vSphere from the Configuration tab>Storage Adapters, select an iSCSI adapter>Properties, enabe iSCSI initiator, and configure Dynamic (or static) discovery and point the vSphere host at the IP of your FreeNAS box.