Bom dia a todos!
Alguns pontos a serem analisados:
1) Qual a versão que está usando?
2) Qual o o comando que você criou este RAID?
3) Posta aqui o arquivo /etc/mdadm/mdadm.conf
Abraços
--
Kleber Melo
Admin. Sistemas Linux
Advanced Level - Linux Professional Institute Certificate (LPIC-2)
Novell Certified Linux Administrator (CLA)
Novell Data Center Technical Specialist (DCT)
MSN: cyberman...@hotmail.com
Skype: kleber.melo
Em 07-02-2013 17:39, Keppler escreveu:
Olá Julio, abaixo segue a saída dos
comandos
Preciso observar uma coisa que acho que não mencionei antes.
1) Você verá que tenho volumes lógicos (LVM)
2) Particionei da seguinte forma:
/boot --> md0
/ --> md1
Em 07-02-2013 16:02, julio lopez escreveu:
Kepler,
Emita os comandos abaixo (nessa sequência) e cole a saída
deles para a lista:
dmesg |grep -i sd
ACPI: RSDP 00000000000f0450 00024 (v02 ALASKA)
ACPI: XSDT 00000000badbf068 00054 (v01 ALASKA A M I 01072009
AMI 00010013)
ACPI: DSDT 00000000badbf150 071B5 (v02 ALASKA A M I 00000015
INTL 20051117)
ACPI: SSDT 00000000badc6478 00102 (v01 AMICPU PROC 00000001
MSFT 03000001)
ACPI: EC: Look up EC in DSDT
ACPI: acpi_idle yielding to intel_idleACPI: SSDT 00000000bae0ac18
0038C (v01 AMI IST 00000001 MSFT 03000001)
ACPI: SSDT 00000000bae0be18 00084 (v01 AMI CST 00000001
MSFT 03000001)
sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/931
GiB)
sd 0:0:0:0: [sda] 4096-byte physical blocks
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled,
doesn't support DPO or FUA
sd 1:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931
GiB)
sd 1:0:0:0: [sdb] 4096-byte physical blocks
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled,
doesn't support DPO or FUA
sda:
sdb: sdb1 sdb2
sd 1:0:0:0: [sdb] Attached SCSI disk
sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
md: bind<sdb2>
md: bind<sda2>
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: Attached scsi generic sg1 type 0
md: bind<sdb1>
md: bind<sda1>
disk 0, wo:1, o:1, dev:sda1
disk 1, wo:0, o:1, dev:sdb1
sd 1:0:0:0: [sdb] Unhandled sense code
sd 1:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sd 1:0:0:0: [sdb] Sense Key : Medium Error [current] [descriptor]
sd 1:0:0:0: [sdb] Add. Sense: Unrecovered read error - auto
reallocate failed
sd 1:0:0:0: [sdb] CDB: Read(10): 28 00 00 08 fd 00 00 03 80 00
sd 1:0:0:0: [sdb] Unhandled sense code
sd 1:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sd 1:0:0:0: [sdb] Sense Key : Medium Error [current] [descriptor]
sd 1:0:0:0: [sdb] Add. Sense: Unrecovered read error - auto
reallocate failed
sd 1:0:0:0: [sdb] CDB: Read(10): 28 00 00 08 ff b8 00 00 08 00
md/raid1:md0: sdb: unrecoverable I/O read error for block 587648
disk 0, wo:1, o:1, dev:sda1
disk 1, wo:0, o:1, dev:sdb1
disk 1, wo:0, o:1, dev:sdb1
fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cilindros of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x9bd5c98e
Dispositivo Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 fd Detecção
automática de RAID Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 121602 976248832 fd Detecção
automática de RAID Linux
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cilindros of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00032c2e
Dispositivo Boot Start End Blocks Id System
/dev/sdb1 * 1 64 512000 fd Detecção
automática de RAID Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2 64 121602 976248832 fd Detecção
automática de RAID Linux
Disk /dev/md1: 999.7 GB, 999677620224 bytes
2 heads, 4 sectors/track, 244061919 cylinders
Units = cilindros of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_trcsistema-LogVol00: 104.9 GB, 104857600000
bytes
255 heads, 63 sectors/track, 12748 cylinders
Units = cilindros of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_trcsistema-LogVol03: 3527 MB, 3527409664 bytes
255 heads, 63 sectors/track, 428 cylinders
Units = cilindros of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md0: 524 MB, 524275712 bytes
2 heads, 4 sectors/track, 127997 cylinders
Units = cilindros of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_trcsistema-LogVol01: 26.2 GB, 26214400000
bytes
255 heads, 63 sectors/track, 3187 cylinders
Units = cilindros of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_trcsistema-LogVol02: 865.1 GB, 865075200000
bytes
255 heads, 63 sectors/track, 105172 cylinders
Units = cilindros of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
mdadm --detail -scan /dev/md0
/dev/md0:
Version : 1.0
Creation Time : Sun Feb 3 16:34:11 2013
Raid Level : raid1
Array Size : 511988 (500.07 MiB 524.28 MB)
Used Dev Size : 511988 (500.07 MiB 524.28 MB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Thu Feb 7 17:17:12 2013
State : clean, degraded
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1
Name : trc-sistema.links:0
UUID : 00844b00:5e01a64d:91172338:de6d7042
Events : 484
Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 17 1 active sync /dev/sdb1
2 8 1 - spare /dev/sda1
Personalities : [raid1]
md0 : active raid1 sda1[2](S) sdb1[1]
511988 blocks super 1.0 [2/1] [_U]
md1 : active raid1 sda2[2] sdb2[1]
976247676 blocks super 1.1 [2/2] [UU]
bitmap: 0/8 pages [0KB], 65536KB chunk
unused devices: <none>
mdadm /dev/md0 -f /dev/sdxx (xx =
o volume com pau)
[root@localhost ~]# mdadm /dev/md0 -f /dev/sda1
mdadm: set /dev/sda1 faulty in /dev/md0
Personalities : [raid1]
md0 : active raid1 sda1[2](F) sdb1[1]
511988 blocks super 1.0 [2/1] [_U]
md1 : active raid1 sda2[2] sdb2[1]
976247676 blocks super 1.1 [2/2] [UU]
bitmap: 1/8 pages [4KB], 65536KB chunk
unused devices: <none>
mdadm /dev/md0 -r /dev/sdxx -f
(xx = o volume com pau)
[root@localhost ~]# mdadm /dev/md0 -r /dev/sda1 -f
mdadm: hot removed /dev/sda1 from /dev/md0
md0 : active raid1 sdb1[1]
511988 blocks super 1.0 [2/1] [_U]
md1 : active raid1 sda2[2] sdb2[1]
976247676 blocks super 1.1 [2/2] [UU]
bitmap: 0/8 pages [0KB], 65536KB chunk
unused devices: <none>
mdadm --detail -scan /dev/md0
/dev/md0:
Version : 1.0
Creation Time : Sun Feb 3 16:34:11 2013
Raid Level : raid1
Array Size : 511988 (500.07 MiB 524.28 MB)
Used Dev Size : 511988 (500.07 MiB 524.28 MB)
Raid Devices : 2
Total Devices : 1
Persistence : Superblock is persistent
Update Time : Thu Feb 7 17:30:30 2013
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
Name : trc-sistema.links:0
UUID : 00844b00:5e01a64d:91172338:de6d7042
Events : 490
Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 17 1 active sync /dev/sdb1
mdadm /dev/md0 -a /dev/sdxx (xx =
o volume com pau)
[root@localhost ~]# mdadm /dev/md0 -a /dev/sda1
mdadm: added /dev/sda1
Personalities : [raid1]
md0 : active raid1 sda1[2] sdb1[1]
511988 blocks super 1.0 [2/1] [_U]
[===========>.........] recovery = 57.7% (295744/511988)
finish=0.2min speed=12858K/sec
md1 : active raid1 sda2[2] sdb2[1]
976247676 blocks super 1.1 [2/2] [UU]
bitmap: 1/8 pages [4KB], 65536KB chunk
unused devices: <none>
e dopois de sincronizado, segue a saída novamente do comando:
Personalities : [raid1]
md0 : active raid1 sda1[2](S) sdb1[1]
511988 blocks super 1.0 [2/1] [_U]
md1 : active raid1 sda2[2] sdb2[1]
976247676 blocks super 1.1 [2/2] [UU]
bitmap: 0/8 pages [0KB], 65536KB chunk
unused devices: <none>
cat /etc/mdadm/mdadm.conf
MAILADDR root
AUTO +imsm +1.x -all
ARRAY /dev/md0 level=raid1 num-devices=2
UUID=00844b00:5e01a64d:91172338:de6d7042
ARRAY /dev/md1 level=raid1 num-devices=2
UUID=c89dabef:d9cd0ed6:addc6e0d:9d72c88c
Command line: ro root=/dev/mapper/vg_trcsistema-LogVol00
rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=br-abnt2
rd_MD_UUID=c89dabef:d9cd0ed6:addc6e0d:9d72c88c LANG=pt_BR.UTF-8
SYSFONT=latarcyrheb-sun16 crashkernel=128M
rd_LVM_LV=vg_trcsistema/LogVol00 rd_LVM_LV=vg_trcsistema/LogVol03
rd_NO_DM rhgb quiet
AMD AuthenticAMD
RAMDISK: 1f04b000 - 1ffef5ff
#3 [001f04b000 - 001ffef5ff] RAMDISK ==> [001f04b000
- 001ffef5ff]
[ffffea0000000000-ffffea0007dfffff] PMD ->
[ffff88002c600000-ffff8800335fffff] on node 0
Kernel command line: ro root=/dev/mapper/vg_trcsistema-LogVol00
rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=br-abnt2
rd_MD_UUID=c89dabef:d9cd0ed6:addc6e0d:9d72c88c LANG=pt_BR.UTF-8
SYSFONT=latarcyrheb-sun16 crashkernel=128M
rd_LVM_LV=vg_trcsistema/LogVol00 rd_LVM_LV=vg_trcsistema/LogVol03
rd_NO_DM rhgb quiet
Fixed MDIO Bus: probed
md: bind<sdb2>
md: bind<sda2>
md: raid1 personality registered for level 1
md/raid1:md1: active with 2 out of 2 mirrors
created bitmap (8 pages) for device md1
md1: bitmap initialized from disk: read 1/1 pages, set 0 of 14897
bits
md1: detected capacity change from 0 to 999677620224
md1: unknown partition table
dracut: Scanning devices md1 for LVM logical volumes
vg_trcsistema/LogVol00 vg_trcsistema/LogVol03
md: bind<sdb1>
md/raid1:md0: active with 1 out of 2 mirrors
md0: detected capacity change from 0 to 524275712
md0: unknown partition table
md: bind<sda1>
md: recovery of RAID array md0
md: minimum _guaranteed_ speed: 1000 KB/sec/disk.
md: using maximum available idle IO bandwidth (but not more than
200000 KB/sec) for recovery.
md: using 128k window, over a total of 511988k.
EXT4-fs (md0): mounted filesystem with ordered data mode. Opts:
SELinux: initialized (dev md0, type ext4), uses xattr
ata2.00: cmd 60/80:00:00:fd:08/03:00:00:00:00/40 tag 0 ncq 458752
in
ata2.00: cmd 60/80:10:00:fd:08/03:00:00:00:00/40 tag 2 ncq 458752
in
ata2.00: cmd 60/80:00:00:fd:08/03:00:00:00:00/40 tag 0 ncq 458752
in
ata2.00: cmd 60/80:00:00:fd:08/03:00:00:00:00/40 tag 0 ncq 458752
in
ata2.00: cmd 60/80:00:00:fd:08/03:00:00:00:00/40 tag 0 ncq 458752
in
ata2.00: cmd 60/80:00:00:fd:08/03:00:00:00:00/40 tag 0 ncq 458752
in
ata2.00: cmd 60/08:00:b8:ff:08/00:00:00:00:00/40 tag 0 ncq 4096 in
ata2.00: cmd 60/08:00:b8:ff:08/00:00:00:00:00/40 tag 0 ncq 4096 in
ata2.00: cmd 60/08:08:b8:ff:08/00:00:00:00:00/40 tag 1 ncq 4096 in
ata2.00: cmd 60/08:00:b8:ff:08/00:00:00:00:00/40 tag 0 ncq 4096 in
ata2.00: cmd 60/08:00:b8:ff:08/00:00:00:00:00/40 tag 0 ncq 4096 in
ata2.00: cmd 60/08:00:b8:ff:08/00:00:00:00:00/40 tag 0 ncq 4096 in
md/raid1:md0: sdb: unrecoverable I/O read error for block 587648
md: md0: recovery done.
md/raid1:md0: Disk failure on sda1, disabling device.
md/raid1:md0: Operation continuing on 1 devices.
md: unbind<sda1>
md: export_rdev(sda1)
md: bind<sda1>
md: recovery of RAID array md0
md: minimum _guaranteed_ speed: 1000 KB/sec/disk.
md: using maximum available idle IO bandwidth (but not more than
200000 KB/sec) for recovery.
md: using 128k window, over a total of 511988k.
ata2.00: cmd 60/80:88:80:ff:08/00:00:00:00:00/40 tag 17 ncq 65536
in
ata2.00: cmd 60/80:68:80:ff:08/00:00:00:00:00/40 tag 13 ncq 65536
in
ata2.00: cmd 60/80:78:80:ff:08/00:00:00:00:00/40 tag 15 ncq 65536
in
ata2.00: cmd 60/80:10:80:ff:08/00:00:00:00:00/40 tag 2 ncq 65536
in
ata2.00: cmd 60/80:00:80:ff:08/00:00:00:00:00/40 tag 0 ncq 65536
in
ata2.00: cmd 60/80:00:80:ff:08/00:00:00:00:00/40 tag 0 ncq 65536
in
ata2.00: cmd 60/08:00:b8:ff:08/00:00:00:00:00/40 tag 0 ncq 4096 in
ata2.00: cmd 60/08:00:b8:ff:08/00:00:00:00:00/40 tag 0 ncq 4096 in
ata2.00: cmd 60/08:00:b8:ff:08/00:00:00:00:00/40 tag 0 ncq 4096 in
ata2.00: cmd 60/08:00:b8:ff:08/00:00:00:00:00/40 tag 0 ncq 4096 in
ata2.00: cmd 60/08:00:b8:ff:08/00:00:00:00:00/40 tag 0 ncq 4096 in
ata2.00: cmd 60/08:00:b8:ff:08/00:00:00:00:00/40 tag 0 ncq 4096 in
md/raid1:md0: sdb: unrecoverable I/O read error for block 587648
md: md0: recovery done.
E após tudo feito, veja como ficou a saída do comando "mdadm -D
/dev/md0":
/dev/md0:
Version : 1.0
Creation Time : Sun Feb 3 16:34:11 2013
Raid Level : raid1
Array Size : 511988 (500.07 MiB 524.28 MB)
Used Dev Size : 511988 (500.07 MiB 524.28 MB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Thu Feb 7 17:32:31 2013
State : clean, degraded
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1
Name : trc-sistema.links:0
UUID : 00844b00:5e01a64d:91172338:de6d7042
Events : 505
Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 17 1 active sync /dev/sdb1
2 8 1 - spare /dev/sda1
^^
Como vocês podem notar na linha acima, o device ainda está como
"spare":
NOTA: Esse procedimento é o mesmo
descrito anteriormente (...que vc já disse que não deu
certo). Faça novamente nessa ordem... e como vc já disse,
e deve estar pensando: "não vai dar certo de novo"!!
Concordo, mas o objetivo é tentarmos obter mais
informações DO QUE ESTÁ ACONTECENDO AÍ NO SEU BOX. Assim,
cole as saídas na lista para tentarmos achar alguma msg de
erro no processo de execução do mdadm, ou outra msg
qualquer registrada no syslog (especialmente o último
comando).
Aliás... fica aqui uma dica IMPORTANTE
para todo problema que tiver nessa plataforma: FUCE NOS LOGS
!!!! Primeiro veja se o serviço com problema tem uma saída
de log própria na /var/log. Se tiver, examine primeiro esses
arquivos. Senão examine o SYSLOG. A PISTA para a solução do
problema SEMPRE ESTARÁ LÁ.
Abraço
Julio Lopez
Jd4y - Cristo vai voltar...
prepara-te!
Olá Julio,
obrigado pelo retorno!
Mas não eu certo não....alguma outra sugestão?
Em 06-02-2013 10:44, julio lopez escreveu:
Olá Keppler!
Segue
um tutorialzinho que descreve todos os passos
para recuperar um arranjo de discos raid1:
##Status
do arranjo
cat /proc/mdstat
##VErificação dos volumes montados
mdadm --detail -scan /dev/md0
#check dos volumes existentes
dmesg |grep sd
##Marca sdb1 (exemplo) como faulty, remove do
arranjo e adiciona novamente (o sincronismo é
automático)
mdadm /dev/md0 -f /dev/sdb1
ou
mdadm --manage /dev/md0 --fail /dev/sdb1
#remove
mdadm /dev/md0 -r /dev/sdb1 -f
ou
mdadm --manage /dev/md0 --remove /dev/sdb1
#confere qual o tipo de sistema de arquivos
(ext3, reiserfs, etc) foi criado o arranjo
md0/md1
vim /etc/fstab
#verifica/corrige erros
fsck.ext3 /dev/sdb1
#troca de HD limpo / zerado (mesmo tamanho ou
maior)
#criar a particao no novo disco (sdb1)
exatamente igual ao outro (sdc1)
sfdisk -d /dev/sdc | sfdisk /dev/sdb
...depois
fdisk -l
#retorna ao arranjo
mdadm /dev/md0 -a /dev/sdb1
ou
mdadm --manage /dev/md0 --add /dev/sdb1
##Verificar andamento do sincronismo
cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1
scsi/host0/bus0/target1/lun0/part1[2]
scsi/host0/bus0/target0/lun0/part1[0]
35061760 blocks [2/1] [U_]
[================>....] recovery =
80.3% (28167964/35061760) finish=2.4min
speed=46828K/sec
unused devices: <none>
Abraço,
Julio Lopez
Jd4y - Cristo voltará... prepara-te!
----- Mensagem original -----
De: Keppler <jurgenkepp...@gmail.com>
Para: Lista DEBIAN <debian-user-portuguese@lists.debian.org>
Cc:
Enviadas: Terça-feira, 5 de Fevereiro de 2013
21:51
Assunto: Ativar/Adicionar "spare devices" num
Raid
Olá pessoal.
Estou com um problema aqui.
Configurei um Server em Raid-1. Fui fazer um
teste para ver realmente a coisa funcionava e
removi um dos discos (sda).
Até aí blz, o outro disco assumiu e o sistema
voltou "pro ar".
Só que quando fui voltar o disco novamente
para o Raid, ele fica somente como "spare".
Abaixo está a sainda do comando: "mdadm -D
/dev/md0":
/dev/md0:
Version : 1.0
Creation Time : Sun Feb 3 16:34:11 2013
Raid Level : raid1
Array Size : 511988 (500.07 MiB 524.28 MB)
Used Dev Size : 511988 (500.07 MiB 524.28
MB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Tue Feb 5 22:41:16 2013
State : clean, degraded
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1
Name : sistema.local:0
UUID :
00844b00:5e01a64d:91172338:de6d7042
Events : 318
Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 17 1 active
sync /dev/sdb1
2 8 1 - spare
/dev/sda1
Como vcs podem notar na última linha, mesmo eu
tentando adicionar novamente o disco com o
comando " mdadm --manage /dev/md0 --add
/dev/sda1", o dispositivo "sda1" não voltar
para "active sync".
Li um monte de coisas por aí, mas não consegui
nada que me ajudasse.
Alguém sabe como faço para voltar este
dispositivo para o Raid?
grato,
Jurgen
-- To UNSUBSCRIBE, email to debian-user-portuguese-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble?
Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/5111a928.4060...@gmail.com
--
To UNSUBSCRIBE, email to debian-user-portuguese-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/51165e94.2030...@yahoo.com.br
|