10 July 2020

Brocade config - CLI


Below are basic commands for Brocade SAN switches to name ports, create aliases, configure zone, add zone to configuration, enable and save configuration.
In below example SAN is connected to port 0 and 1, ESX host is connectred to port 2

Run switchshow to check wwn on active ports


brocade-01:admin> switchshow

switchName:     brocade-01

switchType:     170.0

switchState:    Online   

switchMode:     Native

switchRole:     Principal

switchDomain:   5

switchId:       fffc05

switchWwn:      10:00:85:36:46:ea:d4:b4

zoning:         ON (default)

switchBeacon:   OFF

HIF Mode:       OFF


Index Port Address  Media Speed   State       Proto

==================================================

   0   0   050000   id    16G     Online      FC  F-Port  50:0a:09:80:0e:13:be:80 

   1   1   050100   id    16G     Online      FC  F-Port  10:00:00:10:9b:87:45:f4 

   2   2   050200   id    16G     Online      FC  F-Port  10:00:00:10:9b:87:45:f4 

   3   3   050300   id    16G     No_Light    FC  

   4   4   050400   id    16G     No_Light    FC 

   5   5   050500   id    16G     No_Light    FC  

   6   6   050600   id    16G     No_Light    FC 

   7   7   050700   id    16G     No_Light    FC  

   8   8   050800   id    16G     No_Light    FC 

   9   9   050900   id    16G     No_Light    FC 

  10  10   050a00   id    16G     No_Light    FC 

  11  11   050b00   id    16G     No_Light    FC  

  12  12   050c00   id    16G     No_Light    FC  

  13  13   050d00   id    16G     No_Light    FC 

  14  14   050e00   id    16G     No_Light    FC  

  15  15   050f00    id    16G     No_Light    FC 

  16  16   051000   id    16G     No_Module    FC 

  17  17   051100   id    16G     No_Module    FC 

  18  18   051200   id    16G     No_Module    FC 

  19  19   051300   id    16G     No_Module    FC 

  20  20   051400   id    16G     No_Module    FC

  21  21   051500   id    16G     No_Module    FC  

  22  22   051600   id    16G     No_Module    FC  

  23  23   051700   id    16G     No_Module    FC 



Run below commands to change name of the ports 0-2


portname 0 -n "SAN_SPA_FC4"

portname 1 -n "SAN_SPB_FC4"

portname 2 -n "ESX_01_HBA"


Run portname to check if port names has been applied corerctly


brocade-01:admin> portname

port  0: SAN_SPA_FC4

port  1: SAN_SPB_FC4

port  2: ESX_01_HBA

port  3: port3

port  4: port4

port  5: port5

port  6: port6

port  7: port7

port  8: port8

port  9: port9

port 10: port10

port 11: port11

port 12: port12

port 13: port13

port 14: port14

port 15: port15

port 16: port16

port 17: port17

port 18: port18

port 19: port19

port 20: port20

port 21: port21

port 22: port22

port 23: port23



Run below commands to create alias for SAN front end ports connected to switch port 0 & 1


alicreate "SAN_FE","21:00:00:34:00:3c:c2:01"

aliadd "SAN_FE", "21:00:00:34:00:3c:c2:02"


Run alishow "SAN_FE" to check if alias for SAN front end ports has been crfeated correctly


brocade-01:admin> alishow SAN_FE

 alias: SAN_FE

                21:00:00:34:00:3c:c2:01

                21:00:00:34:00:3c:c2:02



Run below commands to create zone to allow traffice between SAN and ESX_01, as you can see you can use wwn and/ or alias


zonecreate "ESX_01_to_SAN_FE", "21:00:00:24:ff:3c:c2:39" 

zoneadd "ESX_01_to_SAN_FE", "SAN_FE" 


Run zoneshow "ESX_01_to_SAN_FE" to check if zone has been created correctly


brocade-01:admin> zoneshow ESX_01_to_SAN_FE

 zone:  ESX_01_to_SAN_FE

                21:00:00:24:ff:3c:c2:39SAN_FE



Run switchshow to check your active configuration, on our switch it is "default"


brocade-01:admin> switchshow

switchName:     brocade-01

switchType:     170.0

switchState:    Online   

switchMode:     Native

switchRole:     Principal

switchDomain:   5

switchId:       fffc05

switchWwn:      10:00:85:36:46:ea:d4:b4

zoning:         ON (default)

switchBeacon:   OFF

HIF Mode:       OFF


Index Port Address  Media Speed   State       Proto

==================================================

   0   0   050000   id    16G     Online      FC  F-Port  50:0a:09:80:0e:13:be:80 

   1   1   050100   id    16G     Online      FC  F-Port  10:00:00:10:9b:87:45:f4 

   2   2   050200   id    16G     Online      FC  F-Port  10:00:00:10:9b:87:45:f4 

   3   3   050300   id    16G     No_Light    FC  

   4   4   050400   id    16G     No_Light    FC 

   5   5   050500   id    16G     No_Light    FC  

   6   6   050600   id    16G     No_Light    FC 

   7   7   050700   id    16G     No_Light    FC  

   8   8   050800   id    16G     No_Light    FC 

   9   9   050900   id    16G     No_Light    FC 

  10  10   050a00   id    16G     No_Light    FC 

  11  11   050b00   id    16G     No_Light    FC  

  12  12   050c00   id    16G     No_Light    FC  

  13  13   050d00   id    16G     No_Light    FC 

  14  14   050e00   id    16G     No_Light    FC  

  15  15   050f00    id    16G     No_Light    FC 

  16  16   051000   id    16G     No_Module    FC 

  17  17   051100   id    16G     No_Module    FC 

  18  18   051200   id    16G     No_Module    FC 

  19  19   051300   id    16G     No_Module    FC 

  20  20   051400   id    16G     No_Module    FC

  21  21   051500   id    16G     No_Module    FC  

  22  22   051600   id    16G     No_Module    FC  

  23  23   051700   id    16G     No_Module    FC 



Run below command to add "ESX_01_to_SAN_FE" zone to "default" configuration


cfgadd "default", "ESX_01_to_SAN_FE" 


Run below command to check if "ESX_01_to_SAN_FE zone has been succesfuly added to "default" configuration


cfgshow default 


Run below command to enable new "default" configuration

 

cfgenable default 


You should run below command to save switch configuration - only on Brocade switches with old FOS


cfgsave


08 July 2020

PowerCLI on Linux

I've decided to create Linux VM with PowerCLI on it to make my VMware scripting easier and portable.
Below is few easy steps to complete the task:

1. Create VM (private or public cloud)/ physical server and install Linux distribution of your choice, I've installed CentOS 8 

2. Install PowerShell on your Linux server

You can download PowerShell and find installation instructions here:

On CentOS 8 you have to download appropriate rpm and then install it with below command:

[virtworld@centos8 ~]$ sudo dnf install powershell-lts-7.0.2-1.centos.8.x86_64.rpm -y

3. On your linux server go to PowerShell prompt by typing "pwsh" command and install PowerCLI as below:

PS /home/virtworld> Find-Module -Name VMware.PowerCLI
PS /home/virtworld> Install-Module -Name VMware.PowerCLI

4. (Optional) For your home lab you may want to disable SSL cert verification to be able to connect to your vCenter Server (as by default uses self-signed cert)

PS /home/virtworld> Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false

Happy scripting

12 May 2020

DellEMC Data Doamin - Storage enclosure numbering is not sequential

You may experience not sequential enclosure numbering when some of them are removed/ disconnected from the system. Way to resolve it is to release enclosure persistent id and restart the system.


sysadmin@dd-01# enclosure show summary

Enclosure   Model No.   Serial No.       State     OEM Name   OEM Value   Capacity

---------   ---------   --------------   -------   --------   ---------   --------

1           DD990       0F00000001       Online                           4 Slots

2           ES30        CKM00000000001   Online                           15 Slots

3           ES30        CKM00000000002   Online                           15 Slots

4           ES30        CKM00000000003   Offline                          15 Slots

5           ES30        CKM00000000004   Online                           15 Slots

6           ES30        CKM00000000005   Offline                          15 Slots

7           ES30        CKM00000000006   Online                           15 Slots

8           ES30        CKM00000000007   Offline                          15 Slots

9           ES30        CKM00000000008   Offline                          15 Slots

10          ES30        CKM00000000009   Offline                          15 Slots

11          ES30        CKM00000000010   Offline                          15 Slots

12          ES30        CKM00000000011   Offline                          15 Slots

---------   ---------   --------------   -------   --------   ---------   --------

12 enclosures present.


sysadmin@dd-01# enclosure release persistent-id all


sysadmin@dd-01# system reboot

 

The 'system reboot' command reboots the system. File access is

interrupted during the reboot.

        Are you sure? (yes|no) [no]: yes

 

ok, proceeding.

 

The system is going down for reboot.

 

Broadcast message from root (Mon Apr 27 14:05:01 2020):

 

The system is going down for reboot NOW!


 

sysadmin@dd-01# enclosure show summary

Enclosure   Model No.   Serial No.       State    OEM Name   OEM Value   Capacity

---------   ---------   --------------   ------   --------   ---------   --------

1           DD990       0F00000001       Online                          4 Slots

2           ES30        CKM00000000001   Online                          15 Slots

3           ES30        CKM00000000002   Online                          15 Slots

4           ES30        CKM00000000004   Online                          15 Slots

5           ES30        CKM00000000006   Online                          15 Slots

---------   ---------   --------------   ------   --------   ---------   --------

5 enclosures present.


DellEMC Data Domain - Resolve Disk State "Unknown"


Unknown disk are most likely just introduced to the system, you have to unfail them to make them available and then assign to appropriate tier.

sysadmin@dd-01# disk show state
Enclosure   Disk
             1  2  3  4  5  6  7  8  9  10 11 12 13 14 15
---------   ----------------------------------------------
1            .  .  .  s
2            v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
3            v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
4            v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
5            v  v  v  v  v  v  v  v  v  v  v  v  v  U  v
---------   ----------------------------------------------

Legend   State             Count
------   ---------------   -----
.        In Use Disks      3
s        Spare Disks       1
v        Available Disks   59
U        Unknown Disks     1
------   ---------------   -----
Total 64 disks

sysadmin@dd-01# disk unfail 5.14

The 'disk unfail' command will add the disk to the active storage tier
and mark it available. Any existing data on this disk will be lost.
        Are you sure? (yes|no) [no]: yes

ok, proceeding.

sysadmin@dd-01# disk show state
Enclosure   Disk
             1  2  3  4  5  6  7  8  9  10 11 12 13 14 15
---------   ----------------------------------------------
1            .  .  .  s
2            v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
3            v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
4            v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
5            v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
---------   ----------------------------------------------

Legend   State             Count
------   ---------------   -----
.        In Use Disks      3
s        Spare Disks       1
v        Available Disks   60
------   ---------------   -----
Total 64 disks

DellEMC Data Domain - Resolve Disk State "Known"

Disk in "Known" state means that disk is part of filesystem but not all disks which create the filesystem are online.

sysadmin@dd-01# disk show state
Enclosure   Disk
             1  2  3  4  5  6  7  8  9  10 11 12 13 14 15
---------   ----------------------------------------------
1            .  .  .  s
2            K  K  K  K  K  K  K  K  v  K  K  K  K  K  K
3            K  K  K  K  K  K  K  K  K  K  K  K  K  K  v
4            K  K  K  K  K  K  K  K  K  K  K  K  K  K  v
5            K  K  K  K  K  K  K  K  K  K  K  K  K  K  v
---------   ----------------------------------------------

Legend   State             Count
------   ---------------   -----
.        In Use Disks      3
s        Spare Disks       1
v        Available Disks   4
K        Known Disks       56
------   ---------------   -----
Total 64 disks

In Known state you cannot fail/ unfail the disk

sysadmin@dd-01# disk fail 2.1

 

**** Disk 2.1 is not in a valid state: can neither fail nor unfail.


I have not found any procedure to resolve this issue while some disks/ enclosures are missed from filesystem.
In my situation I have to power on all disks shelves, this allowed me to destroy filesyetem.

sysadmin@dd-01# filesys status
The filesystem is disabled and shutdown.

sysadmin@dd-01# filesys destroy
The "filesys destroy" command irrevocably destroys all data in
all the MTrees, including all virtual tapes, archive units and replication contexts.
The 'filesys destroy' operation will take about 10-11 minutes.
File access is disabled during this process.
        Are you sure? (yes|no) [no]: yes

ok, proceeding.

Please enter sysadmin password to confirm 'filesys destroy':

The filesystem is already disabled.
Destroying the filesystem.

The filesystem has been destroyed.

sysadmin@dd-01# filesys status
The filesystem doesn't exist.

Then all disk changed status to "Available". 

sysadmin@dd-01# disk show state
Enclosure   Disk
             1  2  3  4  5  6  7  8  9  10 11 12 13 14 15
---------   ----------------------------------------------
1            .  .  .  s
2            v  v  v  v  v  v  v  v  v  v  v  v  v  v  s
3            v  v  v  v  v  v  v  v  v  v  v  v  v  v  s
4            v  v  v  v  v  v  v  v  v  v  v  v  v  v  s
5            v  v  v  v  v  v  v  v  v  v  v  v  v  s  v
6            v  v  v  v  v  v  v  v  v  v  v  v  v  v  s
7            v  v  v  v  v  v  v  v  v  v  v  v  v  v  s
8            v  v  v  v  v  v  v  v  v  v  v  v  v  v  s
9            v  v  v  v  v  v  v  v  v  v  v  v  s  v  v
10           v  v  v  v  v  v  v  v  v  v  v  v  v  v  s
11           v  v  v  v  v  v  v  v  v  v  v  v  v  v  s
12           v  v  v  v  v  v  v  v  v  v  v  v  v  v  s
---------   ----------------------------------------------

Legend   State             Count
------   ---------------   -----
.        In Use Disks      3
s        Spare Disks       12
v        Available Disks   154
------   ---------------   -----
Total 169 disks


At this point I was able to remove unwanted disk shelves and create new, smaller filesystem.

sysadmin@dd-01# disk show state
Enclosure   Disk
             1  2  3  4  5  6  7  8  9  10 11 12 13 14 15
---------   ----------------------------------------------
1            .  .  .  s
2            v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
3            v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
4            v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
5            v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
---------   ----------------------------------------------

Legend   State             Count
------   ---------------   -----
.        In Use Disks      3
s        Spare Disks       1
v        Available Disks   60
------   ---------------   -----
Total 64 disks


sysadmin@dd-01# filesys create
A filesystem of approximate size 129.97 TiB will be created.
        Do you want to continue? (yes|no) [yes]: yes

ok, continuing.

This will take 5 - 10 minutes.

Provisioning storage...
########################################### [100%]

Initializing filesystem...
########################################### [100%]

snapshot schedules deleted

You now have a freshly initialized filesystem.
 Enable the filesystem using 'filesys enable'.

sysadmin@dd-01# filesys enable
Please wait.....................
The filesystem is now enabled.

sysadmin@dd-01# filesys show space

Active Tier:
Resource           Size GiB   Used GiB   Avail GiB   Use%   Cleanable GiB
----------------   --------   --------   ---------   ----   -------------
/data: pre-comp           -        0.0           -      -               -
/data: post-comp   129175.9        0.0    129175.9     0%             0.0
/ddvar                308.1       20.3       272.1     7%               -
----------------   --------   --------   ---------   ----   -------------

DellEMC Data Domain - Disk state


 Disk StateDescription Action
 In Use
 The number of disks currently in use by the file system. No Action required
 Spare The number of spare disks (available to replace failed disks). No Action required
 Spare (reconstructing)  The number of disks that are in the process of data reconstruction (spare disks replacing failed disks). No Action required
 Available The number of disks that are available for allocation to an Active or DD Extended Retention storage tier.  
 Known The number of known unallocated disks. Resolve Disk State "Known"
 Unknown The number of unknown unallocated disks. Resolve Disk State "Unknown"
 Failed The number of failed disks. 
 Foreign The number of foreign disks. 
 Absent The number of absent disks. 
 Migrating The number of disks serving as the source of a storage migration. 
 Destination The number of disks serving as the destination of a storage migration. 
 Not Installed The number of empty disk slots that the system can detect. 

Popular