Building a low-powered NAS

Rock and Roll

Create and Use Shares

The next step is to define a shared folder. Space carved out of a pool is identified as a share, and each share on Rockstor behaves like directories on a desktop distribution. The chief consideration while adding one is whether the NAS will be used by multiple users or a single individual. In case you're going to be sharing the NAS storage space with multiple users, you can define several folders, each with different user permissions.

To add a folder, head to Storage | Shares and click the Create Share button. You'll now have to fill the details in the page that opens to specify the various attributes for the share (Figure 5). The most important ones are the name and size of the share. You'll also have to select the pool under which this share will be created and whether to enable compression on the share. By default, the share will inherit the compression policy from the pool. However, if you did not turn on compression at the pool level, you can now do so while creating a share.

Figure 5: In essence, a share is a Btrfs subvolume of a given pool.

With the users and shared folders set up, you're now ready to share the NAS storage with your network. Rockstor supports several sharing protocols, but I'll use the popular SMB protocol commonly known as Samba, which works across devices. To activate the service, head to Storage | Samba and click the Add Samba Export button. Once again, you are presented a form in which you'll be asked for various details for the share.

First up, use the list of shares pull-down to select the newly created share that you want to export through Samba. Similarly, use the Admin users pull-down list to select the user you created earlier who will have administrative access to this share. The page also has three radio buttons to enable or disable options. The Browsable option should be set to yes so clients can see the exported shares. Similarly, the Guest Ok option should be set to no to restrict access to the share to admin users only. Finally, Read only should be set to no to ensure that users can write data to this share, as well (Figure 6).

Figure 6: Ensure that the Samba service is running before you create a share.

Once you've created a network share, you can access the shared folders from anywhere on the network, irrespective of whether they reside on an individual disk or a RAID array. You can either use your file manager's built-in Network feature to access the network shares or enter the IP address of the NAS device in the location area (e.g., smb://192.168.0.11 ).

You'll be prompted for an admin username and password before you can access the folders, unless of course, you marked them as public when adding them. After the credentials have been verified, Rockstor mounts the shared folder. You can now upload files into the shared folder or delete the ones already on it, just as you would inside a regular folder.

Although I have covered the essentials for deploying a Rockstor-powered NAS, you can do a lot more with the server. Rockstor ships with adequate defaults but offers extensive administration options to help you maintain your installation per your requirements. For instance, you can and should create a backup policy for your shares (see the box titled "Taking Snapshots"). You can also do a lot more with your NAS besides managing files, thanks to the extensive plugins system (see the "Extend Your NAS" box). Rockstor's interface is intuitive enough to encourage exploration, and you can always refer to its extensive online documentation to tweak and customize your installation.

Taking Snapshots

Another interesting feature powered by Btrfs is snapshots, which creates an image of a share [7]. However, instead of duplicating all data, the snapshot merely points to the original share content. The snapshot only takes up space when you delete a file from the share, which then continues to exist in the snapshot. You can also roll back a share to any of its snapshots. Head to Storage | Snapshots and click the Create button to create a snapshot for a particular share. You can also schedule the creation of snapshots as cron jobs, which ensures the safety of your data, and Rockstor lets you identify the specific shares for which you want to create a snapshot. Remember, however, that because snapshots are incremental, you should have a well-designed policy for managing them, or you'll quickly run out of space.

Extend Your NAS

Rockstor supports a vast array of plugins that can be used to extend the distribution beyond its humble NAS offerings. The plugins are called Rock-ons and are implemented as Docker containers. To get started, click the Rock-ons option in the top navigation toolbar. The service is disabled by default. Once enabled, you'll have to create a share for housing these Docker containers. The process for creating a share for them is the same as creating any other share in the Rockstor interface. Once you have created the share, bring up the list of services by heading to System | Services , click on the spanner icon next to the Rock-on service, and point to the share you've just created to house the Docker containers for the Rock-ons. That's it. Now, head back to the Rock-ons page and click the Update button to fetch the latest list of plugins (Figure 7). Click the Install button adjacent to the plugin you want to use to fetch and install it. Make sure the share you create for the Rock-ons has at least 5GB of storage space.

Figure 7: Adding functionality with Rock-on plugins.

The Author

Mayank Sharma has been writing and reporting on open source software from all over the globe for almost two decades.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • NAS with Btrfs-based Rockstor
    Set up network-attached storage and manage it from a web interface with Rockstor, the easy-to-install and free Linux distribution that uses the still new Btrfs filesystem.
  • CentOS 7 (1511) and Rockstor 3.8
    CentOS describes itself as "… a stable, predictable, manageable, and reproducible platform derived from the sources of Red Hat Enterprise Linux (RHEL). Rockstor is a specialty Linux distro designed to support Btrfs-based network-attached storage (NAS) devices.
  • Storage pools and storage spaces in Windows
    Storage spaces and storage pools combine a variety of storage technologies into a single logical unit, ensuring high availability and a choice of resiliency capability.
comments powered by Disqus