2021-04-12 14:40:45 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-04-12 15:11:36 -05:00
|
|
|
# Example create 4-drive mirror pool, create and chown a samba shared dataset and associated userid for it
|
|
|
|
# userid needs to exist (useradd/adduser) first
|
2021-04-12 14:40:45 -05:00
|
|
|
|
2021-04-12 15:11:36 -05:00
|
|
|
zp=zsgtera4compr
|
|
|
|
|
|
|
|
zpool create -f -o ashift=12 -o autoexpand=on -O atime=off -O compression=lz4 $zp \
|
2021-04-12 14:40:45 -05:00
|
|
|
mirror ata-ST4000VN000-1H4168_Z3073Z29 ata-ST4000VN000-1H4168_Z306G0K3 \
|
|
|
|
mirror ata-ST4000VN000-1H4168_Z3073ZAY ata-ST4000VN000-1H4168_Z306G7H8
|
|
|
|
|
2021-04-12 15:11:36 -05:00
|
|
|
pdir=dave; zfs create -o atime=off -o sharesmb=on $zp/$pdir; chown $pdir:dave /$zp/$pdir
|
2021-04-12 14:40:45 -05:00
|
|
|
ls -al /$pname/$pdir
|
|
|
|
|
|
|
|
zpool status
|
|
|
|
|
|
|
|
(set -r
|
2021-04-12 15:11:36 -05:00
|
|
|
smbpasswd -a $pdir
|
2021-04-12 14:40:45 -05:00
|
|
|
)
|
2021-04-12 15:11:36 -05:00
|
|
|
|