Paulie's World

Things I do ...

Join my colleagues and myself at this year's Oracle OpenWorld. We'll be hosting a hands-on lab, demonstrating the ZFS Storage Appliance and its analytics features.

oow.png
HOL10034 - Managing Storage in the Cloud 

October 1st (Monday) 3:15 PM - Marriott Marquis - Salon 14/15
October 2nd (Tuesday) 5:00 PM - Marriott Marquis - Salon 14/15
7:15 PST - September 24, 2012
Things have changed since Solaris 10 (and Solaris 11 Express too!) on how to properly set up a CIFS server on your Solaris 11 machine so that Windows clients can access files. There's some documentation on the changes here, but let me share the full instructions from beginning to end.
hostname: adrenaline
username: paulie
poolname: pool
mountpnt: /pool
share: mysharename
  • Install SMB server package
[paulie@adrenaline ~]$ sudo pkg install 
service/file-system/smb
  • Create the name of the share
[paulie@adrenaline ~]$ sudo zfs set share=name=
mysharename,path=/pool,prot=smb pool
  • Turn on sharing using zfs
[paulie@adrenaline ~]$ sudo zfs set sharesmb=on pool
  • Turn on your smb server
[paulie@adrenaline ~]$ sudo svcadm enable -r smb/server
  • Check that the share is active
[paulie@adrenaline ~]$ sudo smbadm show-shares adrenaline
Enter password: 
c$                  Default Share
IPC$                Remote IPC
mysharename           
3 shares (total=3, read=3)
  • Enable an existing UNIX user for CIFS sharing (you may have to reset the password again eg.`passwd paulie` )
[paulie@adrenaline ~]$ sudo smbadm enable-user paulie
  • Edit pam to allow for smb authentication (add line to end of file)
[paulie@adrenaline ~]$ vi /etc/pam.conf

other   password required      pam_smb_passwd.so.1 nowarn
  • Try to mount the share on your Windows machine
\\adrenaline\mysharename
8:17 PST - February 20, 2012
I ran into a strange automount issue where my NFS shares were not being mounted at boot time. nfs/client was enabled, my entry in /etc/vfstab was correct, and issuing a `mount -a` worked flawlessly. So what was the problem? Well, this was the entry in my vfstab file:
biff:/paulie    -       /export/home/paulie/biff   nfs
     -       yes     proto=tcp,vers=3
I wanted to place my NFS share inside a zfs filesystem so that it was easily accessible in my home directory.
[paulie@doc ~]$ zfs list | grep export/home/paulie
rpool/export/home/paulie  78M  2.82G  78M  /export/home/paulie
Turns out this is not such a good idea since the /etc/vfstab file is read *before* zpool's are imported and mounted. This means that all NFS shares need to be listed outside any filesystems to be mounted at boot time and then symlinked in.
[root@doc ~]# mkdir /biff
[paulie@doc ~]$ ln -s /biff/ /export/home/paulie/biff/
... and then changing around vfstab ...
biff:/paulie    -       /biff   nfs     -       
yes     proto=tcp,vers=3
And that's it, NFS should automount now:
[paulie@doc ~]$ df -kh | grep biff
biff:/paulie           2.7T   1.2T       1.4T    47%    /biff
Lesson learned.
5:51 PST - January 3, 2012

Blog Archive by Year

2014 2013 2012 2011 2010 2009
Powered by Perl