Linux Troubleshooting


  • Hard Drive Health Check:

Command Examples:

smartctl -a /dev/hda

Self test statistics on Primary IDE Master Drive.  Look out for any self test failures and Drive temperatures not going much higher than 50C

Other devices: /dev/hdb - Primary Slave, /dev/hdc - Secondary Master etc.

smartctl -a /dev/sda

Similarly for first SATA Drive. /dev/sdb is second SATA drive and so forth...

  • RAID 1 Synchronization status across all drives:

Command:

cat /proc/mdstat

Any RAID partitions that are NOT showing UU (i.e. _U or U_) are NOT synchronized.

  • LIST all PCI/PCIe Devices:

Command:

lspci

  • LIST all Connected and Active USB Devices:

Command:

lsusb

  • Ethernet connections statistics and IP addresses:

Command:

ifconfig

To show individual device example:

ifconfig eth0

Look out for errors particularly dropped, overruns, frame and carrier.  Could indicate either cable, remote device, NIC or driver problems.

  • Ethernet connection status:

Command:

ethtool eth0

Will show current link speed e.g. 100Mb or 1000Mb and status (i.e. full or half duplex) for a given ethernet device.

  • GRUB command to rewrite boot section of Replaced HDD in RAID 1 setup:


Command sequence:

grub

Once the GRUB prompt appears issue the following commands:

root (hd0,0)

setup (hd0)

root (hd1,0)

setup (hd1)

quit

This ensures either drive can run a full boot if the other fails when a failed drive has been replaced.

Note: GRUB = GRand Unified Boot loader.