-
Recent Posts
Archives
- April 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- August 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- September 2016
- August 2016
- March 2016
- December 2015
- November 2015
- October 2015
- September 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- November 2014
- October 2014
- September 2014
- August 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
Categories
Category Archives: Uncategorized
linux_network_exercises
This page contains some PDFs with linux network exercises. 1. ssh autologin 2. ip binding Centos 7 3. linux nfs 4. cron 5. systemctl
Posted in Uncategorized
Leave a comment
genfile
#!/bin/bash if [ $# -ne 5 ] then echo “usage: $0 <start_count> <end_count> <device_to_read_from><output_filename>” echo “example: $0 1 500 /dev/sda 4096 run1” exit fi skip=0 for i in `seq $1 $2` do dd if=$3 of=${5}.$i count=1 bs=$4 skip=$skip ((skip+=1)) done
Posted in Uncategorized
Leave a comment
linux del and undel exercise
del script #!/usr/bin/bash TRASH=/trash DB=/trash/db touch /trash/db mkdir ${TRASH} 2> /dev/null if (($# == 0)) then echo “usage: del ” fi FILE=`basename $1` DIR=`dirname $1` DIR=`echo $DIR|sed ‘s/\//_/g’` SUFFIX=`date +%Y_%m_%d_%H_%M_%S` FILE=${FILE}_${SUFFIX}_$DIR ID=`wc -l ${DB}|awk ‘{print $1}’` echo $ID ((ID+=1)) echo … Continue reading
Posted in Uncategorized
Leave a comment
Linux exercises
NFS client and server LVM ip binding systemd SElinux nfs autofs working in the shell firewalld date and ntp scripts splitfile Cron
Posted in Uncategorized
Leave a comment
linux systemd_ex
create a service file: cp /lib/systemd/system/crond.service /lib/systemd/system/sleep.service vi /lib/systemd/system/sleep.service create a script to be executed vi /usr/sbin/sleep.sh #!/usr/bin/bash sleep 1000 make the script executable chmod +x /usr/sbin/sleep.sh enable the service systemctl enable sleep.service start the service systemctl start sleep.service check … Continue reading
Posted in Uncategorized
Leave a comment
linux apache virtual hosts example
Create the directory structure mkdir -p /var/www/html/www.vhost1.com mkdir -p /var/www/html/www.vhost2.com Create test web pages for each virtual host echo “vhost1” > /var/www/html/www.vhost1.com/index.html echo “vhost1” > /var/www/html/www.vhost1.com/index.html echo “vhost2” > /var/www/html/www.vhost2.com/index.html Set up ownership and permissions chown -R apache:apache /var/www/html/www.vhost1.com chown … Continue reading
Posted in Uncategorized
Leave a comment
linux firewalld_ex
firewalld tutorial – is firewalld running? firewall-cmd –state – start firewalld systemctl start firewalld.service firewall-cmd –state – what is the default zone? firewall-cmd –get-default-zone – what zones are active on which interfaces? firewall-cmd –get-active-zones – what are the service settings … Continue reading
Posted in Uncategorized
Leave a comment
netapp aggr efficiency
To view compaction, dedupe and compression results. cl1::*> aggr show-efficiency -aggregate n2_aggr1 Name of the Aggregate: n2_aggr1 Node where Aggregate Resides: cl1-02 Logical Size Used by Volumes, Clones, Snapshot Copies in the Aggregate: 118.8MB Total Physical Used: 126.5MB Total Storage … Continue reading
Posted in Uncategorized
Leave a comment
Netapp add snapmirror relationship with altavault nfs share
cl1::> snapmirror create -source-path svm1:vol1 -destination-path 192.168.4.244:/share/rfs/nfs -type xdp Operation succeeded: snapmirror create for the relationship with destination “192.168.4.244:/share/rfs/nfs”.
Posted in Uncategorized
Leave a comment
sdvmdr_temp_example
Download Ontap 9 Command-line by Example (amazon.com) Step 1 Step 2 Step 3
Posted in Uncategorized
Leave a comment
netapp altavault -> AWS quick and dirty
Download Ontap 9 Command-line by Example (amazon.com) 1. deploy altavault ova. 2. add vmdk for local storage 3. power on 4. login with ssh admin/password – set new password and configure networking 5. browser login – storage optimization service is critical … Continue reading
Posted in Uncategorized
Leave a comment
raspberry pi : enx{mac} instead of eth0 (raspberry pi)
edit: /lib/udev/rules/73-usb-net-by-mac.rules change: ACTION==”add”, SUBSYSTEM==”net”, SUBSYSTEMS==”usb”, NAME==””, \ ATTR{address}==”?[014589cd]:*”, \ TEST!=”/etc/udev/rules.d/80-net-setup-link.rules”, \ IMPORT{builtin}=”net_id”, NAME=”$env{ID_NET_NAME_MAC}” Change the NAME at the end as follows: into: ACTION==”add”, SUBSYSTEM==”net”, SUBSYSTEMS==”usb”, NAME==””, \ ATTR{address}==”?[014589cd]:*”, \ TEST!=”/etc/udev/rules.d/80-net-setup-link.rules”, \ IMPORT{builtin}=”net_id”, NAME=”eth0″
Posted in Uncategorized
Leave a comment
Protected: CommVault CVCSA
There is no excerpt because this is a protected post.
Posted in Uncategorized
Enter your password to view comments.
netapp snapmirror vault and svmdr in 10 steps
netapp snapmirror vault and svmdr in 10 steps
Posted in Uncategorized
Leave a comment
netapp svmdr nfs example
In this example you will setup SVMDR, with identity-preserve. Clusters cl1 and cl2 have already been peered. You will exclude a volume from replication and perform a DR action with resync in both directions. 1. Create the two SVMs drsource … Continue reading
Posted in Uncategorized
Leave a comment
netapp snapvault cdot example
In this example you will setup an NFS SVM and snapvault the nfs export volume to a second SVM destination volume. You will setup an XDP snapmirror relationship. Then you will create file in the source volume and restore them … Continue reading
Posted in Uncategorized
Leave a comment
netapp snapmirror dr with lun example
Snapmirror DR in a SAN environment. In this example you will create two SVMs. The src_svm has a src_volume, the dest_svm will have a dest_volume of the type DP. The two SVMs will be peered. The cluster cl1 and cl2 … Continue reading
Posted in Uncategorized
Leave a comment
Netapp iscsi DR example
In this example we will create two SVMs. The source_svm has a source_volume, the dest_svm will have a dest_volume of the type DP. The two SVMs will be peered. The cluster cl1 and cl2 are already peered. We will … Continue reading
Posted in Uncategorized
Leave a comment
netapp cdot lunexample failover dr
Cluster names: cl1 and cl2 Vserver names:source and dest Volume names: lvol1 and dest Ip-addresses 192.168.4.222 and 192.168.4.223 cl1::> vserver create -vserver source -subtype default -rootvolume rv -aggregate n1_aggr1 -rootvolume-security-style unix cl1::> vol create -vserver source -volume lvol -aggregate n1_aggr2 … Continue reading
Posted in Uncategorized
Leave a comment
netapp performance stuff
Some performance commands: top client/file , network test-path , max-xfer , qos-policy cl1::> statistics top client show cl1 : 5/15/2017 19:43:56 *Estimated Total IOPS Protocol Node Vserver Client ———- ——– —— ——- ————- 34 … Continue reading
Posted in Uncategorized
Leave a comment
netapp example lun failover snapmirror ontap 9.x
This is an example LUN failover. Two peered clusters (not discussed) Two peered svms. Two volumes in a snapmirror relationship. This is about changing the LUN serial number so that the initiator does not have to do a rescan of … Continue reading
Posted in Uncategorized
Leave a comment
netapp trimming log files via cronjob
Most (if not all) management on ONTAP can be done from the CLI or SystemManager. If you want to run some scripts of your own, there is a way to do that. If you are not familiar with UNIX/Linux, don’t … Continue reading
Posted in Uncategorized
Leave a comment
SnapCenter unregister VSC
On the VSC server edit the file \Program Files\Netapp\Virtual Storage Console\etc\scbr\scbr.properties Remove everything in the file save it and then restart the Netapp SnapManager for Virtual Infrastucture service.
Posted in Uncategorized
Leave a comment
windows RDP allow login
Allow RDP sessions on AD for users. – Computer (right click -> properties) – Remote Settings – Allow connections from computers running any version of RDP -> Select Users -> Add User Start: secpol.msc -> Local Policies -> User Right … Continue reading
Posted in Uncategorized
Leave a comment
netapp smb stuff
– List share properties vserver cifs share properties add -vserver cifs -share-name data1 -share-properties showsnapshot attributecache continuously-available branchcache access-based-enumeration namespace-caching encrypt-data – Enable referrals vserver cifs options modify -vserver cifs -is-referral-enabled true – Limit maximum connections vserver cifs share modify … Continue reading
Posted in Uncategorized
Leave a comment
netapp flexgroup snapmirror example
In the following example we set up: 1. a flexgroup on cluster cl1 svm flex1 2. a destination volume on cluster cl2single svm flex-2 3. a snapmirror relation between source and destination volume 4. a reversed relationship Prereq: Clusters and … Continue reading
Posted in Uncategorized
Leave a comment
ontap 9 list all api calls
To list the api calls you can use to manage/monitor ontap 9, you can either use a clustershell command (1) or you can run a query using Netapp SDK. (2) In the second case you will have to enable http … Continue reading
Posted in Uncategorized
Leave a comment
netapp iscsi svmdr
In this post: We create a source svm and a destination svm of the type dp-destination (svmdr) The source svm maps a lun to a linux (centos) machine. The source svm is snapmirror to the destination svm. The relationship is … Continue reading
Posted in Uncategorized
Leave a comment
netapp cdot flasphool stuff
statistics show-periodic -object disk:raid_group -instance /n1_aggr1/plex0/rg0 -counter disk_busy|user_read_latency -interval 1 -iterations 60 system node run -node cl911_1 wafl awa start n1_aggr1 system node run -node cl911_1 wafl awa print system node run -node cl911_1 wafl awa stop with flashpools system … Continue reading
Posted in Uncategorized
Leave a comment
docker service swarm web example
Docker service swarm web 4 nodes 6 containers PDF Docker service swarm web 4 nodes 6 containers PDF
Posted in Uncategorized
Leave a comment
linux resize vmdk – device and physical volume
In this example a vmware vmdk is used by a CentOS 7 VM. The original size of the vmdk is 1G, and is resized to 3G. After this resizing in ESXi, run the following in the CentOS VM. The name … Continue reading
Posted in Uncategorized
Leave a comment
Refurbishing Mac
Naturally, Macs have quite some weight. When out of production, they can be re-used to hold down your raspberry pi.
Posted in Uncategorized
Leave a comment
raspberry pi register nfs-server with rpcbind
raspberry_nfs_server_start Problem with raspberry pi (debian) and nfs-kernel-server. Systemd apparently starts the nfs-kernel-server before rpcbind has completed starting. Solution that works for me: The relevant nfs services are enable and started. 1. Make sure that nfs-kernel-server gets started at boottime. … Continue reading
Posted in Uncategorized
Leave a comment
netapp root volume damaged
If a clusternode reports that the ROOT NOT WORKING PROPERLY: RECOVERY REQUIRED unsetenv bootarg.init.boot_recovery
Posted in Uncategorized
Leave a comment
docker networking example
docker.network 1. List the docker network. # docker network ls NETWORK ID NAME DRIVER SCOPE 82f0e82e8a52 bridge bridge local 2f29f6c3dc07 host host local 0ee77fd0eaf6 none null local 2. List the bridge’s address. # ifconfig docker0 | grep “inet ” inet … Continue reading
Posted in Uncategorized
Leave a comment
docker remove all containers and images
docker rm -f $(docker ps -a -q) docker rmi $(docker images -q)
Posted in Uncategorized
Leave a comment
docker shared storage
In the following example we create a volume in a container and share the volume with other containers. 1. Share a docker volume – create the volume in a container that you do not run docker create -v /webdata –name … Continue reading
Posted in Uncategorized
Leave a comment
linux yum groups
Create a file in the groups format used by yum Tell createrepo to include that group file in your repository. Step 1 You can either open a text editor and create the groups xml file manually or you can run … Continue reading
Posted in Uncategorized
Leave a comment
linux strace examples
strace is a systemcall tracer. It tells you what kernel functions are called as a result of your program. It monitors systemcalls and signals. strace -p strace (trace a systemcall) strace -e open (trace multiple systemcalls) strace -e trace=open,read ls … Continue reading
Posted in Uncategorized
Leave a comment
docker – remove all containers and images
#!/bin/bash # Delete all containers docker rm $(docker ps -a -q) # Delete all images docker rmi $(docker images -q)
Posted in Uncategorized
Leave a comment
linux grow rootfs
Grow xfs rootfs The root volumegroup in this example is centos, the disk in the volumegroup is sda. We add a new disk, extend the group, extend the logical volume and grow the filesystem. add new disk. (in vmware: edit … Continue reading
Posted in Uncategorized
Leave a comment
linux PS1 settings
Information you can display with PS1 link: cyberciti \a : an ASCII bell character (07) \d : the date in “Weekday Month Date” format (e.g., “Tue May 26”) \D{format} : the format is passed to strftime(3) and the result is … Continue reading
Posted in Uncategorized
Leave a comment
linux parameter expansion
from: wiki Simple usage $PARAMETER ${PARAMETER} Indirection ${!PARAMETER} Case modification ${PARAMETER^} ${PARAMETER^^} ${PARAMETER,} ${PARAMETER,,} ${PARAMETER~} ${PARAMETER~~} Variable name expansion ${!PREFIX*} ${!PREFIX@} Substring removal (also for filename manipulation!) ${PARAMETER#PATTERN} ${PARAMETER##PATTERN} ${PARAMETER%PATTERN} ${PARAMETER%%PATTERN} Search and replace ${PARAMETER/PATTERN/STRING} ${PARAMETER//PATTERN/STRING} ${PARAMETER/PATTERN} ${PARAMETER//PATTERN} String length … Continue reading
Posted in Uncategorized
Leave a comment
Linux create RPM and local repository
Example of RPM and YUM on CentOS 6. 1. Install the RPM build environment: lin60 # yum install -y rpm-build rpmdevtools 2. Create the directory for the RPM environment and the directory in which your program will be installed. lin60 … Continue reading
Posted in Uncategorized
Leave a comment
SVM rootvolume protection
Restoring the root volume of an SVM If the root volume of a Storage Virtual Machine (SVM) becomes unavailable, clients cannot mount the root of the namespace. In such cases, you must restore the root volume by promoting another volume … Continue reading
Posted in Uncategorized
Leave a comment
sed
substitute one column in a file: sed ‘s/[A-Z|0-9]*/REPLACED/1’ filename
Posted in Uncategorized
Leave a comment
linux create local repo
In this example – the server 192.168.0.1 contains all packages in /export/rhel72/Packages – the /export directory is exported log in to vm_client 1. create a mountpoint: # mkdir /software create a repodir # mkdir /localrepo 2. mount the /export/ directory … Continue reading
Posted in Uncategorized
Leave a comment
selinux add httpd port
Ports and SELINUX example. We want our webserver to listen to a non default port. 1. Configure httpd to listen to a non default port – say 8999. After a default install of httpd port 80 is the port that … Continue reading
Posted in Uncategorized
Leave a comment
selinux stopaudit
cat stopaudit grep $1 /var/log/audit/audit.log | audit2allow -M $1 sed -i -e s/allow/dontaudit/ ${1}.te checkmodule -M -m -o $1.mod $1.te semodule_package -o $1.pp -m $1.mod semodule -i $1.pp ./stopaudit httpd
Posted in Uncategorized
Leave a comment
selinux allow script
cat allow.sh grep $1 /var/log/audit/audit.log | audit2allow -M $1 checkmodule -M -m -o $1.mod $1.te semodule_package -o $1.pp -m $1.mod semodule -i $1.pp ./allow.sh httpd
Posted in Uncategorized
Leave a comment
Centos systemd
systemctl # systemctl Start/stop or enable/disable services Activates a service immediately: # systemctl start foo.service Deactivates a service immediately: # systemctl stop foo.service Restarts a service: # systemctl restart foo.service Shows status of a service including whether it is running … Continue reading
Posted in Uncategorized
Leave a comment
SELinux change DocumentRoot for Apache
Subject (processes) and Objects (files) have a security context. (Process contexts are called domains, file contexts are called labels) Context type Apache uses a DocumentRoot that has “httpd_sys_content_t” as type. ls -Zd /var/www/html drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 /var/www/html Apache’s httpd … Continue reading
Posted in Uncategorized
Leave a comment
netapp cpu domains
https://kb.netapp.com/support/s/article/faq-cpu-utilization-in-data-ontap-scheduling-and-monitoring?language=en_US
Posted in Uncategorized
Leave a comment
cdot RBAC example
(Thanks to Sander, Kees, Maarten and other students in some class in the Netherlands) We want a user to be able to perform a particular task in an SVM. We can use RBAC to configure this. Example: We want to … Continue reading
Posted in Uncategorized
Leave a comment
ontap9 svmdr
Set up , manage and delete an svmdr pair. Present: Two clusters – cluster1 and cluster2 snapmirror license on both clusters peering of the two clusters cluster1 will be the source cluster2 will be the destination. vserver src (source) and … Continue reading
Posted in Uncategorized
Leave a comment
cdot snapmirror exercise with commands
1. Create a new SVM (SVMcl1) on cluster1 and add a LIF to the SVM: 192.168.0.200 vserver create -vserver SVMcl1 -rootvolume root -aggregate aggr1_n1 -rootvolume-security-style unix net int create -vserver SVMcl1 -lif lif1 -address 192.168.0.200 -netmask 255.255.255.0 -role data \ … Continue reading
Posted in Uncategorized
Leave a comment
cdot snapmirror exercise without commands
1. Create a new SVM (SVMcl1) on cluster1 and add a LIF to the SVM: 192.168.0.200 2. Add a 500MB volume (cl1data) to the SVM with junction-path: /data 3. Add an export-policy with a rule for the CentOS VM: (192.168.0.10) … Continue reading
Posted in Uncategorized
Leave a comment
cdot cifs create error
When setting up a cifs SVM. Prerequisite: the time difference between DNS/AD and the cluster is no more than 5 minutes. cl1::*> cifs create -vserver cifs_sales -cifs-server CIFS_SALES -domain netapp.local -ou CN=Computers -default-site “” -status-admin up In order to create … Continue reading
Posted in Uncategorized
Leave a comment
cdot 8.3 domaintunnel
(Elkin) ## clustermode domain-tunnel ## # To have the administrator of the AD domain login to the administration vserver and manage the cluster, create a domain-tunnel. # The name of the admin-vserver: security login create -user-or-group-name netapp\administrator -application ssh -authmethod … Continue reading
Posted in Uncategorized
Leave a comment
cdot simulator new root aggregate
Situation Simulator. Cluster: cl1 Node1 : cl1-01 Node2 : cl1-02 cl1::*> set d cl1::*> cluster show Node Health Eligibility Epsilon ——————– ——- ———— ———— cl1-01 true true true cl1-02 true true false 2 entries were displayed. Node1 (cl1-01) is ok … Continue reading
Posted in Uncategorized
Leave a comment
CDOT config-backups
Howo upload a CDOT config backup from filer to ftpserver. Requirements. Running FTP server in network. IP of ftpserver. Username of ftpuser. Password of ftpuser. Login to Clustermanagement lif. 1. ssh admin@192.168.4.100 Go to priv or diag mode. 2. set … Continue reading
Posted in Uncategorized
Leave a comment
cdot simulator single node setup
Single Node Cluster (sort of)
Posted in Uncategorized
Leave a comment
cdot metrocluster switchback
metrocluster heal -phase aggregates metrocluster heal -phase root-aggregates metrocluster switchback
Posted in Uncategorized
Leave a comment
cdot 8.3.1 licenses
CLUSTERED SIMULATE ONTAP LICENSES +++++++++++++++++++++++++++++++++ These are the licenses that you use with the clustered Data ONTAP version of Simulate ONTAP to enable Data ONTAP features. There are four groups of licenses in this file: – cluster base license – … Continue reading
Posted in Uncategorized
Leave a comment
Cdot Advanced Drive Partitioning how to disable
In order to disable auto-partitioning (ADP), perform the following bootargs at the LOADER prompt before initial setup: 1. Run the following command to disable HDD auto-partitioning: setenv root-uses-shared-disks? false 2. Run the following command to disable SSD storage pool partitioning: … Continue reading
Posted in Uncategorized
Leave a comment
Restoring a vm from a Netapp Snapmirror (DP/XDP) destination
2015 peter van der weerd Restoring a vm from a Netapp Snapmirror (DP/XDP) destination. 1. List the available snapshots on mirrordestination. cl1::> cl1::> snap show -vserver nfs1 -volume linvolmir —Blocks— Vserver Volume Snapshot State Size Total% Used% ——– ——- ——————————- … Continue reading
Posted in Uncategorized
Leave a comment
cdot snmp
original link Enabling SNMP, API access on NetApp cluster mode SVMs In order to get complete monitoring of, and be able delegate access to, Storage Virtual Machines on NetApp Cluster mode, it is necessary to add the SVMs as separate … Continue reading
Posted in Uncategorized
Leave a comment
cdot read logfiles using a browser
cl1::*> security login create -username log -application http -authmethod password Please enter a password for user ‘log’: Please enter it again: cl1::*> vserver service web modify -vserver * -name spi -enabled true Warning: The service ‘spi’ depends on: ontapi. Enabling … Continue reading
Posted in Uncategorized
Leave a comment
cdot setup events
#setup smtpserver and sender, smtpserver should be reachable. event config modify -mailserver smtp.online.nl -mailfrom petervanderweerd@gmail.com #check your settings event config show Mail From: petervanderweerd@gmail.com Mail Server: smtp.online.nl #create destination for critical messages. the recipient will receive #everything sent to the … Continue reading
Posted in Uncategorized
Leave a comment
cdot autosupport test
cluster1::> system node autosupport invoke -type test -node node1
Posted in Uncategorized
Leave a comment
cdot convert snapmirror to snapvault
Steps Break the data protection mirror relationship by using the snapmirror break command. The relationship is broken and the disaster protection volume becomes a read-write volume. Delete the existing data protection mirror relationship, if one exists, by using the snapmirror … Continue reading
Posted in Uncategorized
Leave a comment
cdot mhost troubleshoot
1. go to the systemshell set diag systemshell -node cl1-01 2. unmount mroot cd /etc ./netapp_mroot_unmount logout 3. run cluster show a couple of times and see that health is false cluster show 4. run cluster ring show to see … Continue reading
Posted in Uncategorized
Leave a comment
cdot lif troubleshoot
1. create a lif net int create -vserver nfs1 -lif tester -role data -data-protocol cifs,nfs,fcache -home-node cl1-01 -home-port e0c -address 1.1.1.1 -netmask 255.0.0.0 -status-admin up 2. go to diag mode set diag 3. view the owner of the new lif … Continue reading
Posted in Uncategorized
Leave a comment
CDOT 8.3 release notes
http://mysupport.netapp.com/documentation/docweb/index.html?productID=61898
Posted in Uncategorized
Leave a comment
openstack compute node on centos7
yum install -y https://rdo.fedorapeople.org/rdo-release.rpm
Posted in Uncategorized
Leave a comment
openstack lvm and cinder
If you do not specify a volume group, cinder will create his own volume group called cinder-volumes and use loopback devices for physical volumes. If you do create and specify a volume group, you should specify the volume group to … Continue reading
Posted in Uncategorized
Leave a comment
CDOT 8.3 statistics catalog example
statistics catalog instance show -object lif statistics catalog instance show -object volume statistics catalog counter show -object lif statistics catalog counter show -object volume statistics start -object lif -counter recv_data statistics stop statistics show -object lif
Posted in Uncategorized
Leave a comment