How To Build A Standalone File Server With Nexenta 3.0 Beta2

Author: dfed
Version: 1.3

Nexenta is a project developing a debian user-land for the OpenSolaris kernel. This provides all of the advantages of apt as a package respoitory (based on the Ubuntu LTS apt repository, currently using 8.04) as well as the advantages of the ZFS filesystem. In the resulting setup every user can have his/her own home directory accessible via the SMB protocol or NFS with read-/write access.

 

1 Preliminary Note

A term you should be familiar with is a zpool. A zpool is similar to a logical volume group. ZFS volumes can have multiple zpools in them, as I will demonstrate. Some advantages of ZFS are built in compression and deduplication, as well as being easy to manipulate, create and destroy pools. OpenSolaris (and by proxy, Nexenta) has already integrated file-serving protocols such as NFS and Samba with the ZFS filesystem, so we won't need to install a Samba service. I have culled information about the zfs and zpool commands from various sources. All sources used for the creation of this article are linked at the end.

I'm using a system with the hostname server1.example.com and the IP address 192.168.0.100.

 

2 Installing Nexenta

You can obtain the ISO for Nexenta here: http://www.nexenta.org/projects/site/wiki/DownloadUnstable

I am using the unstable version of Nexenta 3.0 Beta2. The reason for this is that it is based on OpenSolaris build NV134, which has dedup and zfs compression capabilities. Dedup is a function that allows for deduplication of files within the filesystem, and zfs compression is a built-in comression algorithm to compress filesizes when possible.

Download and extract the ISO and burn to disk (or boot from ISO directly if you are installing this as a virtual machine.)

First, you'll see the welcome screen:

Next, set your language, locale and time:

Now we'll set up the disk the OS will be installed on. If you have multiple disks only select the disk you want the system OS to be installed to.

If you are using multiple disks that will be used for a large file repository (such as expected large shares for media, or each user's home directory on a much larger array of disks) do not select them at installation. I will show how to add disks and create shares/move home directories later on.

Share this page:

4 Comment(s)

Add comment

Comments

From: at: 2010-05-04 18:00:54

Nexenta just released 3.0 Beta3.  The instructions are the same between the two release versions for this tutorial.

The download link included will take you to the latest version.

 

Thanks

 

-dfed

From: ci4ic4 at: 2010-12-20 11:09:36

smb/server is not Samba under Nexenta Stor (or any OpenSolaris class system). It is the in-kernel CIFS service, which is incompatible with Samba, so only one or the other can be enabled in any one time on a system. The 'zfs sharesmb=on <zfs>' command relates also only to CIFS, nothing to do with Samba. The capabilities of the two are different, there are occasions one might prefer Samba, most of the time though the CIFS service will be the better choice, as it has full Windows integration (the ACLs are not simulated, but are actual part of the file system).

From: Aristotle Jones at: 2010-08-09 19:57:54

This is a great run down of getting a samba and NFS server up and running.  I wish I had this guide when I built mine, could have saved me a LOT of work.  I would like to add that one will run into trouble if they are trying to create a share for multiple users, specifically when using ACL's from windows.

 As the tutorial really only goes over sharing home folders, you would be fine, but if you create one share, available to several users or groups, and they are writing from windows, you are in for trouble without understanding the ACL's

For Owner full access, read to everyone else use this:
(Note: i used chown on the root of the my share first  i.e. chown -R chris /share)

chmod -R A=\

owner@:wACpdDo:d:allow,\

owner@:wACpdDo:f:allow,\

everyone@:rxaARWcs:d:allow,\

everyone@:raARWcs:f:allow \

/share/

Make sure to TEST!
 
For multiple groups / users on a specific folder, and then recursively add the ACL’’s to any child objects:

chmod -R A=\

owner@:full_set:d:allow,\

owner@:full_set:f:allow,\

user:Bob:full_set:d:allow,\

user:Bob:full_set:f:allow,\

everyone@:rxaARWcs:d:allow,\

everyone@:raARWcs:f:allow \

/share/

The above command gives the owner and the user “Bob” full permissions, the everybody else group has read only access. If you want to add a group then just use group: instead of user: at the start.

This gives full access to myself and Bob, but deny’s access to everyone else;

chmod -R A=\

owner@:full_set:d:allow,\

owner@:full_set:f:allow,\

user:chris:full_set:d:allow,\

user:chris:full_set:f:allow,\

user:Bob:full_set:d:allow,\

user:Bob:full_set:f:allow,\

everyone@:full_set:d:deny,\

everyone@:full_set:f:deny \

/share/photos/

 Hope this helps get you going faster.

From: Anonymous at: 2011-02-07 10:20:03

Remember if you give the full_set to files they are also executable ..... you might not want that on every file ;) especially if you propagate this to every new file in the future.