fbpx

SSH Slow to Login

Ever tried logging into a machine with ssh and found you have to wait much longer than reasonable for the session to start? This happened to me a few times and was especially annoying with machines on my local network (or a VM attached to a virtual network) that should be letting me in immediately. Basically the session is slow to start because the SSH server is trying to lookup the hostname of the SSH client and for whatever reason it’s timing out (e.g., it can’t reach a nameserver, because you happen to be offline) There are a couple of very simple ways to fix that: add “UseDNS no” to /etc/ssh/sshd_config add the client’s net address to the server’s /etc/hosts

Issue Copying a Large Amount of Data to a WD My Book Live Duo

We had this issue copying large amounts of data to this Western Digital My Book Live Duo NAS.

It was mounted up on a Oracle Centos 6.5 VM but once we hit a file over 1GB in size, the machine would halt. Turns out we have to map the drive using the option protocol=udp like the following statement:

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

 

See, NFS mount by default uses TCP, but for Linux to work with this drive it needs to use UDP.

How to Update Force10 S50n Firmware

Here is the Firmware FTOS-SB-8.4.2.7.bin

You’ll need a tftp program installed on your desktop.

Copy the new firmware to your tftp server folder.

Here is the command to upgrade the system

upgrade system tftp://192.168.1.xxx/FTOS-SB-8.4.2.7.bin

Output will look like this:

Force10#upgrade system tftp://192.168.1.xxx/FTOS-SB-8.4.2.7.bin
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Erasing Sseries ImageUpgrade Table of Contents, please wait
……………………………………………………………………………………….!
17234435 bytes successfully copied
Force10#

You can use the serial cable or ssh into the switch to do this operation.

Don’t forget to write, before issuing the reload command.

Here’s an example of my running config:

force10#show running-config
Current Configuration …
! Version 8.4.2.7
!
redundancy auto-synchronize full
!
hardware watchdog
!
hostname force10phx
!
enable password 7
!
username root password 7 privilege 15
username admin password 7 privilege 15
!
ethernet cfm
!
protocol spanning-tree rstp
no disable
!
stack-unit 0 provision S50N
!
interface GigabitEthernet 0/1
description vHost IP 07-01
no ip address
mtu 9252
no shutdown
!
interface GigabitEthernet 0/2
description vHost IP 07-02
no ip address
mtu 9252
no shutdown
!
interface GigabitEthernet 0/3
description vHost IP 08-01
no ip address
mtu 9252
no shutdown
!
interface GigabitEthernet 0/4
description vHost IP 08-02
no ip address
mtu 9252
no shutdown
!
interface GigabitEthernet 0/5
description vHost IP 09-01
no ip address
mtu 9252
no shutdown
!
interface GigabitEthernet 0/6
description vHost IP 09-02
no ip address
mtu 9252
no shutdown
!
interface GigabitEthernet 0/7
description vHost iSCSI 07-01
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/8
description vHost iSCSI 07-02
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/9
description vHost iSCSI 08-01
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/10
description vHost iSCSI 08-02
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/11
description vHost iSCSI 09-01
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/12
description vHost iSCSI 09-02
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/13
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/14
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/15
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/16
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/17
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/18
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/19
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/20
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 0/21
no ip address
shutdown
!
interface GigabitEthernet 0/22
no ip address
switchport
no shutdown
!
interface GigabitEthernet 0/23
no ip address
shutdown
!
interface GigabitEthernet 0/24
no ip address
shutdown
!
interface GigabitEthernet 0/25
no ip address
shutdown
!
interface GigabitEthernet 0/26
no ip address
shutdown
!
interface GigabitEthernet 0/27
no ip address
shutdown
!
interface GigabitEthernet 0/28
no ip address
shutdown
!
interface GigabitEthernet 0/29
no ip address
shutdown
!
interface GigabitEthernet 0/30
no ip address
shutdown
!
interface GigabitEthernet 0/31
no ip address
shutdown
!
interface GigabitEthernet 0/32
no ip address
shutdown
!
interface GigabitEthernet 0/33
no ip address
shutdown
!
interface GigabitEthernet 0/34
no ip address
shutdown
!
interface GigabitEthernet 0/35
no ip address
shutdown
!
interface GigabitEthernet 0/36
no ip address
shutdown
!
interface GigabitEthernet 0/37
no ip address
shutdown
!
interface GigabitEthernet 0/38
no ip address
shutdown
!
interface GigabitEthernet 0/39
no ip address
shutdown
!
interface GigabitEthernet 0/40
no ip address
shutdown
!
interface GigabitEthernet 0/41
no ip address
shutdown
!
interface GigabitEthernet 0/42
no ip address
shutdown
!
interface GigabitEthernet 0/43
description Config Port
no ip address
mtu 1500
switchport
no shutdown
!
interface GigabitEthernet 0/44
no ip address
shutdown
!
interface GigabitEthernet 0/45
no ip address
shutdown
!
interface GigabitEthernet 0/46
description DMZ UpLink 01
no ip address
switchport
no shutdown
!
interface GigabitEthernet 0/47
no ip address
shutdown
!
interface GigabitEthernet 0/48
no ip address
shutdown
!
stack-unit 1 provision S50N
!
interface GigabitEthernet 1/1
description vHost IP 07-03
no ip address
mtu 9252
no shutdown
!
interface GigabitEthernet 1/2
description vHost IP 07-04
no ip address
mtu 9252
no shutdown
!
interface GigabitEthernet 1/3
description vHost IP 08-03
no ip address
mtu 9252
no shutdown
!
interface GigabitEthernet 1/4
description vHost IP 08-04
no ip address
mtu 9252
no shutdown
!
interface GigabitEthernet 1/5
description vHost IP 09-03
no ip address
mtu 9252
no shutdown
!
interface GigabitEthernet 1/6
description vHost IP 09-04
no ip address
mtu 9252
no shutdown
!
interface GigabitEthernet 1/7
description vHost iSCSI 07-03
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/8
description vHost iSCSI 07-04
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/9
description vHost iSCSI 08-03
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/10
description vHost iSCSI 08-04
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/11
description vHost iSCSI 09-03
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/12
description vHost iSCSI 09-04
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/13
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/14
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/15
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/16
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/17
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/18
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/19
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/20
description EQL iSCSI Port
no ip address
mtu 9252
switchport
flowcontrol rx on tx on
spanning-tree rstp edge-port
no shutdown
!
interface GigabitEthernet 1/21
no ip address
shutdown
!
interface GigabitEthernet 1/22
no ip address
switchport
no shutdown
!
interface GigabitEthernet 1/23
no ip address
shutdown
!
interface GigabitEthernet 1/24
no ip address
shutdown
!
interface GigabitEthernet 1/25
no ip address
shutdown
!
interface GigabitEthernet 1/26
no ip address
shutdown
!
interface GigabitEthernet 1/27
no ip address
shutdown
!
interface GigabitEthernet 1/28
no ip address
shutdown
!
interface GigabitEthernet 1/29
no ip address
shutdown
!
interface GigabitEthernet 1/30
no ip address
shutdown
!
interface GigabitEthernet 1/31
no ip address
shutdown
!
interface GigabitEthernet 1/32
no ip address
shutdown
!
interface GigabitEthernet 1/33
no ip address
shutdown
!
interface GigabitEthernet 1/34
no ip address
shutdown
!
interface GigabitEthernet 1/35
no ip address
shutdown
!
interface GigabitEthernet 1/36
no ip address
shutdown
!
interface GigabitEthernet 1/37
no ip address
shutdown
!
interface GigabitEthernet 1/38
no ip address
shutdown
!
interface GigabitEthernet 1/39
no ip address
switchport
no shutdown
!
interface GigabitEthernet 1/40
no ip address
switchport
no shutdown
!
interface GigabitEthernet 1/41
no ip address
switchport
no shutdown
!
interface GigabitEthernet 1/42
no ip address
switchport
no shutdown
!
interface GigabitEthernet 1/43
no ip address
shutdown
!
interface GigabitEthernet 1/44
no ip address
shutdown
!
interface GigabitEthernet 1/45
no ip address
shutdown
!
interface GigabitEthernet 1/46
description DMZ UpLink 02
no ip address
switchport
no shutdown
!
interface GigabitEthernet 1/47
no ip address
shutdown
!
interface GigabitEthernet 1/48
no ip address
shutdown
!
interface Port-channel 1
description vHost 7 IP
no ip address
mtu 9252
switchport
switchport mode private-vlan trunk
no spanning-tree
channel-member GigabitEthernet 0/1-2
channel-member GigabitEthernet 1/1-2
no shutdown
!
interface Port-channel 2
description vHost 8 IP
no ip address
mtu 9252
switchport
switchport mode private-vlan trunk
no spanning-tree
channel-member GigabitEthernet 0/3-4
channel-member GigabitEthernet 1/3-4
no shutdown
!
interface Port-channel 3
description vHost 9 IP
no ip address
mtu 9252
switchport
switchport mode private-vlan trunk
no spanning-tree
channel-member GigabitEthernet 0/5-6
channel-member GigabitEthernet 1/5-6
no shutdown
!
interface Vlan 1
!untagged GigabitEthernet 1/40
!
interface Vlan 28
description PHX Production
name PHX Production
no ip address
tagged Port-channel 1-3
no shutdown
!
interface Vlan 29
description PHX Operations
name PHX Operations
ip address 192.168.29.175/24
tagged Port-channel 1-3
untagged GigabitEthernet 0/22,43
untagged GigabitEthernet 1/22,39,42
no shutdown
!
interface Vlan 30
description PHX Development
name PHX Development
no ip address
tagged Port-channel 1-3
no shutdown
!
interface Vlan 369
description DMZ
name DMZ
no ip address
tagged Port-channel 1-3
untagged GigabitEthernet 0/46
untagged GigabitEthernet 1/41,46
no shutdown
!
interface Vlan 387
description Development
name Development
no ip address
tagged Port-channel 1-3
no shutdown
!
interface Vlan 732
description PHX DB
name PHX DB
no ip address
tagged Port-channel 1-3
no shutdown
!
interface Vlan 999
description iSCSI LAN
name iSCSI LAN
no ip address
mtu 9252
tagged GigabitEthernet 0/7-12
tagged GigabitEthernet 1/7-12
untagged GigabitEthernet 0/13-20
untagged GigabitEthernet 1/13-20
no shutdown
!
ip route 0.0.0.0/0 Vlan 29 192.168.x
!
ip name-server 192.168.x
ip name-server 192.168.x
ip name-server 192.168.x
ip name-server 192.168.x
!
logging history debugging
logging trap debugging
logging source-interface Vlan 29
logging 192.168.x
logging 192.168.x
!
snmp-server community public ro
snmp-server enable traps snmp authentication coldstart linkdown linkup
snmp-server enable traps stp
snmp-server enable traps xstp
snmp-server enable traps envmon fan supply temperature
snmp-server location xxxx
no ip telnet server enable
!
ntp server 192.168.x
ntp server 192.168.x
!
ip ssh server enable
!
buffer-profile global 4Q
!
line console 0
line vty 0
line vty 1
line vty 2
line vty 3
line vty 4
line vty 5
line vty 6
line vty 7
line vty 8
line vty 9
!
end

Pre-Provision Force10 Stack

On your current stack, ssh in and at the config prompt, enter:

stack unit 2 provision S50V

stack-unit 3 provision S50V

the number is the number of the switch you’re introducing, and the S50V is the model of the switch, you can use S25N, S25P, S25V, S50N, and S50V.

On your new switch make sure you renumber the thing at the enable prompt like this:

stack-unit 0 renumber 2

stack-unit 1 renumber 3

 

Make sure you write out your config file!

Enable Internal SMTP Relay Exchange 2010

Open up the Exchange Management Console, go down to Server Configuration, select Hub Transport.

Click New Receive Connector fill out all the important name values and network values.

Create NEW RX

Double check your work,

Ensure that Anonymous users has a check box:

Make Anonymous

Ensure that only your local network has access to the Exchange Server.

new recieve connector

Fix Software RAID Windows 2k3

If you’ve intentionally – or unintentionally lost your primary drive in Windows 2003 Software RAID, here’s how you’d get it back.

Load up the 2k3 Install disk

Press “r” for recovery mode

Select your installation

Enter your password

chkdsk /p

bootcfg /rebuild

VMware image customization is in progress at every reboot

VMware image customization is in progress … at every reboot

When rebooting a virtual machine (server 2008 R2 x64 in this example) in vSphere 5 you see the following:

loading:

loading

followed by:

in-progress

To resolve this open regedit and browse to HKLM, System, CurrentControlSet, Control, Session Manager:

session-manager

Open the BootExecute key:

bootexecute

Change the BootExecute key from this:

before

to this:

after

Reboot.

Adding Disk to Centos LVM

While you can just create a pv out of raw block device I normally try to avoid it as it can cause confusion as to what the block device is being used for. It may also break some of the auto discover routines that LVM can use if it’s missing it’s configuration files.

Here’s an example of using parted to create a GPT with 1 partition that is the whole drive and set the partition flag to be lvm. The mkpart requires that you specify a file system but it doesn’t create the file system. Seems to be a long standing bug in parted. Also the start offset of 1M is to ensure that you get proper alignment.

parted /dev/sdb
mklabel GPT
mkpart primary ext2 1M 100%
set 1 lvm on
quit
pvcreate /dev/sdb1
pvdisplay
vgcreate vg_*name* /dev/sdb1 /dev/sdc1 /dev/sdd1
vgdisplay
lvcreate –extents 100%FREE -n lv_*name* vg_*name*
lvdisplay
mkfs.xfs -f /dev/mapper/vg_*name*-lv_*name*
df -ah