ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: "Vladimir V. Kamarzin" <vvk@vvk.pp.ru>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] Восстановить mdadm raid5 после двойного сбоя
Date: Tue, 14 Jul 2009 12:32:02 +0600
Message-ID: <m34otflqql.fsf@vvk.distance.ru> (raw)
In-Reply-To: <m3iqi26rtu.fsf@mrkooll.tdr.pibhe.com> (Maxim Tyurin's message of "Thu, 09 Jul 2009 14:03:57 +0300")

>>>>> On 09 Jul 2009 at 17:03 "MT" == Maxim Tyurin writes:

MT> Рассказываю как восстановил (пусть для истории будет).

MT> Для восстановления нужно знать какой был рейд, его уровень, количество
MT> дисков и какой диск в каком слоте был.
MT> Ну и порядок их вылета тоже совсем не помешает.

MT> У меня был raid5 из 4-х дисков с таким раскладом по слотам
MT> HDD        slot
MT> sdb        0
MT> sdc        1
MT> sdd        2
MT> sde        3

MT> Сначала вылетел sdc, потом sdd

MT> Зная это восстановить просто:
MT> # mdadm --create --verbose /dev/md0 --assume-clean --level=raid5 --raid-devices=4 --spare-devices=0  /dev/sdb /dev/sdc /dev/sdd /dev/sde
MT> mdadm: layout defaults to left-symmetric
MT> mdadm: chunk size defaults to 64K
MT> mdadm: /dev/sdb appears to be part of a raid array:
MT>    level=raid5 devices=4 ctime=Wed Apr 16 19:31:35 2008
MT> mdadm: /dev/sdd appears to be part of a raid array:
MT>    level=raid5 devices=4 ctime=Wed Apr 16 19:31:35 2008
MT> mdadm: /dev/sde appears to be part of a raid array:
MT>    level=raid5 devices=4 ctime=Wed Apr 16 19:31:35 2008
MT> mdadm: size set to 488386496K
MT> Continue creating array? y
MT> mdadm: array /dev/md0 started.

MT> Рейд запустился
MT> # cat /proc/mdstat
MT> Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
MT> md0 : active raid5 sde[3] sdd[2] sdc[1] sdb[0]
MT>      1465159488 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]

MT> unused devices: <none>

MT> # cat /sys/block/md0/md/array_state
MT> clean

MT> После этого для минимизации количества сбойных файлов переподключаю
MT> первый вылетевший диск
MT> # mdadm /dev/md0 --fail /dev/sdc && mdadm /dev/md0 --remove /dev/sdc && mdadm /dev/md0 --add /dev/sdc

Я не понял, были задействованы вылетевшие диски без замены? Т.е. рэйд собран
заново на тех же самых дисках, и потом последовала их поочерёдная замена?

-- 
vvk

Postfix page on f.i: http://freesource.info/wiki/Dokumentacija/Postfix

Russian Postfix irc: irc.freenode.net #postfix-ru

  reply	other threads:[~2009-07-14  6:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-04 11:00 Maxim Tyurin
2009-07-09 11:03 ` Maxim Tyurin
2009-07-14  6:32   ` Vladimir V. Kamarzin [this message]
2009-07-14  9:04     ` Maxim Tyurin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m34otflqql.fsf@vvk.distance.ru \
    --to=vvk@vvk.pp.ru \
    --cc=sysadmins@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git