Clustered ONTAP Administration Notes CLI Crib Sheet: Part iii/v

This 5 part posting is a very rough and ready CLI crib sheet for Clustered ONTAP.


The version of CDOT here is 8.1.1 / 8.1.2.

8: NAS PROTOCOLS

> vserver services nis-domain
> vserver services ldap
> vserver services Kerberos-realm
> vserver export-policy
> vserver export-policy rule
> vserver nfs modify ?
> vserver nfs modify -v4.1-pnfs enabled

> vserver cifs options modify -vserver vs1 -smb2-enabled true
> vserver cifs create -vserver vs1 -domain lab.priv -cifs-server MYCIFS
> vserver cifs share create -vserver vs1 -share-name root -path / -share-properties browsable
> vserver cifs share create -vserver vs1 -share-name root_pw -path /.admin -share-properties browsable
> vserver cifs share create -vserver vs1 -share-name %w -path /user/%w -share-properties browsable,homedirectory

%d - user’s Domain
%w - user’s Windows login name
%% - to represent a literal “%”

> vserver name-mapping create -vserver vs1 -direction win-unix -position 1 -pattern “lab\\Administrator” -replacement “root”
> vserver name-mapping create -vserver vs1 -direction unix-win -position 1 -pattern “root” -replacement “lab\\Administrator”
> vserver name-mapping create -vserver vs1 -direction win-unix -position 1 -pattern “lab\\(.+)” -replacement “\1”
> vserver name-mapping create -vserver vs1 -direction unix-win -position 1 -pattern “(.+)” -replacement “lab\\\1”

EXAMPLE 8.1: ACCESSING A CIFS SHARE FROM A WINDOWS CLIENT

net view clusvs2
net use * \\clusvs2\vol1
net use * \\clusvs2\rootdir
dir z:
dir y:

> cifs share access-control show -vserver vs2
> cifs share access-control modify -vserver vs2 -share vol1 -user-or-group Everyone Read
> cifs share access-control show -vserver vs2
> cifs share access-control modify -vserver vs2 -share vol1 -user-or-group Everyone Full_Control

EXAMPLE 8.2: CONFIGURE CIFS HOME DIRECTORIES

> cifs home-directory search-path add -vserver vs2 -path /vs2vol1
> cifs home-directory search-path show
> cifs share create -vserver vs2 -share-name “~&w”| -path “%w” -share-properties oplocks,browsable,changenotify,homedirectory cifs share show -vserver vs2

net use
z:
dir
md administrator
dir
dir administrator
net view \\clusvs2
net use * \\clusvs2\~administrator

EXAMPLE 8.3: ACCESS YOUR DATA FROM AN NFS CLIENT

> vserver export-policy rule show -vserver vs2

mkdir /mnt/vs2
mkdir /mnt/path01
mount -t nfs DATA_LIF_IP:/ /mnt/vs2
mount -t nfs DATA_LIF_IP:/vs2vol1 /mnt/path01
cd /mnt/vs2/vs2vol1/administrator/
ls

> vol show -volume vs2_vol01 -field used

cd /mnt/path01
cp /usr/include/*
ls

> vol show -volume vs2_vol01 -field used

cd /mnt/vs2/path01
ls

9: SAN PROTOCOLS

> system license add ISCSICODE
> system license show
> storage aggregate create -aggregate aggr_iscsI_2 -node clusa-02 -diskcount 7
> aggregate show
> vserver create -vserver vsiSCSI2 -rootvolume vsISCSI2_root -aggregate aggr_iscsi_2 -ns-switch file -nm-switch file -rootvolume-security-style ntfs
> vserver iscsi create -vserver vsISCSI2 -target-alias vsISCSI2 -status up
> vserver iscsi show
> network interface create -vserver vsISCSI2 -lif i2LIF1 -role data -data-protocol iscsi -home-node clusa-01 -home-port e0c -address 192.168.239.40 -netmask 255.255.255.0 -> status-admin up
> net in show -vserver vsISCSI2

Note: Failover groups do not apply to SAN LIFs

> lun portset create -vserver vsISCSI2 -portset portset_iscsi2 -protocol iscsi -port-name i2LIF1 i2LIF2 i2LIF3 i2LIF4
> lun portset show

> lun igroup create -vserver vsISCSI2 -igroup ig_myWin2 -protocol iscsi -ostype windows -initiator iqn.1991-05.com.microsoft:win-frtp2qb78mr -portset portset_iscsi2
> igroup show

> vserver iscsi tpgroup show -vserver vsISCSI2
> igroup show -instance ig_myWin2

> vserver iscsi session show -vserver vsiSCSI2
> vserver iscsi connection show -vserver vsISCSI2

> vol create -vserver vsISCSI2 -volume vol1 -aggregate aggr_iscsi_2 -size 150MB -state online -type RW -policy default -security-style ntfs
> vol show

> lun create -vserver vsISCSI2 -volume vol1 -lun lun_vsISCSI2_1 -size 50MB -ostype windows_2008 -space-reserve enable
> lun show -vserver vsISCSI2

> lun map -vserver vsISCSI2 -volume vol1 -lun lun_vsISCSI2_1 -igroup ig_myWin2
> lun show -instance /vol/vol1/lun_vsISCSI2_1

10: STORAGE EFFICIENCY

> volume efficiency on -vserver vs1 -volume vol1
> volume efficiency on -vserver vs1 -volume vol1 -compression true

> volume clone create -vserver vs1 -flexclone vol1clone -parent-volume vol1
> volume clone split start -vserver vs1 -flexclone vol1clone
> volume clone split show -vserver vs1 -flexclone vol1clone

Comments