Deploying FreeNAS in Alibaba Cloud ECS

By Anish Nath, Alibaba Cloud Tech Share Author. Tech Share is Alibaba Cloud’s incentive program to encourage the sharing of technical knowledge and best practices within the cloud community.

FreeNAS is an open source network attached storage that is based on the FreeBSD and the OpenZFS file system. According to the official website, FreeNAS is an operating system that can be installed on virtually any hardware platform to share data over a network.

FreeNAS installation in Alibaba Cloud is an advanced level task and should be performed carefully. To begin with installation, there are several high-level steps needed to install and setting it up the FreeNAS on an Alibaba Cloud Elastic Compute Service (ECS) instance.

  1. Download FreeNAS ISO.
  2. Upload FreeNAS ISO in Alibaba Cloud OSS.
  3. Grant ECS to use OSS.
  4. Create Custom FreeNAS ISO Image in Alibaba Cloud.
  5. Launch Instance using FreeNAS Custom Image.
  6. Create FreeNAS disk.
  7. Perform FreeNAS Installation.
  8. Unmount Disk from the ECS instance.
  9. Release FreeNAS Instance.
  10. FreeNAS Disk Is ready in Alibaba Cloud
  11. Convert Disk to Snapshot
  12. Convert Snapshot to Image
  13. Launch ECS instance using the image.

Before You Begin

About FreeNAS

FreeNAS is the simplest way to create a centralized and easily accessible place for your data. Use FreeNAS with ZFS to protect, store, backup, all of your data. FreeNAS is used everywhere, for the home, small business, and the enterprise.

Download FreeNAS ISO

Create an OSS Bucket

  1. Click Create Bucket to open the Create Bucket dialog box and then create your freenas bucket where you can upload the ISO image which is downloaded from FreeNAS website.
  1. Upload the freeNAS-11.1-U6.iso image to the bucket
  1. Confirm the file is uploaded in the bucket
  1. Grab the Object URL
    Click the name of the target file. The Preview page is displayed and then Copy File URL as shown on the diagram below. This URL will be used for created custom free NAS image.

Create FreeNAS Custom IMAGE

Go to the ECS console -> Images link and then click on Import Image, as shown in the diagram.

A popup will appear, this step require attention, we need to give permission to ECS to use OSS

Click on Confirm Address it will present you below screen and then Confirm both Authorization policy as shown below.

Once this step is performed successfully, go back to the ECS console -> Images link and then click on Import Image again from here you need to pay close attention to the following attribute which is highlighted in red.

  1. OSS Object Address: This will be the OSS object URL which is performed in previous section.
  2. Platform: This will be FreeBSD.
  3. Image Format: RAW

Click on OK and wait for this Custom Image to be available as shown in below.

Launch FreeNAS Custom IMAGE

Note: The End goal of this step is to release this Instance, as we are going to create a bootable disk once the FreeNAS installation is done and this bootable disk image will serve as FreeNAS service.

Under the Image Tab, select the custom Image tab and choose the image name from the drop down, which is uploaded in the previous step.

You don’t need a public IP, make sure Assign public IP is unchecked in the Networking Page.

Under the System Configuration, skip the Log On credentials, this step will be executed when FreeNAS installation is in place.

Finally Review the Configuration and Launch the Installation

Once Everything goes well, your ECS instance should be up and running as shown in the below.

Next step is Very important, and we are going to create a disk and then mount this disk to this instance.

Create FreeNAS Disk in Alibaba Cloud

After the disk is created, it will be unmounted state.

Mount this disk to ECS Free NAS VM

Start FreeNAS Installation

Go to your ECS instance ID and click connect

First Alibaba Cloud it will setup your VNC password, once this is done,

You will be able to connect to VNC console screen, and presented with FreeNAS installation screen

Select option#1, Install/Upgrade of FreeNAS Installation.

Choose the destination Media. This is the disk which we have setup in the previous step, select this disk where the installation files will hold and then click on OK.

On the Next step, you will be prompted to select the root password for the FreeNAS UI login,

Once Everything goes well, finally you will be prompted with the message, Installation went successful, this is the time when we release the ECS instance ID, unmount and preserver the Disk.

Release Instance & Unmount Disk

ECS Console -> Block Storage-> Disk -> (Select Disk ID) -> More -> Unmount

And Finally release the ECS Instance ID

Create Custom Image from FreeNAS Disk

At first create a snapshot from the Disk, to do this perform the below step

ECS->Block Storage-> Disks -> (Select Instance ID) → Create Snapshot

Once snapshot is created create a custom image from her, to perform this

ECS->Snapshots and Images -> Snapshots -> (Select snapshot) → Create Custom Image

Verify the Image Status

From here onward, any ECS instance launched using this image will have FreeNAS server ready.

Reference:https://www.alibabacloud.com/blog/deploying-freenas-in-alibaba-cloud-ecs_594349?spm=a2c41.12498898.0.0

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.