고장난 드라이브의 RAID 활용도 진단

고장난 드라이브의 RAID 활용도 진단

제가 설치하지 않은 서버에서 문제가 발생했습니다. 이전 담당자는 더 이상 저에게 설명을 해주지 않습니다.

디스크 오류로 인해 일부 프로세스가 중단되었으므로 로그를 검색하여 다음과 같은 줄을 찾았습니다 /var/log/messages.

 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입니다. 제조업체(Dell) 진단 도구는 Debian Squeeze에서 실행되지 않습니다. 어쨌든 설치하고 실행해 보았지만 작동하지 않아서 수동으로 진단해야 합니다. 제가 제공해드릴 수 있는 정보는 다음과 같습니다.

또한 필요한 경우 시스템에 물리적으로 액세스할 수 있으며 디스크가 3개(각각 600GB인 SCSI Seagate 디스크 3개)만 있는 것을 확인했습니다.

 # 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

따라서 우리는 3개의 600GB 물리적 디스크를 포함하는 1800GB의 가상 디스크에 대해 이야기하고 있는 것 같습니다. 분명히 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

이것이 제가 지금까지 얻은 것입니다. 새 디스크를 구입하고 머신을 다시 설치해야 한다고 가정합니다. 그래서 알고 싶습니다. 이 컴퓨터에 RAID가 구성되어 있습니까? 내가 어떻게 알아 ? 왜냐하면 정확한 현재 구성을 재현하고 싶기 때문입니다. 필요한 정보가 있으면 기꺼이 더 많은 정보를 제공해 드리겠습니다.

[편집하다] 다음은 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가 없다는 뜻일까요?

[편집3]

# 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이 도움이 되었습니다(참조:이 페이지).

마침내 RAID가 사용되었는지 확인했습니다. 서버를 재부팅하고 구성 유틸리티 메뉴(Ctrl + C)를 입력하여 RAID0이 구성되었는지 확인합니다. 디스크 에서 smartctl 명령을 사용했습니다 /dev/sg*(smartctl이 작동하지 않았습니다 /dev/sda*).

smartctl -t long /dev/sg2
smartctl -l selftest /dev/sg2

마침내 디스크 중 어느 디스크에 세그먼트 오류가 발생했는지 표시됩니다. 그래서 문제가 해결되었습니다!

답변1

이 메시지는 세 개의 디스크 중 하나 이상에 오류가 있거나 컨트롤러/케이블에 오류가 있음을 나타냅니다. 전체 설정은 디스크 3개로 구성된 RAID0인 것으로 보입니다. 이는 매우 위험한 구성입니다. 나는 다음과 같이 할 것입니다: 데이터를 백업하고(원하는 경우) RAID를 해체하고 JBOD를 얻습니다. 각 개별 디스크를 테스트합니다. 실패한 부분이 무엇인지 확인합니다. 교체하고 RAID 1을 구성합니다. 시스템을 복원/재설치합니다.

답변2

lspci 출력:

02:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)

hw raid 카드가 있음을 나타냅니다.

이러한 종류의 카드를 관리하는 올바른 도구는 sas2ircu입니다.

자세한 내용은 여기에서 확인할 수 있습니다.

http://hwraid.le-vert.net/wiki/LSIFusionMPTSAS2

관련 정보