I came across a use case for using a Western Digital MyBook Live as a VMware NFS datastore, I’m fairly sure this can be completed on similar devices with a bit of configuration.
This initial task is to access the shell of the WD MyBook, this can be completed by accessing the ip or hostname of the device through the web url as documented here, below is a quick reference.
- Login to the URL of WD MyBook http://ipaddress, if address is unknown, try using DHCP to find a reservation
- Change the URL to http://ipaddress/UI/ssh
- Tick active SSH
Next you will need to create an SSH session to the IP address of the WD MyBook in this case I am using putty, the default credentials are below:
We then need to create the NFS share and configure the permissions for the share (thanks to Falco Timme).
- Type su and hit enter to raise the rights to sudo “admin”
- Type the command mkdir /nfs/sharename/ where sharename is the name of your share.
- Enter vi editor to edit the exports file with the command vi /etc/exports (This is to configure the share permissions)
- Edit the file as shown below replacing the 192.168.X.X with the IP of the ESXi host (deleting the other lines from the file will stop the web interface from working), i for insert (use the arrow keys to navigate, :wq! to save and exit, :q! to exit without saving. Excellent Vi Editor tut here. *Add additional entries for extra hosts*
- Type the command exportfs -a hit enter and type reboot, hit enter to complete.
We now need to map the NFS drive in ESXi as below:
Via VI Client
- Open a vi client to the ESXi host and select the Configuration tab
- Select Storage on the left and Add Storage on the right
- Select the option Network File System and click Next
- Enter Server hostname or IP, folder as /nfs/sharename and give the datastore a name, click Next
- Select Finish to complete
Via ESXi Shell
- Create putty session to ESXi Host
- Enter the command esxcli storage nfs add -H hostnameorIP -s /nfs/sharename -v datastorename and hit enter.
I will be attempting the same with a Buffalo Link station in the coming weeks but its food for thought in terms of a reuse for cheap ESXi NFS Storage!