With the new CIFS server in the OpenSolaris OS, it's a great time to use ZFS and CIFS to create a home NAS box to replace a Windows share machine. Contents
Step 1: Get the HardwareTo get started, you need hardware for the NAS box. This example uses the following hardware:
Step 2: Assemble the HardwareBefore you begin the hardware upgrade, attach an antistatic strap to your wrist. Next, attach the SCSI card to the multipack. The extra memory is used to help ZFS work better. When you've assembled the hardware, it's time to install the OpenSolaris OS. Step 3: Install OpenSolaris SXDE 1/08Preparing to install the OpenSolaris OS is quite simple and quick (takes 5 minutes or so):
Then the actual installation begins. In this example the installation takes about 1.5 hours, and then the new server is up and running the OpenSolaris OS. Next, you need to configure everything. Step 4: Configure the OpenSolaris OSStart by accessing the CIFS Getting Started Guide. This guide is invaluable and provides everything you need to get started. Create the Users To begin, create a few different users. At installation time, create a root user account and after this, create a "privileged" regular user and a user that can own the files. Use the user IDs
Figure 1: Creating Users Create a Storage Pool To get the server up and serving data, you need to configure the storage. To do this, use the ZFS GUI by pointing a browser to
Figure 2: Creating a Storage Pool After creating a ZFS pool with the ZFS GUI, switch to a terminal window to check the status of the newly created pool: # zfs list NAME USED AVAIL REFER MOUNTPOINT mediapool 144K 165G 29.9K /mediapool Create the File Systems Next, create the file systems: # zfs create -o casesensitivity=mixed mediapool/music # zfs create -o casesensitivity=mixed mediapool/photos # zfs create -o casesensitivity=mixed mediapool/movies To use mixed case for the file names, set the ZFS property to Configure CIFS After creating the file systems, start the CIFS service: # svcadm enable -r smb/server # smbadm join -w WORKGROUP You can use the workgroup mode for sharing the files. In most cases, you keep the workgroup set to Set Up Authentication You also need to update the OpenSolaris password system to configure the CIFS server to use PAM (pluggable authentication module) authentication. Do this using the following command: # echo "other password required pam_smb_passwd.so.1 nowarn" >> /etc/pam.conf Additionally, after entering the preceding command, you must reset the passwords for all users who will use the CIFS authentication: # passwd media Now you are ready to start sharing the file systems you created. Share File Systems You're getting closer to being able to use the new server. CIFS is enabled, the file systems are created, and you just need to get them shared: # zfs set sharesmb=name=Movies mediapool/movies # zfs set sharesmb=name=Music mediapool/music # zfs set sharesmb=name=photos mediapool/photos
Figure 3: Sharing File Systems You could have used a single Set File System Permissions For your last step, all of the files need to be owned by your primary share user: # chown -R media /mediapool After this last step, you are done configuring the OpenSolaris OS on your NAS box. Step 5: Configuring WindowsNow, the real fun begins. So far in this example setup, it took only 2 hours to assemble the server hardware, install the OS, and configure the storage, and 90 minutes of that was the OpenSolaris installation. While using a Windows XP system for email and web browsing is pretty simple, there is some complexity in sharing files. Sharing files with CIFS is different than sharing file with NFS. When mounting a CIFS share from an OpenSolaris system, you must authenticate to that server. This point is critical. The authentication also has to be from the perspective of the server and not the client. To make the share on the windows client work, do the following:
Figure 4: Mapping a Network Drive For the example machine, the Folder path is This provides a way for all of your Windows machines to access a shared file system on your new OpenSolaris NAS box. For More InformationHere is a list of web sites, blogs, and discussion lists: | ||||||||
|
| ||||||||||||