Change files back to 644 and folders back to 755 with chmod

If you want to get rid of the nasty 777 on all files/folders see:

find /path/to/base/dir -type d -print0 | xargs -0 chmod 755
find /path/to/base/dir -type f -print0 | xargs -0 chmod 644

Posted in CentOS, Linux | Tagged , , , | Leave a comment

HP Prolient disk tool hpacucli (cheat sheet)


Utility Keyword abbreviations
Abbreviations chassisname = ch
controller = ctrl
logicaldrive = ld
physicaldrive = pd
drivewritecache = dwc
hpacucli utility
hpacucli # hpacucli

# hpacucli help

Note: you can use the hpacucli command in a script

Controller Commands
Display (detailed) hpacucli> ctrl all show config
hpacucli> ctrl all show config detail
Status hpacucli> ctrl all show status
Cache hpacucli> ctrl slot=0 modify dwc=disable
hpacucli> ctrl slot=0 modify dwc=enable
Rescan hpacucli> rescan

Note: detects newly added devices since the last rescan

Physical Drive Commands
Display (detailed) hpacucli> ctrl slot=0 pd all show
hpacucli> ctrl slot=0 pd 2:3 show detail

Note: you can obtain the slot number by displaying the controller configuration (see above)

Status

hpacucli> ctrl slot=0 pd all show status
hpacucli> ctrl slot=0 pd 2:3 show status

Erase hpacucli> ctrl slot=0 pd 2:3 modify erase
Blink disk LED hpacucli> ctrl slot=0 pd 2:3 modify led=on
hpacucli> ctrl slot=0 pd 2:3 modify led=off
Logical Drive Commands
Display (detailed) hpacucli> ctrl slot=0 ld all show [detail]
hpacucli> ctrl slot=0 ld 4 show [detail]
Status hpacucli> ctrl slot=0 ld all show status
hpacucli> ctrl slot=0 ld 4 show status
Blink disk LED hpacucli> ctrl slot=0 ld 4 modify led=on
hpacucli> ctrl slot=0 ld 4 modify led=off
re-enabling failed drive hpacucli> ctrl slot=0 ld 4 modify reenable forced
Create # logical drive – one disk
hpacucli> ctrl slot=0 create type=ld drives=1:12 raid=0

# logical drive – mirrored
hpacucli> ctrl slot=0 create type=ld drives=1:13,1:14 size=300 raid=1

# logical drive – raid 5
hpacucli> ctrl slot=0 create type=ld drives=1:13,1:14,1:15,1:16,1:17 raid=5

Note:

drives – specific drives, all drives or unassigned drives
size – size of the logical drive in MB
raid – type of raid 0, 1 , 1+0 and 5

Remove hpacucli> ctrl slot=0 ld 4 delete
Expanding hpacucli> ctrl slot=0 ld 4 add drives=2:3
Extending hpacucli> ctrl slot=0 ld 4 modify size=500 forced
Spare hpacucli> ctrl slot=0 array all add spares=1:5,1:7
Posted in HP Proliant, Linux | Tagged , , | Leave a comment

remove files older than X days

find example to remove files older than 5 days:

find /path/to/files* -mtime +5 -type f -exec rm {} \;

Note that this command will not work when it finds too many files. It will yield an error like:

bash: /usr/bin/find: Argument list too long

Use this:

find /path/to/files* -mtime +5 -type f | xargs rm

Posted in CentOS, Linux | Tagged , , , | Leave a comment

/opt/dell/srvadmin/sbin/omcliproxy: error while loading shared libraries: libdsupt.so.1

After restoring DellOpenmanage from backup i got the following error:

/opt/dell/srvadmin/sbin/omcliproxy: error while loading shared libraries: libdsupt.so.1: cannot open shared object file: No such file or directory

The files (and symlinks) are located in:

/usr/local/opt/dell/srvadmin/lib64/libdsupt.so
/usr/local/opt/dell/srvadmin/lib64/libdsupt.so.1
/usr/local/opt/dell/srvadmin/lib64/libdsupt.so.1.100.147

I didn’t reboot my machine, so to get this working i had to make sure the ldconfigs where included in:
cat /etc/ld.so.conf
include ld.so.conf.d/*.conf

After this i just ran an ldconfig
ldconfig

And all worked again:

Health

Main System Chassis

SEVERITY : COMPONENT
Ok : Fans
Ok : Intrusion
Ok : Memory
Ok : Power Supplies
Ok : Power Management
Ok : Processors
Ok : Temperatures
Ok : Voltages
Ok : Hardware Log
Ok : Batteries

For further help, type the command followed by -?

Posted in CentOS, Dell, Hardware | Tagged , , , , | Leave a comment

Dell Openmanage SNMP No Such Object

After upgrading your openmanage you could get a No Such Object in your monitoring.

snmpget -v2c -c public localhost .1.3.6.1.4.1.674.10892.1
SNMPv2-SMI::enterprises.674.10892.1 = No Such Object available on this agent at this OID

To fix this issue:
sed -r -i 's/^(SNMP)=disable$/\1=enable/' /opt/dell/srvadmin/etc/srvadmin-omilcore/install.ini

Remove this file:
rm /opt/dell/srvadmin/var/lib/srvadmin-deng/dcsnmp.off

Restart Dell Openmanage:
srvadmin-services.sh restart

Restart SNMP:
service snmpd restart

Posted in CentOS, Dell, SNMP | Tagged , , , , | Leave a comment

Creating a custom SNMP oid for a bash script

I would like to know how many files are in a certain directory, so i create a little one liner that counts them:
In my case i want to know the files on my replicated slave of postgres.
I make a directory in my snmp folder which is located in:/etc/snmp
mkdir /etc/snmp/scripts

Create a script you want:
vi /etc/snmp/scripts/postgresfiles.sh

Dont forget the #!/bin/bash or you will get a “Exec format error” this also happends if you enter a “new-line/blank” above your script
#!/bin/bash
ls -al /database/postgres/pgsql/data/pg_xlog | grep -c ^-

Also make your script executable:
chmod +x /etc/snmp/scripts/postgresfiles.sh

In my case my script returns the value 10.
sh /etc/snmp/scripts/postgresfiles.sh

After this we edit the snmpd.conf
vi /etc/snmp/snmpd.conf

Add an extend after your disk/main config this looks something like:
syslocation yourlocation
syscontact yourcontact

disk / 10000
disk /var 10000
disk /usr 10000
disk /tmp 10000
disk /home 10000
disk /boot 10000
disk /database 10000
disk /database.san 10000

load 12 14 14

#PostgreSQL Monitoring
extend postgresfiles /etc/snmp/scripts/postgresfiles.sh

Next we restart SNMP
/etc/init.d/snmpd restart

Now we should have a custom extended oid which we could walk/get:
snmpget -v2c -c public localhost 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."postgresfiles".1'

This should return something like:
NET-SNMP-EXTEND-MIB::nsExtendOutLine."postgresfiles".1 = STRING: 10

Now we want to know what kind of OID belongs to this line, so we run the following:
snmptranslate -On 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."postgresfiles".1'

In my case this returns the following oid:
1.3.6.1.4.1.8072.1.3.2.4.1.2.13.112.111.115.116.103.114.101.115.102.105.108.101.115.1

Now you can use this custom oid to make a graph in cacti or use it to monitor your server on custom scripts/oids

Posted in CentOS, SNMP | Tagged , , , , , , | Leave a comment

Helo command rejected: need fully-qualified hostname when sending emails (504)

Simple tip this afternoon. You may have got the following error when sending emails through ASP.Net’s built in mail server before:

From: postmaster@YourWebserversName [mailto:postmaster@YourWebserversName]
Sent: 29 June 2012 15:50
To: sender@sendingdomainname.com
Subject: Delivery Status Notification (Failure)

This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

recipient@recievingdomainname.com

Reporting-MTA: dns;YourWebserversName
Received-From-MTA: dns;YourWebserversName
Arrival-Date: Fri, 29 Jun 2012 15:50:30 +0100

Final-Recipient: rfc822;recipient@recievingdomainname.com
Action: failed
Status: 5.5.0
Diagnostic-Code: smtp;504 <YourWebserversName>: Helo command rejected: need fully-qualified hostname

The fix is easy:

  1. Open IIS
  2. View the properties of you Default SMTP Virtual Server
  3. Go to the “Delivery” tab
  4. Click the “Advanced” button (in the bottom right corner)
  5. Under “Fully-qualified domain name” enter a domain name that points to the server
  6. Click Ok until you’re back to IIS
Posted in Windows | Tagged , , , , | Leave a comment

Could not parse output, bad xml for package: dell_dup_componentid_00159

We sometimes see problems updating our Dell machines to the latest firmware, ie. update_firmware --yes fails:

Running updates...
-	Installing dell_dup_componentid_00159 - 1.11.0Installation failed for
package: dell_dup_componentid_00159 - 1.11.0
aborting update...

The error message from the low-level command was:

Could not parse output, bad xml for package: dell_dup_componentid_00159

Dell have been unable to tell me why this is, or provide a fix or workaround.

Here’s what I did to get the firmware installed:

Note: that 1.11.0 is the version and could be different from the version you want to install.

Identify the component for which the update is being installed. In this case that is dell_dup_componentid_00159.

Find the update for that component under /usr/share/firmware/dell:

# find /usr/share/firmware/dell -name "dell_dup_componentid_00159*"

Output example:

# /usr/share/firmware/dell/dup/system_ven_0x1028_dev_0x028c/dell_dup_componentid_00159_version_1.11.0

Install the update:

# cd /usr/share/firmware/dell/dup/system_ven_0x1028_dev_0x028c/dell_dup_componentid_00159_version_1.11.0
# dellBiosUpdate -f PER410-010407.hdr -u

Output after install:

Performing BIOS update...
Update successfully staged. Reboot the system to begin BIOS update.
No reboot option specified. The --reboot option is highly recommended.

As this is a system BIOS update, it is necessary to reboot for the update to be finalised. Without the –reboot option (from the output above) you can choose yourself when to reboot your system.

# reboot

Posted in CentOS, Dell, Hardware | Tagged , , , , , , | Leave a comment

‘No network adapters were detected’ error message while installing ESXi on Dell PowerEdge 12th Generation Servers

Installation of ESXi 5.0

While installing ESXi 5.0 (making use of VMware native Image), you might observe ‘No network adapters were detected’ error message.

The reason for this is because the VMware native ESXi 5.0 image does not contain the required version(s) of network drivers for Network Daughter Cards (NDC) or Network adapters used in Dell 12G Servers.

You need to make use of the Dell Customized ESXi 5.0 Image posted at support.dell.com, which contains the required network drivers for all NDC’s and Network adapters used in Dell 12G Servers.

NOTE: Follow the steps listed in Downloading Dell Customized ESXi image for downloading Dell Customized Installer Image

Installation of ESXi 4.1 Update 2 Installable Edition

While installing ESXi 4.1 Update 2 Installable edition (making use of VMware native Image), you might observe ‘Unable to load module /usr/lib/vmware/vmkmod.vmfs3: Failure’ error message.

The reason for this is because the VMware native ESXi 4.1 Update 2 Installable image does not contain the required version(s) of network drivers for Network Daughter Cards or Network adapters used in Dell 12G Servers. As the required network drivers are not available, VMkernel fails to enumerate network devices present in the system. ‘vmfs3’ module fails to load as it cannot detect a valid network device in the system.

You need to make use of the Dell Customized ESXi 4.1 Update 2 Installable Image posted at support.dell.com, which contains the required network drivers for all NDC’s and Network adapters used in Dell 12G Servers.

NOTE: Follow the steps listed in Downloading Dell Customized ESXi image for downloading Dell Customized Installable Image

Installation of ESXi 4.1 Update 2 Embedded Edition

After Installing ESXi 4.1 Update 2 Embedded edition (making use of VMware native Image), you might observe ‘No compatible network adapter found’ error on the first boot.

You need to make use of the Dell Customized ESXi 4.1 Update 2 Embedded Image posted at support.dell.com, which contains the network drivers for all NDC’s and Network adapters used in Dell 12G Servers.

NOTE: Follow the steps listed in Downloading Dell Customized ESXi image for downloading Dell Customized Embedded Image

NOTE: There is NO recommended method to update the drivers manually, as there is no Network access to the system.

Downloading Dell Customized ESXi image

You can download the Dell-customized ESXi installer image from support.dell.com. Follow the steps below to download the ESXi installer media:

1.  Go to support.dell.com.

2.  Select your line of business.

3.  Under Drivers & Downloads, click Get it here.

NOTE: Your system is automatically detected, and the Drivers & Downloads page is displayed. If it is automatically detected properly, skip to Step 6. If not, proceed to Step 4.

4.  Click Select A Different Product.

5.  Enter the Service Tag or the Express Service Code of the system you want to install ESXi on, and click Submit.

Alternatively, you can select Choose from a list of all Dell products → Servers, Storage, & Networking → PowerEdge . Select the model of your system.

The Drivers & Downloads page is displayed.

6.  Choose the Operating System as ESXi <Appropriate Version>

7.  Expand Enterprise Solutions.

8.  Click Download File beside the appropriate image.

 

Original Page: Here

Posted in Dell, Hardware, Vmware ESXi | Tagged , , , , , , , , | Leave a comment