Wednesday, 5 October 2016

How to exclude a folder from WordPress permalinks?

The default WordPress rewrite rules for permalinks might not work in some cases. For example, when you have other settings defined in .htaccess files located in subfolders, or when you have other content in your website created in subfolders, or specific scripts or apps (not integrated with Wordpress) in subfolders.
To exclude ALL the subfolders from the WordPress rewrite rules, you need to edit the .htaccess file and change the bold line below:
# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
to
RewriteRule ./ /index.php [L]
Basically, you are just adding a forward slash (/)
Your .htaccess file might look different, but with this guide you'll be on-track to apply the fix required in your own case.

Tuesday, 18 August 2015

Convert from EMC naa. in VMware VSphere to Device ID

This is a short how-to on converting the VMware VSphere device wwn (naa. number) to an EMC device ID.
Of course in real life one can always get this by using the symmetrix command line

symdev -sid 1234 list -all -wwn | grep wwn
If it is only few devices you want to work with, you can just copy and paste the naa number from Vsphere Client, where the number (naa) is a bit longer, as it contains additional information. e.g. 
vml.02000800006000097000019570421253303030424253594d4d4554


Convert from naa. to Dev id:
Take the last 8 digits of the naa number
e.g. for naa.60000970000292601174533030334435, numbers after 53 are 3030334435.
This will usually start with a 30.
Break it apart in pairs of two.
So 3030334435 becomes 30 30 33 44 35. The first "30" is discarded, so we'll take only 30 33 44 35
The Dev ID equivalence for the resultant pair of numbers is as follows:
30 = 0
31 = 1
32 = 2
33 = 3

34 = 4
35 = 5
36 = 6
37 = 7
38 = 8
39 = 9
40 = **** DOES NOT EXIST ****
41 = A
42 = B
43 = C

44 = D
45 = E
46 = F
…. Follows in that order

Just write that out and you’ll obtain the dev id.
So in the example, 30334435 becomes
30 = 0
33 = 3
44 = D
35 = 5
thus the EMC device ID for 30334435 is 03D5


Friday, 14 August 2015

VSphere LUN naa identifier decoded and explained

In VMware VSphere, the identifier comes in the form of naa.aaaaaaaabbbbbbbbbbbbccccdddddddd
I’ve been able to find this information from multiple sources, so I think it is very accurate. Your comments are welcome if it doesn't match your case.

The breakdown is as follows:
  • aaaaaaaa is an 8 digit vendor identifier, and I’ve listed the vendors we use below, as well as others I’ve been able to find online:
o    60060480 <— EMC
o    60060e80 <— HDS
o    60a98000 <— NetApp
o    60060160 <— DGC (Clariion)
o    6090a038 <— EQL
I found that in certain cases, you can also do a lookup of the vendor. To do that drop the leading ‘6’ and then take digits 2 to 8 and enter them into an OUI lookup tool http://www.wireshark.org/tools/oui-lookup.html . e.g. entering 0060480 to an OUI lookup confirms the vendor is EMC.
  • bbbbbbbbbbbb is a 12 digit serial # of the device providing the storage.  This may differ from device to device, but matches up perfectly to the id’s of our EMC storage.
  • cccc is a 4 digit code for model (at least for EMC). Please double check with your storage system.
-               on VMAX it’s ‘5330’ on all luns
-               on DMX-3 it’s also ‘5330’
-               on DMX-3000 it’s ‘4E45′

  • dddddddd is an 8 digit LUN identifier.  This differs based on the device on how the device ID is actually represented. I will explain how to decode this number for EMC in a future post.

Thursday, 13 August 2015

How to identify NetApp LUN ID in VMware VSphere?

When using Netapp as your SAN storage, the TL / DR (Target Lun / Device Representation), also known as the VMware LUN identifier, is the hex representation of the NetApp LUN Serial No. string. It is as easy as it sounds:
1.       In vSphere, select the host configuration tab, storage.
2.       Select the Devices View   
3.       Sort by LUN # and locate the LUN you want to verify.
4.       Right click the LUN in the Devices list and select "Copy identifier to clipboard", i.e., naa.600a09803830336d785d476d634c424d
5.       Paste the characters after “naa.” into a Hex to String converter. (i.e., 600a09803830336d785d476d634c424d)
6.       Copy the converted string and paste to a work note. It may contain some special characters, so just concentrate on the readable portion. i.e., 803mx]GmcLBM
7.       In the NetApp System manager, select the LUN you want to verify in the LUN list.
8.       In the LUN properties pane, copy the Serial No. i.e.,  803mx]GmcLBM
9.       Paste Serial No. below the converted hex in the work note and compare.  There may be some odd ASCII characters at the beginning of the converted hex that you can ignore.
Note an alternate method to get the NetApp LUN Serial No. value in the CLI, use the command:

lun show -v

Wednesday, 12 August 2015

Log file locations in NetApp Data ONTAP (7-mode)

The following list outlines the various log files and their locations used by Data ONTAP (7 mode). In addition, ONTAP also uses syslogd daemon to log system messages (and uses the config file /etc/syslog.conf)

You can see the content of those files using the “rdfile” command, e.g., rdfile /etc/log/messages

Messages:
/etc/log/messages (symbolic link to /etc/messages)
 
SnapMirror:
/etc/log/snapmirror
 
FlexClone:
/etc/log/clone
 
Auditlog:
/etc/log/auditlog
 
Deduplication:
/etc/log/sis
 
LACP:
/etc/log/lacp_log
 
Backup:
/etc/log/backup and /etc/log/ndmpdlog
 
FTP:
/etc/log/ftp.cmd and /etc/log/ftp.xfer
 
Shelf Messages:
/etc/log/shelflog/shelflog_ata and /etc/log/shelflog_esh
 
Volume Operations:
/etc/log/vol_history
 
Crash Files:
/etc/log/crash/aggregates//
 
Performance Archives:
/etc/log/stats/archives
 
ACP:
/etc/log/acp/acplog_master and /etc/log/acplog


Hope it helps!