我在一台没有安装的服务器上面对一个问题,前面的人不在这里解释我什么。
有些进程由于什么似乎是磁盘故障而崩溃,所以我在日志中search并在/var/log/messagesfind类似这样的行:
kernel: [277146.149980] sd 0:1:0:0: [sda] Sense Key : Medium Error [current] kernel: [277146.149986] sd 0:1:0:0: [sda] Add. Sense: Unrecovered read error
重启和使用fsck没有解决这个问题。
我不知道这些磁盘是在硬件还是软件RAID上。 我知道LVM没有安装在机器上。 这里备份不是问题,这个服务器不包含磁盘上的信息,重要的数据通过NFS挂载。 所以我可以根据需要重新安装机器,而不用担心磁盘的当前内容。
该机器是运行Debian Squeeze 64位的Dell PowerEdge R510。 制造商(戴尔)的诊断工具不能在Debian Squeeze上运行,我试图安装并运行它们,但是它们不起作用,所以我必须手动进行诊断。 这里是我可以提供给你的一些信息。
另外,如果需要的话,我可以物理访问机器,而且只看到三个磁盘:三个每个600GB的SCSI希捷磁盘。
# lshw -class disk *-disk:0 description: SCSI Disk product: Virtual Disk vendor: Dell physical id: 1.0.0 bus info: scsi@0:1.0.0 logical name: /dev/sda version: 1028 size: 1675GiB (1798GB) capacity: 1675GiB (1798GB) capabilities: 15000rpm partitioned partitioned:dos configuration: ansiversion=6 signature=cf241336
所以显然我们正在谈论一个1800GB的虚拟磁盘,其中包含三个600GB的物理磁盘。 显然,configuration虚拟磁盘可以使用BIOS来完成。 所以如果我必须用新磁盘重新安装整个机器,我必须在启动一个iso / liveCD / PXE之前进入BIOS,对吗?
# fdisk -l Disk /dev/sda: 1798.7 GB, 1798651772928 bytes 3 heads, 52 sectors/track, 22519177 cylinders Units = cylinders of 156 * 512 = 79872 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xcf241336 Device Boot Start End Blocks Id System /dev/sda1 1 421 32812 de Dell Utility /dev/sda2 * 434 27320 2097152 c W95 FAT32 (LBA) /dev/sda3 27320 277715 19530752 83 Linux /dev/sda4 277728 22519165 1734832129 5 Extended /dev/sda5 277728 402918 9764864 82 L
我想这是确认只有一个磁盘,一个虚拟的。
# smartctl -i /dev/sda smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net Device: Dell Virtual Disk Version: 1028 Device type: disk Local Time is: Mon Jun 15 10:28:59 2015 CEST Device does not support SMART
这似乎是合法的,因为看起来smartctl不适用于虚拟驱动器。
# cat /proc/scsi/scsi Attached devices: Host: scsi3 Channel: 00 Id: 00 Lun: 00 Vendor: TEAC Model: DVD-ROM DV-28SW Rev: R.2B Type: CD-ROM ANSI SCSI revision: 05 Host: scsi0 Channel: 01 Id: 00 Lun: 00 Vendor: Dell Model: Virtual Disk Rev: 1028 Type: Direct-Access ANSI SCSI revision: 06 Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: SEAGATE Model: ST3600057SS Rev: ES64 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 00 Id: 01 Lun: 00 Vendor: SEAGATE Model: ST3600057SS Rev: ES64 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 00 Id: 02 Lun: 00 Vendor: SEAGATE Model: ST3600057SS Rev: ES64 Type: Direct-Access ANSI SCSI revision: 05
所以这就是我到目前为止。 我想我必须购买新的磁盘并重新安装机器。 所以我想知道:这台机器是否configuration了一些RAID? 我怎么知道 ? 因为我想重现确切的当前configuration。 如果你需要一些,我会很高兴为你提供更多信息。
[编辑]这是lspci命令输出。
# lspci 00:00.0 Host bridge: Intel Corporation 5500 I/O Hub to ESI Port (rev 13) 00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 1 (rev 13) 00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 13) 00:07.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 7 (rev 13) 00:09.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 9 (rev 13) 00:0a.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 10 (rev 13) 00:14.0 PIC: Intel Corporation 5520/5500/X58 I/O Hub System Management Registers (rev 13) 00:14.1 PIC: Intel Corporation 5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers (rev 13) 00:14.2 PIC: Intel Corporation 5520/5500/X58 I/O Hub Control Status and RAS Registers (rev 13) 00:1a.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4 00:1a.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5 00:1a.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2 00:1d.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1 00:1d.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2 00:1d.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3 00:1d.3 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6 00:1d.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90) 00:1f.0 ISA bridge: Intel Corporation 82801JIR (ICH10R) LPC Interface Controller 00:1f.2 IDE interface: Intel Corporation 82801JI (ICH10 Family) 4 port SATA IDE Controller #1 00:1f.5 IDE interface: Intel Corporation 82801JI (ICH10 Family) 2 port SATA IDE Controller #2 01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5716 Gigabit Ethernet (rev 20) 01:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5716 Gigabit Ethernet (rev 20) 02:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03) 03:00.0 InfiniBand: QLogic Corp. InfiniPath QME7342 QDR HCA (rev 02) 06:03.0 VGA compatible controller: Matrox Graphics, Inc. MGA G200eW WPCM450 (rev 0a)
[编辑2]要知道可用的控制器数量:
# megacli -adpCount Controller Count: 0. Exit Code: 0x00
要打印控制器的所有信息:
# megacli -adpallinfo -aALL Exit Code: 0x00
所以我想这意味着没有硬件RAID?
[EDIT3]
# ls -l /dev/disk/by-path total 0 lrwxrwxrwx 1 root root 9 Jun 12 12:19 pci-0000:00:1f.5-scsi-0:0:0:0 -> ../../sr0 lrwxrwxrwx 1 root root 9 Jun 15 13:40 pci-0000:02:00.0-scsi-0:1:0:0 -> ../../sda lrwxrwxrwx 1 root root 10 Jun 12 12:19 pci-0000:02:00.0-scsi-0:1:0:0-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 Jun 12 12:19 pci-0000:02:00.0-scsi-0:1:0:0-part2 -> ../../sda2 lrwxrwxrwx 1 root root 10 Jun 12 12:19 pci-0000:02:00.0-scsi-0:1:0:0-part3 -> ../../sda3 lrwxrwxrwx 1 root root 10 Jun 12 12:19 pci-0000:02:00.0-scsi-0:1:0:0-part4 -> ../../sda4 lrwxrwxrwx 1 root root 10 Jun 12 12:19 pci-0000:02:00.0-scsi-0:1:0:0-part5 -> ../../sda5 lrwxrwxrwx 1 root root 10 Jun 12 12:21 pci-0000:02:00.0-scsi-0:1:0:0-part6 -> ../../sda6 # megaclisas-status -- Controller informations -- -- ID | Model -- Arrays informations -- -- ID | Type | Size | Status | InProgress -- Disks informations -- ID | Model | Status
[编辑4] sas2ircu命令是有帮助的(见本页 )。
我终于find了是否使用RAID:重新启动服务器,进入configuration实用程序菜单(Ctrl + C),并看到configuration了RAID0。 我在/dev/sg*磁盘上使用了smartctl命令(smartctl在/dev/sda*上不工作)。
smartctl -t long /dev/sg2 smartctl -l selftest /dev/sg2
它最终显示出哪一个磁盘出现了故障。 所以问题解决了!
此消息表示三个磁盘中的一个或多个磁盘出现故障,或者控制器/电缆出现故障。 整个设置似乎是三个磁盘的RAID0 – 一个非常危险的configuration。 我会做这样的事情:备份数据(如果你想),拆除RAID并获得JBOD。 testing每个单独的磁盘。 确定什么是失败的部分。 更换它,并configurationRAID 1.恢复/重新安装系统。
lspci输出:
02:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)
表示存在一个硬盘RAID卡。
pipe理这种卡的正确工具是:sas2ircu
你可以在这里find更多的信息: