Monday, April 19, 2010

Sun Fire V120 as NAS part 6: Network shares and RAM upgrade

Ok. Time to start some file sharing protocols.

First the easy part: NFS.
Solaris comes with NFS4 (backwards compatible with NFS2 and NFS3). Not very important in a normal home but in my case, this is the best option to share information with my SGI boxes. Only three steps are needed to start sharing, Fantastic!

1. Make writable to everybody the folder where I want to share. I use the same array than before:
# chmod 777 /fsshared
2. Add the share information to the file /etc/dfs/dfstab
#       Place share(1M) commands here for automatic execution
#       on entering init state 3.
#
#       Issue the command 'svcadm enable network/nfs/server' to
#       run the NFS daemon processes and the share commands, after adding
#       the very first entry to this file.
#
#       share [-F fstype] [ -o options] [-d ""] [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2
share -F nfs -o rw -d "fsshared V120" /fsshared
3. Start sharing:
# shareall
The dfstab entry goes:
  • -F nfs .- Type of sharing.
  • -o rw .- The options. Here I only used read-write but there is a lot more (including loggin), but I just don't need.
  • -d "fsshared V120" .- Obviously is only a comment.
  • /fsshared .- Here comes the folder I want to export.
Here some captures from my Fuel mounting the exported folder of the Sun Fure V120:

Second part is SAMBA!
This is the standard Windows protocol. At the time the most important in any home or company. From a lot of time ago samba.org is publising the source code and it's widely used but all the test I did before (and some test done by friends) are telling Samba is slow, in Solaris and in Linux.

Configure Samba in Solaris is not as easy as I was thinking before to use it.
1. Check if Samba is installed. Well, installing Solaris with OEM option, Samba must be installed:
# /usr/sfw/sbin/smbd -V
Version 3.0.35
2. Now we have to create the smb.conf file. I copied the exampled provided with the Solaris installation:
# cd /etc/sfw
# cp smb.conf-example smb.conf
3. Edit the configuratin file. I modified three parts: The allowed ip ranges (my network subnet and localhost):
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
   hosts allow = 192.168.2. 127.
 Set the Windows workgroup name:
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
   workgroup = WORKGROUP
And the last one, the shared folder. I want the folder open read-write to everybody, then the guest ok option must be set and the guest only option must be removed! The docs says guest only is discarded with guest ok but in my case guest ok was discarded with both options in the configuration of the folder.


# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
[public]
   path = /fsshared
   public = yes
   guest ok = yes
   writable = yes
   printable = no
   browseable = yes
4. Test the configuration file:
# /usr/sfw/bin/testparm

Load smb config files from /etc/sfw/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[public]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
5. Add a user to the Samba database:
#  /usr/sfw/bin/smbpasswd -a admin
New SMB password:
Retype new SMB password:
Added user admin.
6. The last part must be start the samba service:
# svcadm enable samba
----------------------------------------------------------------------------------------------------------
UPDATE: 2010/09/08
7. Now Samba is working but I can't see the computer in the Windows Explorer (or other smb bowsers): The last step is activate WINS:
# svcadm enable wins

Here you have the old post part (italic letter). NOT NECESSARY.
A new test showed that I don't need to do the next part. At the end 
but in my case it didn't work. After some googling I found this guide related to Solaris u4, and I followed. Samba didn't start and after a new search I found a fault in my smb.conf: I writed /fssaredc instead of the name of my shared folder.
Now I have two commands to start samba:
# svcadm enable samba:smbd
# svcadm enable samba:nmbd
End of the update
----------------------------------------------------------------------------------------------------------
But it's working:
And here comes the bad part. I only get 4.3 MB/s downloading the test file via FTP and 1.9 MB/s via Samba! The V120 is connected to my main router via a non manageable HP ProCurve gigabit switch and the client is a Dell Precsion 390 with the onboard Broadcom gigabit network chipset. I did some checks in the V120 network port configuration but I didn't find anything wrong. Well, I will check later. Anyway I have a Quad GigaSwift PCI card at the mail coming home.

RAM tests.
Thursday arrived some more RAM sticks, 4x1GB ECC registered sticks!!!
I did various test with different amount of memory: 512 MB (one stick that came with the server), 2 GB and 4 GB.

                                 512MB         2 GB        4GB
-----------------------------------------------------------------------
From RAID5 to system disk.      12.8 MB/s    17.8 MB/s   26.9 MB/s
From system disk to RAID5.      11.3 MB/s    18.6 MB/s   21.6 MB/s
From RAID5 to disk 2.           12,5 MB/s    20.9 MB/s   32.0 MB/s

I was expecting a great improvement from 512 MB to 2 Gb, but I also discovered a great rise in performance with 4 GB using the RAID5 array. Yes, ZFS needs a lot of memory!
Note that tests are done by hand and I only did the test one or two times but are enough for comparision. At least for me!

4 comments:

randomshinichi said...

Hey, I use my Blade 100 as a file server with NFS/Samba on the same directory too! Since IRIX can't mount Samba shares without some proprietary software that you have to pay for.

BTW I'm typing this on a Blade 100 with an XVR100, very usable even with two Javascript heavy sites in the background.

Titox said...

Yes, this is my reason to use NFS. After some test I think NFS is also faster than samba and IRIX mounts my shares easy.

A Quad Gigabt Sun card arrived last week. I will try this weekend.

Anonymous said...

Nice fill someone in on and this post helped me alot in my college assignement. Say thank you you on your information.

Titox said...

Well, Updated the last part of the Samba configuration. I'm doing new test with a UFS filesystem (and new Solaris installation)