How To Build A Standalone File Server With Nexenta 3.0 Beta2 - Page 4
5 Samba Services and zfs:Start the service: root@server1:/# svcadm enable -r smb/server If the following warning is issued, you can ignore it: svcadm: svc:/milestone/network depends on svc:/network/physical, which has multiple instances Set the workgroup name: root@server1:/# smbadm join -w SHARING After joining SHARING the smb service will be restarted automatically. Great. Now we can enable shares for the users. User share rights in this setup are directly related to unix file permission settings. If I share /export/home/newuser then I must connect as newuser because ownership of that directory is newuser:newuser. Let's set up a share. First, the directory we create this share on needs to be empty. If we are sharing the whole of a user's directory (and not a folder in it) we need to move files in the directory out: root@server1:/# mkdir /opt/tmp/ Verify the files all moved: root@server1:/# ls -lha /export/home/newuser/; ls -lha /opt/tmp/ total 3.0K Ok, let's create the zpool and share it: root@server1:/# zfs create -o compression=gzip-9 -o dedup=on -o quota=100g -o casesensitivity=mixed -o nbmand=on -o sharesmb=on pool1/newuser Let's talk about some of the triggers in that command. The trigger "-o dedup=on" sets deduplication on allowing multiple instances of the same file to only have to exist one time. From a filesystem user perspective you'll not notice this, however it can save a lot of space. The trigger "-o compression=gzip-9" sets the filesystem compression to use the gzip libraries and sets it to maximum compression, or 9. 1 is lowest, 9 is highest. These settings may impact performance on heavy writes to disk. You should consider how fast your disks are and how powerful your processor and ram are before enabling these settings. The trigger "-o quota=100g" sets the user's home directory to grow no more than 100g. This setting is optional, but handy to know. Move the files back: mv /opt/tmp/* /export/home/newuser/; mv /opt/tmp/.* /export/home/newuser/ Verify the pool: root@server1:/# zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT root@server1:/# zfs list NAME USED AVAIL REFER MOUNTPOINT Verify the share is up: root@server1:/# sharemgr show -vp default nfs=() Now you should be able to connect to that share from another machine (you'll need to authenticate as the correct user, of course.) smb://(ip address or host name)/export/home/newuser Everything is up for Samba. Repeat this process to create users and shares as needed.
6 NFS Setup:This one's pretty easy. If you want an NFS server to share all home directories, do the following: root@server1:~# zfs set sharenfs=on pool1 It's that easy. If you want to share specific pools, like the one we created for newuser, it would be: root@server1:~# zfs set sharenfs=on pool1/newuser Verify the share is up: root@server1:/# sharemgr show -vp default nfs=() I should point out that the UID and GID of the client connecting should match, otherwise you won't be able to connect/read/write. I am not going to go into how to set up a NIS master server here, as out of the box Nexenta doesn't include the network/nis/server, network/nis/passwd, network/nis/update, network/nis/xfr services. These could be installed as packages from Sun/OpenSolaris but I haven't looked into this yet. As long as the client you're using (whether it's OS X, Services For UNIX on Windows, or Linux) can either translate or match the UID/GID of the user on the server, you won't run into connection problems. I'll look more into this and write a new tutorial for creating a NIS master server and attaching Samba to an Active Directory Domain in the future.
|



Recent comments
2 days 19 hours ago
3 days 4 hours ago
3 days 7 hours ago
3 days 8 hours ago
3 days 9 hours ago
3 days 11 hours ago
3 days 12 hours ago
3 days 14 hours ago
4 days 6 hours ago
4 days 6 hours ago