Wednesday, March 27, 2013

I tried to execute a dladm set-linkprop command on a Nexenta RSF-1 HA cluster and received a "link busy" error. Took a minute for me to remember that the Solaris family requires you to unplumb and interface before you administer its persistent properties.

The example below shows how to change the MTU settings using plumb and dladm commands. This allows the RSF-1 controlled interfaces and VIPs to use jumbo frames.

ifconfig ixgbe1 unplumb
ifconfig ixgbe0 unplumb
dladm set-linkprop -p mtu=9000 ixgbe0
dladm set-linkprop -p mtu=9000 ixgbe1
ifconfig ixgbe0 plumb
ifconfig ixgbe1 plumb

Thursday, March 21, 2013

Dell PowerConnect Serial Console on Linux

Here's how to setup minicom on Linux to talk to a Dell PowerConnect.

Install minicom

sudo apt-get install minicom

Get your host's serial port.

dmesg | grep --color ttyS

Example output:

dmesg | grep --color ttyS
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:05: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:06: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

If you don't see anything listed, check your BIOS and make sure the serial port is enabled.

Now configure minicom.

minicom -s

Select "Serial port setup" and configure your settings as follows:

    +-----------------------------------------------------------------------+
    | A -    Serial Device      : /dev/ttyS0                                |
    | B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
    | D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 9600 8N1                                  |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    |                                                                       |
    |    Change which setting?                                              |
    +-----------------------------------------------------------------------+



Now you can either save these as dfl (default ) or something like dell_powerconnect.

Use your Dell setup like this.

minicom dell_powerconnect

I have a alot of servers that have padded numerics in their names. Here's a quick way to issue SSH commands to all of them. The key is to use good old printf


for i in {1..10}; do ssh cloud-host-$(printf "%02d" $i) iscsiadm -m node -T iqn.2004-04.com.megastorage:hyper-zfs-serv:iscsi.zabbix.c4c655 -u; done
The ccze utility is your friend for reading squid proxy logs. It's a nice colorizer and performs timestamp conversions with the -C argument.

sudo tail -f /var/log/squid-deb-proxy/access.log|ccze -CA

Thursday, February 24, 2011

Force Replication Between All Active Directory Servers

Occasionally, I have to troubleshoot Active Directory issues between branch offices and I can never remember all of the resync arguments for the repadmin.exe command. So I'm posting it here.

repadmin /syncall /A /e /P

This will force the executing DC to sync with all NC's known to it.

You should see something like this * number of NC in your domain:

Syncing all NC's held on ATLAS.
Syncing partition: DC=ForestDnsZones,DC=my,DC=corp,DC=com
CALLBACK MESSAGE: The following replication is in progress:
    From: c2fa9a13-bc15-419c-b416-21e6da3d5760._msdcs.my.corp.com
    To  : cee785b6-01fe-490c-8e50-5199841a1b58._msdcs.my.corp.com
CALLBACK MESSAGE: The following replication is in progress:
    From: c2fa9a13-bc15-419c-b416-21e6da3d5760._msdcs.my.corp.com
    To  : 62aa2e39-9c52-4eef-a789-f201350c0b02._msdcs.my.corp.com
CALLBACK MESSAGE: The following replication completed successfully:
    From: c2fa9a13-bc15-419c-b416-21e6da3d5760._msdcs.my.corp.com
    To  : cee785b6-01fe-490c-8e50-5199841a1b58._msdcs.my.corp.com
CALLBACK MESSAGE: The following replication completed successfully:
    From: c2fa9a13-bc15-419c-b416-21e6da3d5760._msdcs.my.corp.com
    To  : 62aa2e39-9c52-4eef-a789-f201350c0b02._msdcs.my.corp.com
CALLBACK MESSAGE: SyncAll Finished.
SyncAll terminated with no errors.

How to automatically connect Windows 7 or 2008 R2 VPN on start up

Do you have a Windows 7 or 2008 R2 machine that needs to automatically connect to a VPN? Here are some instructions on configuring the Task Scheduler to do this for you.

My thanks to RpCahoon for providing his helpful post on Microsoft's Social Answers site. I'm also giving Microsoft a nod for doing such thorough job with the modern Task Scheduler.

Instructions
  1. Open Task Scheduler
    Start > All Programs > Accessories > System Tools > Task Scheduler
  2. Click "Create Task" in the Actions pane on the right
  3. General Tab
    1. Provide a logical name for the task like "Auto VPN"
    2. Switch the running task mode to Run whether user is logged on or not
    3. Enable the Run with highest privileges option
    4. Change the "Configure for:" drop-down to Windows 7, Windows Server 2008 R2
  4. Triggers Tab
    1. Click the "New..." button
    2. Change "Begin the task:" to At start up
    3. (Optional) Enable "Delay task for" and set to 5 minutes. This give the machine a chance to idle down before launching the VPN.
  5. Actions Tab
    1. Click the "New..." button
    2. Enter c:\windows\system32\rasdial.exe in the "Program/script:" field. You can also browse to it if you don't want to type it or your default Windows install directory is different.
    3. Type the connection name in the "Add arguments" field. The rasdial.exe requires you wrap the connection name in quotes if it has spaces. You may also need to append the connection's username and password if they are required.
  6. Conditions Tab
    1. Un-check all of the options on the conditions tab.
  7. Settings Tab
    1. (Optional) enable "If the task fails, restart every:" and set to an appropriate value. I set mine to 1 hour in case there is a problem on the VPN server's end. 
    2. (Optional) set the "Attempt to restart up to:" value to an acceptable number. My default is 72 times at a 1 hour interval. This covers long weekend.
  8. Save the new task