linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: ariel.work@fmgirl.com
Cc: linux-raid@vger.kernel.org
Subject: Re: Request for help with "1st time through" RAID array renaming
Date: Thu, 15 Aug 2013 09:46:36 +1000	[thread overview]
Message-ID: <20130815094636.3f804c9f@notabene.brown> (raw)
In-Reply-To: <1376501238.20717.9810207.70E4DA12@webmail.messagingengine.com>

[-- Attachment #1: Type: text/plain, Size: 3509 bytes --]

On Wed, 14 Aug 2013 10:27:18 -0700 ariel.work@fmgirl.com wrote:

> Doing 'my homework', to my read, this is what I think needs to be done. 
> Am I right?
> 
> In general
> 
> (1) Boot from a LiveCD
> (2) stop the arrays
> (3) make changes
> 
> The details should look like this.
> 
> 1st checking
> 
> 	cat /proc/mdstat  | grep ^md
> 		md0 : active raid1 sda1[0] sdb1[1]
> 		md1 : active raid1 sdb2[2] sda2[0]
> 		md2 : active raid10 sdc1[0] sdf1[3] sde1[2] sdd1[1]
> 
> 
> ???     QUESTION:  Why does the 'md1' line refer to "[2]" & "[0]"?  Why
> is there no "[1]" instead of "[2]"?  Is this a problem that needs
> fixing?
> 
> For
> 
> 	mdadm --detail --scan
> 		ARRAY /dev/md0         metadata=0.90                
> 		UUID=xxx...
> 		ARRAY /dev/md/Rescue:1 metadata=1.0  name=Rescue:1  
> 		UUID=yyy...
> 		ARRAY /dev/md2         metadata=1.2  name=server:md2
> 		UUID=zzz...
> 
> I'd do this?
> 
> 	mdadm --stop /dev/md0
> 	mdadm --stop /dev/md/Rescue:1
> 	mdadm --stop /dev/md2
> 
> 	mdadm --uuid=xxx... --update=super-minor --assemble /dev/md0
> 	/dev/sd[ab]1
> 	mdadm --uuid=yyy... --update=super-minor --assemble /dev/md1
> 	/dev/sd[ab]2
> 	mdadm --uuid=zzz... --update=super-minor --assemble /dev/md2
> 	/dev/sd[cdef]1

As the man page says, super-minor is only relevant for 0.90 metadata, and
updating it is automatic for 2.6 and later.  So this step is not needed.

> 
> 	mdadm --stop /dev/md0
> 	mdadm --stop /dev/md1
> 	mdadm --stop /dev/md2
> 
> 	mdadm --uuid=xxx... --update=name --name=server1_boot   
> 	--homehost="<none>" --assemble /dev/md0  /dev/sd[ab]1
> 	mdadm --uuid=yyy... --update=name --name=server1_root   
> 	--homehost="<none>" --assemble /dev/md1  /dev/sd[ab]2
> 	mdadm --uuid=zzz... --update=name --name=server1_storage
> 	--homehost="<none>" --assemble /dev/md2  /dev/sd[cdef]1

This should work and do what you expect, though "--assemble" needs to come
first.
And if you are explicitly listing the devices (/dev/sd[ab]1), then giving the
uuid as well is fairly pointless (though it doesn't hurt).

> 
> Then EDIT
> 
> 	/etc/mdadm.conf
> +               HOMEHOST <ignore>
> 		CREATE owner=root group=disk mode=0660 auto=yes
> 		DEVICE /dev/disk/by-id/ata-[DISK1]-part2
> 		/dev/disk/by-id/[DISK2]-part2
> 		DEVICE /dev/disk/by-id/ata-[DISK1]-part1
> 		/dev/disk/by-id/[DISK2]-part1
> 		DEVICE /dev/disk/by-id/ata-[DISK3]-part1
> 		/dev/disk/by-id/ata-[DISK4]-part1
> 		/dev/disk/by-id/ata-[DISK5]-part1
> 		/dev/disk/by-id/ata-[DISK6]-part1
> -               ARRAY /dev/md0  level=raid1  num-devices=2 metadata=0.90
> UUID=xxx...
> -               ARRAY /dev/md1  level=raid1  num-devices=2 metadata=1.00
> UUID=yyy...
> -               ARRAY /dev/md2  level=raid10 num-devices=4 metadata=1.02
> name=server:md2 UUID=zzz...
> +               ARRAY /dev/md0  level=raid1  num-devices=2 metadata=0.90
> name=server1_boot    UUID=xxx...
> +               ARRAY /dev/md1  level=raid1  num-devices=2 metadata=1.00
> name=server1_boot    UUID=yyy...
> +               ARRAY /dev/md2  level=raid10 num-devices=4 metadata=1.02
> name=server1_storage UUID=zzz...
> 
> and finally, 
> 
> 	mkinitrd
> 	reboot
> 
> How's that look?

Mostly good.

NeilBrown


> 
> Ariel
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2013-08-14 23:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 16:26 Request for help with "1st time through" RAID array renaming ariel.work
2013-08-14 17:27 ` ariel.work
2013-08-14 23:46   ` NeilBrown [this message]
2013-08-15  0:22     ` ariel.work
2013-08-16 18:13       ` ariel.work

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=20130815094636.3f804c9f@notabene.brown \
    --to=neilb@suse.de \
    --cc=ariel.work@fmgirl.com \
    --cc=linux-raid@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).