小弟初學openSolaris 下實現smb 共享, 經過幾次失敗終於可以用了,記錄一下:
root@opensolaris:~# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c7d0 <DEFAULT cyl 30390 alt 2 hd 255 sec 63>
/pci@0,0/pci-ide@1f,2/ide@0/cmdk@0,0
1. c9d0 <WDC WD80- WD-WMAM9SH8120-0001-74.50GB>
/pci@0,0/pci-ide@1f,5/ide@0/cmdk@0,0
Specify disk (enter its number): ^D
root@opensolaris:~#
root@opensolaris:~# zpool create -f mypool c9d0
root@opensolaris:~# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
mypool 74G 74.5K 74.0G 0% ONLINE -
rpool 232G 8.99G 223G 3% ONLINE -
root@opensolaris:~#
root@opensolaris:~# zfs create -o casesensitivity=mixed mypool/Demo
root@opensolaris:~# zfs set compression=on mypool/Demo
root@opensolaris:~# zfs set snapdir=visible mypool/Demo
root@opensolaris:~# zfs set sharesmb=name=Demo mypool/Demo
root@opensolaris:~# zfs set quota=1G mypool/Demo
root@opensolaris:~# zfs set reservation=1G mypool/Demo
root@opensolaris:~# zfs get all mypool/Demo |egrep '(NAME|smb|comp|case|quota|reservation)'
NAME PROPERTY VALUE SOURCE
mypool/Demo compressratio 1.00x -
mypool/Demo quota 1G local
mypool/Demo reservation 1G local
mypool/Demo compression on local
mypool/Demo casesensitivity mixed -
mypool/Demo sharesmb name=Demo local
mypool/Demo refquota none default
mypool/Demo refreservation none default
mypool/Demo usedbyrefreservation 0 -
root@opensolaris:~#
root@opensolaris:~# useradd -d /mypool/smbtest smbtest
root@opensolaris:~# passwd smbtest
New Password:
Re-enter new Password:
passwd: password successfully changed for smbtest
root@opensolaris:~#
root@opensolaris:~# smbadm join -w Galaxy
After joining Galaxy the smb service will be restarted automatically.
Would you like to continue? [no]: y
Successfully joined Galaxy
root@opensolaris:~#
root@opensolaris:~# sharemgr show -vp
default nfs=()
zfs
zfs/mypool/myfs nfs=() nfs:sys=(rw="@172.16.X.X/24" root="@172.16.X.X/24")
/export/zfs1
zfs/mypool/Demo smb=()
Demo=/mypool/Demo
zfs/mypool/myfs2 smb=()
mypool_myfs2=/mypool/myfs2
root@opensolaris:~#
這是會出現類似這樣的介面:
root@opensolaris:/mypool/Demo# svcs -a |grep smb
online 12:48:40 svc:/network/smb/client:default
online* 12:48:41 svc:/network/smb/server:default
root@opensolaris:/mypool/Demo#
從remote訪問不行
reboot一次,結果ok,可以使用了。
没有评论:
发表评论