AuthorTingWei

Mining Instruction – Step 2 Setup Hashflare mining account

  1. Open an account in https://hashflare.io/r/82C63DBF , please use this link so i can earn some commission from it 😃
  2. Once registered and login, click on “Setting” and enable “2 factor authentication” , make sure you have either Microsoft authenticator or Google authenticator. This is very IMPORTANT to secure your account.
  3. In “Setting” page, enter the ETH address from step 1. Click “Save”.

  4. Click on “Buy Hashrate” to buy Hash power to start mining.

  1. We will be focusing on ETH mining click “ETHASH”

  1. This is what you will be seeing , BUT let’s calculate the investment on…

  1. Goto https://www.cryptocompare.com/mining/calculator/eth , then put in any number you desired to invest, i would suggest to start with 80MH/s(80,000KHs).
  1. Investment of 80MH/s (1 year with no maintenance fees! BTC has maintenance fees.) USD 1,760 . you can pay with credit card. Based on cryptocompare.com calculator, you will get USD4,015.94 after 1 year if the coin maintained at USD1,308.17 ( but i am foreseeing it to go up 😃. ) . You are getting net profit USD2,255.94, 120% gain from your investment!!!!
  2. Next proceed to finish the payment, and the miner will start mining.  It will appear on “History” page on daily basis. The ETH will accumulate before it get transfer to the ETH wallet.

Mining instruction – Step 1 Creating Wallet address at Binance

I am going to provide mining instruction using Hashflare.io and how to create the wallet easiest way using Binance. In this tutorial (Step 1) you will learn how to create wallet address. You need wallet before proceed with any mining or trading.

1. Create digital wallet at exchange if not familiar with private digital wallet. Click on the link https://www.binance.com/?ref=18320921

2. Setup 2 factor authentication in Binance account (either Microsoft Authenticator or Google authenticator.)

3. Setup SMS authentication to strengthen the security of Binance account.

4. Click on Fund -> Deposit Withdrawals to create coin address.

Checking your wallet address


5. Type “ETH” in search column.

look for ETH coin


6. Click “Deposit”

ETH wallet address

7. Copy down Deposit address by highlighting and press ctrl+c button to copy down the address. Do take note that this is unique address that accept only ETH coin, sending non-ETH coin to this address will lead to missing coin and you will lost it forever.

Netbackup list client with policy type

 

Admit it, Netbackup Java Console can’t do everything. Assuming you know which backup policy with what client.

In this example, I am looking for client which belong to “MS-SQL-Server” policy, there are some other type like “Standard” , “Oracle”, “MS-Windows”, “NDMP”….etc

If your master server is a SUN OS, then modify the code below to grep “Client/HW/OS/Pri/DMI” .

#!/bin/bash
cli_path="/usr/openv/netbackup/bin/admincmd"
for POLICY in `$cli_path/bppllist`
do
   TYPE=`$cli_path/bppllist $POLICY -L | grep "Policy Type" | awk '{print $3}'`
   if [ "$TYPE" = "MS-SQL-Server" ]
   then
   echo "POLICY: $POLICY  TYPE: $TYPE "
   for HOSTNAME in `$cli_path/bppllist $POLICY -L | grep "Client/HW/OS/Pri/DMI/CIT" | awk '{print $2}'`
      do
      echo "----"$HOSTNAME
      done
    fi
done

Expected output:

POLICY: GLOBAL-EV-SQL  TYPE: MS-SQL-Server
----SERVERSQL01
POLICY: GLOBAL-PRD-PP  TYPE: MS-SQL-Server
----SERVERSQL02
POLICY: GLOBAL-PRD-PP1  TYPE: MS-SQL-Server
----SERVERSQL03

Netapp 7 mode snapvault broken relationship check

Netapp Protection Manager is good in handling the snapvault and snapmirror relationship. However, the snapvault relationship will become “broken” once the source qtree deleted/removed. Using command like “snapvault status” is killing me especially when you have hundred of lines to view, though ssh method with “grep” command is helpful but it would be great to have a script to spoon feed us(almost) !

Here is the python script to run in Linux environment:

#/usr/bin/python
import sys
import os
#Define max tolerate hour , 168 = 7days
max_tolerate_hour=168
 
filer_input=sys.argv[1]
if filer_input not in ["filerA","filerB","filerC"]:
    print """This script only works for 3 filers: filerA,filerB,filerC .
Example:
python /home/thinkway/myscript/python/snapvault_relationship_check.py filerA
 
Exiting...
"""
    sys.exit()
else:
    print "Running..."
 
 
f=os.popen("ssh %s snapvault status | grep vol" % (filer_input))
for x in f.readlines():
    output_data = x.split()
    #Define variable
    source_path = output_data[0]
    dest_path = output_data[1]
    relationship = output_data[2]
    #We are only interested with hour,split it out!
    buffer_time = output_data[3].split(":",1)
    relationship_status = output_data[4]
    #Get destination nas hostname
    dest_nas = output_data[1].split(":",1)
    dest_nas_hostname = dest_nas[0]
    #Get the exact hour number and convert it into int
    extracted_hour = int(buffer_time[0])
    if relationship_status == "Idle":
        if extracted_hour > max_tolerate_hour:
            print "Source path         : ",source_path
            print "Destination path    : ",dest_path
            print "Max threshold(hours): ",max_tolerate_hour
            print "Idle (hours)        : ",extracted_hour
            print "Command             : ssh ",dest_nas_hostname," snapvault stop ",dest_path
            print "======================================================================"
 
    else:
        pass
print "Scan completed!"

The output will be…..

Running....
 
Source path         :  Source_filer:/vol/testvol/qtreeA
Destination path    :  filerA:/vol/filerX_testvol/qtreeA
Max threshold(hours):  168
Idle (hours)        :  10207
Command             : ssh  filerA  snapvault stop  filerA:/vol/filerX_testvol/qtreeA
======================================================================
Source path         :  Source_filer:/vol/rnd/r&d
Destination path    :  filerA:/vol/filerX_rnd/rxd
Max threshold(hours):  168
Idle (hours)        :  9884
Command             : ssh  filerA  snapvault stop  filerA:/vol/filerX_rnd/rxd
======================================================================
Source path         :  Source_filer:/vol/shared/sample
Destination path    :  filerA:/vol/filerX_shared/sample
Max threshold(hours):  168
Idle (hours)        :  5875
Command             : ssh  filerA  snapvault stop  filerA:/vol/filerX_shared/sample
======================================================================

See! Just copy and paste the “Command” line!!
P/S: If you have more simplified code to do this job, feel free to share with me and I will post it out 🙂

Netapp Ontap 7-mode command cheat sheet

 

Netapp Ontap cheat sheet

Netapp Ontap cheat sheet

I have a list of command references that I used it for my daily operational task. It is not complete but once you know most command in the list, it would speed up your task and useful for your Linux shell scripting (check aggr size, vol size ..etc) .  The 1 page reference is the limit, I tried my very best to squeeze in as much as I could.

Feel free to let me know your comment , I will be sharing the Excel spreadsheet if you need to translate to your own languages.

 

Netapp smtape from site A to site B – Part 2

Networker wayIn part 2 , the steps are only 4.  This option require fundamental knowledge of Networker. I am using Networker 8.6.

Steps are:

1. smtape directly to tape using Networker.

2. Send the tape to the destination site

3. smtape restore directly to snapmirror destination volume.

4. snapmirror resync!

 

I am not going to cover how to create client/group/media pool . Here is the command i used for smtape backup.

 Once you got the tape at destination site , load it :

You MUST use option “-S” (SSID) for smtape restoration.

1
2
3
4
5
6
7
8
[root@backup_server]# nsrndmp_recover -c filer_A -S 2604589186 -R filer_B -m /vol/test_restore
42795:nsrndmp_recover: Performing recover from Non-NDMP type of device
Host = backup_server (192.168.1.123) port = 9861
42690:nsrndmp_recover: Performing non-DAR Recovery..
42937:nsrdsa_recover: Performing Immediate recover
42940:nsrdsa_recover: Reading Data...
42942:nsrdsa_recover: Reading data...DONE.
42927:nsrndmp_recover: Successfully done

After restoration is done, check on snapmirror status and run the resync command. Please check on article part 1 if you do not know how to check the snapmirror status and run the resync.

Limitation:
1. SMtape allow backup and recover for full volume only.
2. Recovery must have save set ID (SSID)
3. Do not remove the smtape snapshot at source until the snapmirror resync run.

Netapp smtape from site A to site B – Part 1

I need to run snapmirror for a 8TB volume from site A to site B through WAN. The initial effort to get the snapmirror initialization via WAN failed, it tooks more than 3 weeks to run baseline and yet still failing .  Here comes SnapMirror to tape (smtape)  to save me from wasting my time praying so the initialization will get through.  I have my Oracle StorageTek SL150 installed at site B recently and here comes the challenges.

My company is using EMC Networker 8 , i have experience with Legato Networker(before it was acquired by EMC) , not so friendly. I was then introduced to Commvault ,  it could be very user friendly but due to it flexibility, it is sometimes complicated too.   There are 2 ways for me to accomplish my mission – export the data to tape , send it to another site, restore tape data, snapmirror resync !

1. Simple way – could apply to any backup software

2. Networker way

Part 1 is covering “simple way”

Ugly screenshot

simple way

There are 6 steps involved:

1.smtape to a source temp volume

2. Backup source temp volume to up to your tape using backup software

3. Send the tape to the destination site

4. Restore the date from tape to destination temp volume

5. smtape restore from temp volume to exact volume

6. snapmirror resync to establish the connection.

 
Example output :
1. create temp volume and smtape to it

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
filer_A> vol create smtape_test_source -l en_US aggr0 50g
Creation of volume 'smtape_test_source' with size 50g on containing aggregate
'aggr0' has completed.
 
filer_A> qtree create /vol/smtape_test_source/source
filer_A> priv set diag
Warning: These diagnostic commands are for use by NetApp
         personnel only.
filer_A*> smtape backup /vol/VMware_ISO /vol/smtape_test_source/source/dump_file
Job 13 started.
filer_A*> smtape status
Job ID Seq No Type    Status      Path                   Device                 Progress
    13      0 Backup  Active      /vol/VMware_ISO        /vol/smtape_test_source/source/dump_file 230.676 MB
filer_A*> smtape status
job not found

2. [Backup using your backup software to tape]
3. [send the tape to destination]

4. Retore the tape data to temp volume. I am using Networker “recover” command to restore the data from tape to filer.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
filer_B> vol create smtape_test_dest -l en_US aggr0 60g
 
[root@backup_server]# recover -R filer_B -c filer_A -d /vol/smtape_test_dest /vol/smtape_test_source
Current working directory is /vol/smtape_test_source/
recover> dir
total 256
03/11/13 17:24            <DIR>         source
recover> pwd
/vol/smtape_test_source/
recover> list
0 file(s) marked for recovery
recover> destination
recover files into /vol/smtape_test_dest
recover> ls
source
recover> cd source
recover> ls
dump_file
recover> cd ..
recover> ls -l
total 256
drwxrwxrwx root             4096 Mar 11 17:24 source
recover> add source
2 file(s) marked for recovery
recover> recover
Recovering 2 files within /vol/smtape_test_source/ into /vol/smtape_test_dest
Volumes needed (all on-line):
        A00035 at /dev/rmt/0cbn
Total estimated disk space needed for recover is 2113 MB.
Requesting 2 file(s), this may take a while...
42795:nsrndmp_recover: Performing recover from Non-NDMP type of device
Host = backup_server.example.com (192.168.1.123) port = 9661
42689:nsrndmp_recover: Performing DAR Recovery..
42617:nsrndmp_recover: NDMP Service Log: DIRECT ACCESS RECOVERY (DAR) requested
 
42937:nsrdsa_recover: Performing Immediate recover
42940:nsrdsa_recover: Reading Data...
42617:nsrndmp_recover: NDMP Service Log: RESTORE: RESTORE IS DONE
 
42942:nsrdsa_recover: Reading data...DONE.
42927:nsrndmp_recover: Successfully done

5. smtape command to restore the data from temp volume to the snapmirror destination volume.

1
2
3
4
5
6
7
8
9
10
11
12
filer_B*> vol create test_restore -l en_US aggr0 60g
Creation of volume 'test_restore' with size 60g on containing aggregate
'aggr0' has completed.
 
filer_B*> vol restrict /vol/test_restore
Volume 'test_restore' is now restricted.
 
filer_B*> smtape restore /vol/test_restore /vol/smtape_test_dest/source/dump_file
 
Job 9 started.filer_B*> smtape status
Job ID Seq No Type    Status      Path                   Device                 Progress
    11      0 Restore Active      /vol/test_restore      /vol/smtape_test_dest/source/dump_file 430.848 MB

6. Once the restoration completed, check on snapmirror status to see if the connection ready. Resync one you see it!

1
2
3
4
filer_B*> snapmirror status
Snapmirror is on.
Source                                                      Destination                                State          Lag        Status
snapshot_for_smtape.8add9a0e-8a2d-11e2-a408-123478563412.0  filer_B:test_restore                      Snapmirrored   21:08:21   Idle
1
2
3
4
5
6
7
8
filer_B*> snapmirror resync -S filer_A:VMware_ISO filer_B:test_restore
NOTE: Destination volume test_restore is already a replica.
NOTE: Resync will not need to revert the volume.
The resync base snapshot will be: snapshot_for_smtape.8add9a0e-8a2d-11e2-a408-123478563412.0
Are you sure you want to resync the volume? y
Tue Mar 12 14:35:17 MYT [filer_B:replication.dst.resync.success:notice]: SnapMirror resync of test_restore to filer_A:VMware_ISO was successful.
Transfer started.
Monitor progress with 'snapmirror status' or the snapmirror log.

The drawback for this method is: require 2x of space in destination during the restoration. This is simple but space consuming. It is good if you have the extra space in your destination filer.

Part II will cover the restoration using Networker 8.6P4.

Netapp 8.1.x Maximum aggregate size

Source

It took me a while to search for the Maximum 64 bit aggregate size.

SSH to Netapp without password

Assuming you have

1. Linux box

2. Netapp box

You need to ssh to Netapp box without password, please follow the guide below , it is taken from Netapp site with the last steps they didn’t include which is to off and on “ssh2.enable” in order to reset the ssh2.

Setup SecureAdmin:

  1. Configure SecureAdmin to enable SSH2 to only accept defaults when it comes to selecting key size.
    Example:

    filer> secureadmin setup ssh

    SSH Setup
    ---------
    Determining if SSH Setup has already been done before...no

    SSH server supports both ssh1.x and ssh2.0 protocols.

    SSH server needs two RSA keys to support ssh1.x protocol. The host key is generated and saved to file /etc/sshd/ssh_host_key during setup. The server key is re-generated every hour when SSH server is running.

    SSH server needs a RSA host key and a DSA host key to support ssh2.0 protocol. The host keys are generated and saved to /etc/sshd/ssh_host_rsa_key and /etc/sshd/ssh_host_dsa_key files respectively during setup.

    SSH Setup prompts for the sizes of the host and server keys.
    For ssh1.0 protocol, key sizes must be between 384 and 2048 bits.
    For ssh2.0 protocol, key sizes must be between 768 and 2048 bits.
    The size of the host and server keys must differ by at least 128 bits.

    Please enter the size of host key for ssh1.x protocol [768] :
    Please enter the size of server key for ssh1.x protocol [512] :
    Please enter the size of host keys for ssh2.0 protocol [768] :

    You have specified these parameters:
    host key size = 768 bits
    server key size = 512 bits
    host key size for ssh2.0 protocol = 768 bits
    Is this correct? [yes]

  2. Setup will now generate the host keys in the background. This could take a few minutes to complete. After the setup is complete, start the SSH server using the ‘secureadmin enable ssh‘ command. A syslog message is generated when the setup is complete.
    filer> Wed Oct 25 05:59:56 GMT [rc:info]: SSH Setup: SSH Setup is done. Host keys are stored in /etc/sshd/ssh_host_key, /etc/sshd/ssh_host_rsa_key and /etc/sshd/ssh_host_dsa_key.

 

Linux:

  1. Configure and enable SSH on the Storage Controller as outlined in the Windows section above, steps 1 through 3.
  2. Test SSH access from the Linux client:
    linux> ssh root@filer ?
  3. From the Linux client, Generate the public/private key pair:
    linux> ssh-keygen -t rsa
  4. When asked for a ‘passpharse’, do not enter one.  Just press Enter twice.
  5. Mount the Storage Controller’s root volume to a temporary path on the linux client:
    linux> mount filer:/vol/vol0 /mnt/filer
  6. Create a folder on the storage controllers root volume: /etc/sshd/<username>/.ssh
    linux> mkdir -p /mnt/filer/etc/sshd/<username>/.ssh
    — Note: An error may be generated if this path already exists.  This can be safely ignored.
  7. Append the contents of the id_rsa.pub file to the 'authorized_keys' file:
    linux> cat ~/.ssh/id_rsa.pub >> /mnt/filer/etc/sshd/<username>/.ssh/authorized_keys
  8. Set the correct permissions on the .ssh folder and authorized_keys file:
    linux> chmod 700 /mnt/filer/etc/sshd/<username>/.ssh
    linux> chmod 600 /mnt/filer/etc/sshd/<username>/.ssh/authorized_keys
  9. filer>options ssh2.enable off
  10. filer>options ssh2.enable on
  11. Test that SSH to the Storage Controller does not prompt for a password:
    linux> ssh <user>@filer
    filer>
  12. Unmount the Storage Controller’s root volume:
    linux> cd ~
    linux> umount /mnt/filer

Netapp smtape to external hard harddisk (workaround)

smtape is useful if you need to transfer huge volume over low bandwidth  network.  Let say i have a 7TB volumeA to transfer over to remote site , it is going to take forever to transfer.  smtape comes in as a solution, you can smtape to tapedrive and send the tape over to your remote site.

But what if your remote site does not have any tape library? I am going to show you the workaround smtape to volume(not tape drive) . smtape will create a single dump file and you can just copy it via CIFS/NFS to your external harddisk. Send it over to remote site, then attach the USB harddisk to one of Windows/Linux server, copy it into Netapp vis CIFS/NFS(temp volume) .

Steps
Source : VMware_ISO
Destination : test_restore
smtape temp volume : test_sm2t

Prerequisite : priv set diag

1. smtape backup /vol/VMware_ISO /vol/test_sm2t/dump/disk_file
2. vol restrict test_restore
3. smtape restore /vol/test_restore /vol/test_sm2t/dump/disk_file
4. snapmirror status

Snapmirror is on.
Source                                                      Destination                                           State          Lag        Status
snapshot_for_smtape.6a1045a6-1050-11e2-bc32-00a098186ab2.0  mynas01:test_restore                                 Snapmirrored   00:01:09   Idle
mynas01:VMware_ISO                                         snapmirror_tape_6a1045a6-1050-11e2-bc32-00a098186ab2  Source         00:01:09   Idle

5. snap list VMware_ISO

Volume VMware_ISO
working...
 
  %/used       %/total  date          name
----------  ----------  ------------  --------
  0% ( 0%)    0% ( 0%)  Oct 05 15:27  snapshot_for_smtape.6a1045a6-1050-11e2-bc32-00a098186ab2.0 (snapmirror)

6. snap list test_restore

Volume test_restore
working......
 
  %/used       %/total  date          name
----------  ----------  ------------  --------
  0% ( 0%)    0% ( 0%)  Oct 05 15:27  snapshot_for_smtape.6a1045a6-1050-11e2-bc32-00a098186ab2.0

7. snapmirror resync -S mynas01:VMware_ISO mynas01:test_restore

mynas01*&gt; snapmirror resync -S mynas01:VMware_ISO mynas01:test_restore
NOTE: Destination volume test_restore is already a replica.
NOTE: Resync will not need to revert the volume.
The resync base snapshot will be: snapshot_for_smtape.6a1045a6-1050-11e2-bc32-00a098186ab2.0
Are you sure you want to resync the volume? y
Fri Oct  5 15:30:04 MYT [mynas01: replication.dst.resync.success:notice]: SnapMirror resync of test_restore to mynas01:VMware_ISO was successful.
Transfer started.
Monitor progress with 'snapmirror status' or the snapmirror log.
 
mynas01*&gt; snapmirror status
Snapmirror is on.
Source                Destination                                           State          Lag        Status
mynas01:VMware_ISO   mynas01:test_restore                                 Snapmirrored   00:00:52   Idle
mynas01:VMware_ISO   snapmirror_tape_6a1045a6-1050-11e2-bc32-00a098186ab2  Source         00:03:41   Idle

8. snapmirror status -l mynas01:test_restore

Source:                 mynas01:VMware_ISO
Destination:            mynas01:test_restore
Status:                 Idle
Progress:               -
State:                  Snapmirrored
Lag:                    00:01:14
Mirror Timestamp:       Fri Oct  5 15:30:05 MYT 2012
Base Snapshot:          mynas01(1574419105)_test_restore.1
Current Transfer Type:  -
Current Transfer Error: -
Contents:               Replica
Last Transfer Type:     Resync
Last Transfer Size:     100 KB
Last Transfer Duration: -
Last Transfer From:     mynas01:VMware_ISO

9. snap list VMware_ISO

Volume VMware_ISO
working...
 
  %/used       %/total  date          name
----------  ----------  ------------  --------
  0% ( 0%)    0% ( 0%)  Oct 05 15:30  mynas01(1574419105)_test_restore.1 (snapmirror)
  0% ( 0%)    0% ( 0%)  Oct 05 15:27  snapshot_for_smtape.6a1045a6-1050-11e2-bc32-00a098186ab2.0 (snapmirror)

10. snap list test_restore

Volume test_restore
working...
 
  %/used       %/total  date          name
----------  ----------  ------------  --------
  0% ( 0%)    0% ( 0%)  Oct 05 15:30  mynas01(1574419105)_test_restore.1
  0% ( 0%)    0% ( 0%)  Oct 05 15:27  snapshot_for_smtape.6a1045a6-1050-11e2-bc32-00a098186ab2.0

 

© 2018 Thinkway

Theme by Anders NorénUp ↑