Difference between revisions of "Datera"

From Define Wiki
Jump to navigation Jump to search
m
m (Alternative SSH access.)
 
Line 105: Line 105:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
= Alternative SSH Access =
 +
 +
<syntaxhighlight>
 +
[root@localhost opt]# for ip in $(dcp -l | grep 'int IP:' | awk '{print $NF}') ; do ssh -p 2222 root@$ip 'nvmadm inventory agiga' | grep backup_count ; done           
 +
            "backup_count" : 1,
 +
            "backup_count" : 1,
 +
            "backup_count" : 1,
 +
[root@localhost opt]# for ip in $(dcp -l | grep 'int IP:' | awk '{print $NF}') ; do ssh -p 2222 root@$ip 'nvmadm inventory agiga' | grep backup_mode ; done           
 +
            "backup_mode" : 24,
 +
            "backup_mode" : 24,
 +
            "backup_mode" : 24,
 +
</syntaxhighlight>
  
 
= Disk Whitelisting =
 
= Disk Whitelisting =

Latest revision as of 16:07, 22 February 2017

Current Cluster Configuration

The OpenHPC headnode is lc (172.28.1.179)

Management network IPs: 10.10.10.[221-223]/24

Install from USB

From a USB installation, the mgt1/mgt2 and netA1/netA2 MACs might be reverse and simlinks must be corrected:

ls -l /var/lib/datera-net-pci-order/
lrwxrwxrwx 1 root root 5 Jan 25 09:49 00:02:c9:9f:7a:20 -> netA1
lrwxrwxrwx 1 root root 5 Jan 25 09:49 00:02:c9:9f:7a:21 -> netA2
lrwxrwxrwx 1 root root 4 Jan 25 09:49 00:25:90:fa:7b:0a -> mgt1
lrwxrwxrwx 1 root root 4 Jan 25 09:49 00:25:90:fa:7b:0b -> mgt2

SSH Access

ssh admin@10.10.10.221 # (Management network.) Default password "password". Initialized password "ADMIN" or "admin".

Use command "shell":

Local >> shell # Password: HodHeixGitt
reboot --all --wipe # wipe data and control data

Import Configuration

Configuration can be imported and a password is provided (recommended password for testing: "admin").

{
  "system": {
    "name": "ADMIN",
    "callhome_enabled": true,
    "http_proxy": {
      "enabled": false
    },
    "dns": {
      "search_domains": [],
      "servers": [
        "8.8.8.8"
      ]
    },
    "ntp_servers": [
      "0.uk.pool.ntp.org"
    ],
    "network": {
      "mapping": {
        "access_1": "netA1",
        "mgmt_1": "mgt1",
        "internal_1": "netA2"
      },
      "internal_network": {
        "network_paths": {
          "internal_1": {
            "netmask": 24,
            "mtu": 1500,
            "vlan": 0,
            "start_ip": "10.218.126.1",
            "range": 64
          }
        }
      },
      "access_vip": {
        "network_paths": {
          "access_1": {
            "netmask": 24,
            "mtu": 1500,
            "vlan": 0,
            "ip": "10.172.206.252"
          }
        }
      },
      "mgmt_vip": {
        "network_paths": {
          "mgmt_1": {
            "netmask": 24,
            "mtu": 1500,
            "vlan": 0,
            "ip": "10.10.10.252",
            "gateway": "10.10.10.1"
          }
        }
      }
    }
  },
  "access_network_ip_pools": {
    "default": {
      "network_paths": {
        "access_1": {
          "netmask": 24,
          "mtu": 1500,
          "vlan": 0,
          "start_ip": "10.172.206.1",
          "range": 64
        }
      }
    }
  },
  "version": "1.0"
}

Alternative SSH Access

[root@localhost opt]# for ip in $(dcp -l | grep 'int IP:' | awk '{print $NF}') ; do ssh -p 2222 root@$ip 'nvmadm inventory agiga' | grep backup_count ; done            
            "backup_count" : 1,
            "backup_count" : 1,
            "backup_count" : 1,
[root@localhost opt]# for ip in $(dcp -l | grep 'int IP:' | awk '{print $NF}') ; do ssh -p 2222 root@$ip 'nvmadm inventory agiga' | grep backup_mode ; done             
            "backup_mode" : 24,
            "backup_mode" : 24,
            "backup_mode" : 24,

Disk Whitelisting

The fix is a little involved and requires modifying the file: /usr/bin/datera_storage_info.py. Please back this file up just in case before you modify it :)


there is a section which has

<python> if system_vendor == SUPERMICRO or \

      DATERA in system_vendor or \
      "Dell Inc" in system_vendor:

</python>

it needs to be changed to:

<python> if (system_vendor == SUPERMICRO or \

      DATERA in system_vendor or \
      "Dell Inc" in system_vendor) and hasLsiController():

</python>


This will make sure that it does not try to apply the default profile for super micro unless it also sees the LSI controller. In order for that modification to work we also need to add the function to find the LSI controller. The below function should be added to the same file "/usr/bin/datera_storage_info.py” just above "def main():”. There should be two spaces before and after this new function you add.

<python> def hasLsiController():

   output = execute_command([LSPCI,
                             "-D"])
   if output[0] != 0:
       return False
   for line in output[1].splitlines():
       if 'LSI' in line and 'controller' in line:
           return True
   return False

</python>


Indentation is also important in python. To be 100% sure this works you can run the command by itself by executing '/usr/bin/datera_storage_info.py’ it should print out a bunch of information about the disks and not exit with error. If there is an error its probably indentation.

Please note, this needs to be done on each of the nodes, and for good measure I generally make the change on all the nodes in separate terminals, and then when its all done I quickly save them all, just to be sure they are all in sync and seeing the same thing at all times.


iSCSI

Once iscsiadm has been used, the iSCSI Qualified Name (IQN) can be found in /etc/iscsi/

When authentication is not enabled, it's easy to access provisioned storage, where the ip is taken from the Datera GUI:

iscsiadm -m discovery -t st -p ip:port

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-iscsi.html

Logging in:

iscsiadm --m node -T iqn.2007-06.com.test.cluster1:storage.cluster1 --portal 172.16.48.175:3260 -l

Disabling a target:

There are three ways to disable or delete an iSCSI target.

First, to disable an iSCSI target:

iscsiadm --m node -T iqn.2007-06.com.test.cluster1:storage.cluster1 --portal 172.16.48.175:3260 -u

Second, it is possible to delete the target's record ID:/p>

iscsiadm -m node -o delete -T iqn.2007-06.com.test.cluster1:storage.cluster1 --portal 172.16.48.175:3260

https://access.redhat.com/articles/9883

Formatting

[root@head ~]# time mkfs.xfs /dev/device
specified blocksize 4096 is less than device physical sector size 1048576
switching to logical sector size 512
meta-data=/dev/device             isize=256    agcount=4, agsize=67108864 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0
data     =                       bsize=4096   blocks=268435456, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal log           bsize=4096   blocks=131072, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

real    0m14.929s
user    0m0.000s
sys     0m0.228s

References

http://linux-iscsi.org/wiki/Main_Page