Linux Hangs Copying Large Files to a WD My Book Live Duo over NFS? Mount with UDP

We ran into trouble copying large amounts of data to a Western Digital My Book Live Duo NAS. The share was NFS-mounted on an Oracle/CentOS 6.5 VM, and as soon as a file over 1 GB was copied, the machine would hang.

The Fix: Use UDP for the NFS Mount

NFS mounts use TCP by default, but for Linux to work reliably with this drive, the mount needs to use UDP:

mount 192.168.1.45:/nfs /transport -o soft,timeo=60,intr,proto=udp

After remounting with proto=udp, large file copies completed without the system halting.

How to Pre-Provision Switches in a Dell Force10 S-Series Stack

Before you add new switches to an existing Dell Force10 S-Series stack, pre-provision their stack unit numbers so the stack recognizes them and you can configure their ports ahead of time.

1. Provision the New Units on the Existing Stack

SSH to the current stack and, at the config prompt, enter one line per switch you’re adding:

stack-unit 2 provision S50V
stack-unit 3 provision S50V

The number is the unit number of the switch you’re introducing, and S50V is its model. Supported models include S25N, S25P, S25V, S50N, and S50V.

2. Renumber the New Switches

On each new switch, at the enable prompt, renumber it to match the unit number you provisioned:

stack-unit 0 renumber 2
stack-unit 1 renumber 3

3. Save the Configuration

Don’t forget to write out your config:

write memory

Install and Configure Cacti Network Graphing on Red Hat / CentOS

Cacti is an open-source network graphing tool built on RRDtool. It polls routers, switches, and servers over SNMP and turns the results into bandwidth, CPU, and other performance graphs.

This nixCraft guide is the one I use for installing and configuring Cacti on Red Hat and CentOS, step by step:

nixCraft: Install Cacti Monitoring (RRD) Software on Fedora / RHEL / CentOS

Related: installing ntop on CentOS for per-host traffic analysis.

How to Allow Internal SMTP Relay in Exchange 2010 with a Receive Connector

Printers, scanners, and internal applications often need to send email through Exchange without authenticating. In Exchange 2010 you can allow this safely by creating a dedicated receive connector that accepts anonymous mail only from your internal network.

1. Create a New Receive Connector

Open the Exchange Management Console, go to Server Configuration → Hub Transport, and click New Receive Connector. Fill in a descriptive name and the network settings.

New Receive Connector option in Exchange Management Console

2. Allow Anonymous Users

On the connector’s Permission Groups, make sure Anonymous users is checked.

Anonymous users permission group checked on the receive connector

3. Restrict It to Your Local Network

Limit the remote IP ranges so only your internal network can use this connector. This keeps your Exchange server from becoming an open relay.

Receive connector remote network settings limited to the local network

Fix “VMware image customization is in progress” on Every Reboot (Windows Server 2008 R2)

After deploying a Windows Server 2008 R2 x64 VM from a template in vSphere 5, you may see the “VMware image customization is in progress” message every time it reboots, long after customization should have finished. The cause is a leftover entry in the BootExecute registry value.

What You’ll See

First the loading screen:

Windows loading screen during VMware guest customization

Followed by:

VMware image customization is in progress message

The Fix: Edit the BootExecute Registry Value

1. Open regedit and browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager:

Session Manager key in Registry Editor

2. Open the BootExecute value:

BootExecute value under Session Manager

3. Change it from this:

BootExecute value before the fix, with the extra customization entry

To this:

BootExecute value after the fix

4. Reboot. The customization message should no longer appear.

PuTTY SSH Session Timing Out When Idle? Check the TMOUT Variable

If your PuTTY or SSH session to a Linux server logs you out after a period of inactivity, the shell’s TMOUT environment variable is a likely cause. It tells bash to close an idle session after a set number of seconds.

Check Whether TMOUT Is Set

env | grep TMOUT
# or
echo $TMOUT

Change or Disable the Idle Timeout

Set a longer timeout, in seconds (here, one hour):

export TMOUT=3600

Or turn the feature off for your session:

unset TMOUT

Note: your system administrator may have set TMOUT for security reasons. If you’re not the admin, check with them before changing it.

Set the NSClient Password for Nagios Monitoring on Windows

When monitoring Windows servers with Nagios through NSClient, the agent may reject checks until its password is set. In the NSC.ini file, set the password parameter. In my setup it needed to match the SNMP community string.

NSC.ini Excerpt

;# PASSWORD
;  This is the password (-s) that is required to access NSClient remotely.
;  If you leave this blank everyone will be able to access the daemon remotely.
password=public

Restart the NSClient service after saving, and use the same value with -s in your Nagios check_nt command definitions.

Fix VMware APD (All Paths Down) Storage Issues by Removing Detached Devices

I had an ESXi host with dead storage paths causing All Paths Down (APD) issues. The cause was old LUNs that had been detached but were still listed on the host. Removing them from the detached device list cleared it up.

1. List the VMFS Datastores in Use

First confirm which devices back your live datastores, so you don’t remove one by mistake:

~ # esxcli storage vmfs extent list
Volume Name  VMFS UUID                            Extent Number  Device Name                           Partition
-----------  -----------------------------------  -------------  ------------------------------------  ---------
BackupSAN    50eb10a0-4f1a9256-5434-90e2ba22c340  0              naa.6842b2b000687ee500002a4850ea9934  1
Operations   5053a326-370b5095-739a-00137234e92a  0              naa.68b7b2acf4b8d12b3a051502000020ca  1
Templates    506204f5-fe667464-c1b1-90e2ba22c340  0              naa.68b7b2acf4b80148200615353227e7f3  1
CorpStor01   5053a1e4-e68f6227-0e8a-001ec9fd0643  0              naa.68b7b2acf4b8b1163a05e5010000c0a2  1

2. List Detached Devices

~ # esxcli storage core device detached list
Device UID                                                  State
----------------------------------------------------------  -----
naa.6090a058e015725f990965020000a09e                        off
naa.68b7b2acf4b8f10e0d0585010000004c                        off
t10.FreeBSD_iSCSI_Disk______100000010_______________________  off

3. Remove the Stale Detached Devices

esxcli storage core device detached remove -d naa.6090a058e015725f990965020000a09e
esxcli storage core device detached remove -d naa.68b7b2acf4b8f10e0d0585010000004c
esxcli storage core device detached remove -d t10.FreeBSD_iSCSI_Disk______100000010_______________________

Then rescan your storage adapters. The dead paths should be gone.