Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   How to recreate a dmraid RAID array with mdadm (http://www.linux-archive.org/debian-user/454103-how-recreate-dmraid-raid-array-mdadm.html)

Mike Viau 11-17-2010 09:36 PM

How to recreate a dmraid RAID array with mdadm
 
> On Wed, 17 Nov 2010 14:15:14 +1100 <neilb@suse.de> wrote:
>
> This looks wrong. mdadm should be looking for the container as listed in
> mdadm.conf and it should find a matching uuid on sda and sdb, but it doesn't.
>
> Can you:
>
> mdadm -E /dev/sda /dev/sdb ; cat /etc/mdadm/mdadm.conf
>
> so I can compare the uuids?
>

Sure.

# definitions of existing MD arrays ( So you don't have to scroll down :P )


ARRAY metadata=imsm UUID=084b969a:0808f5b8:6c784fb7:62659383

ARRAY /dev/md/OneTB-RAID1-PV container=084b969a:0808f5b8:6c784fb7:62659383 member=0 UUID=ae4a1598:72267ed7:3b34867b:9c56497a

mdadm -E /dev/sda /dev/sdb

/dev/sda:
********* Magic : Intel Raid ISM Cfg Sig.
******* Version : 1.1.00
*** Orig Family : 601eee02
******** Family : 601eee02
**** Generation : 00001187
********** UUID : 084b969a:0808f5b8:6c784fb7:62659383
****** Checksum : 2f91ce06 correct
*** MPB Sectors : 1
********* Disks : 2
** RAID Devices : 1

* Disk00 Serial : STF604MH0J34LB
********* State : active
************ Id : 00020000
*** Usable Size : 1953520654 (931.51 GiB 1000.20 GB)

[OneTB-RAID1-PV]:
********** UUID : ae4a1598:72267ed7:3b34867b:9c56497a
**** RAID Level : 1
******* Members : 2
********* Slots : [UU]
***** This Slot : 0
**** Array Size : 1953519616 (931.51 GiB 1000.20 GB)
** Per Dev Size : 1953519880 (931.51 GiB 1000.20 GB)
* Sector Offset : 0
*** Num Stripes : 7630936
**** Chunk Size : 64 KiB
****** Reserved : 0
* Migrate State : idle
***** Map State : normal
*** Dirty State : clean

* Disk01 Serial : STF604MH0PN2YB
********* State : active
************ Id : 00030000
*** Usable Size : 1953520654 (931.51 GiB 1000.20 GB)
/dev/sdb:
********* Magic : Intel Raid ISM Cfg Sig.
******* Version : 1.1.00
*** Orig Family : 601eee02
******** Family : 601eee02
**** Generation : 00001187
********** UUID : 084b969a:0808f5b8:6c784fb7:62659383
****** Checksum : 2f91ce06 correct
*** MPB Sectors : 1
********* Disks : 2
** RAID Devices : 1

* Disk01 Serial : STF604MH0PN2YB
********* State : active
************ Id : 00030000
*** Usable Size : 1953520654 (931.51 GiB 1000.20 GB)

[OneTB-RAID1-PV]:
********** UUID : ae4a1598:72267ed7:3b34867b:9c56497a
**** RAID Level : 1
******* Members : 2
********* Slots : [UU]
***** This Slot : 1
**** Array Size : 1953519616 (931.51 GiB 1000.20 GB)
** Per Dev Size : 1953519880 (931.51 GiB 1000.20 GB)
* Sector Offset : 0
*** Num Stripes : 7630936
**** Chunk Size : 64 KiB
****** Reserved : 0
* Migrate State : idle
***** Map State : normal
*** Dirty State : clean

* Disk00 Serial : STF604MH0J34LB
********* State : active
************ Id : 00020000
*** Usable Size : 1953520654 (931.51 GiB 1000.20 GB)

----------------------------------
cat /etc/mdadm/mdadm.conf

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
ARRAY metadata=imsm UUID=084b969a:0808f5b8:6c784fb7:62659383
ARRAY /dev/md/OneTB-RAID1-PV container=084b969a:0808f5b8:6c784fb7:62659383 member=0 UUID=ae4a1598:72267ed7:3b34867b:9c56497a

# This file was auto-generated on Fri, 05 Nov 2010 16:29:48 -0400
# by mkconf 3.1.4-1+8efb9d1


-M


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BAY148-w18A88E7D84CE0213B44F26EF380@phx.gbl">http://lists.debian.org/BAY148-w18A88E7D84CE0213B44F26EF380@phx.gbl

Neil Brown 11-17-2010 11:11 PM

How to recreate a dmraid RAID array with mdadm
 
On Wed, 17 Nov 2010 17:36:23 -0500
Mike Viau <viaum@sheridanc.on.ca> wrote:

>
> > On Wed, 17 Nov 2010 14:15:14 +1100 <neilb@suse.de> wrote:
> >
> > This looks wrong. mdadm should be looking for the container as listed in
> > mdadm.conf and it should find a matching uuid on sda and sdb, but it doesn't.
> >
> > Can you:
> >
> > mdadm -E /dev/sda /dev/sdb ; cat /etc/mdadm/mdadm.conf
> >
> > so I can compare the uuids?
> >
>
> Sure.
>
> # definitions of existing MD arrays ( So you don't have to scroll down :P )
>
>
> ARRAY metadata=imsm UUID=084b969a:0808f5b8:6c784fb7:62659383
>
> ARRAY /dev/md/OneTB-RAID1-PV container=084b969a:0808f5b8:6c784fb7:62659383 member=0 UUID=ae4a1598:72267ed7:3b34867b:9c56497a
>
....
> ********** UUID : 084b969a:0808f5b8:6c784fb7:62659383
> [OneTB-RAID1-PV]:
> ********** UUID : ae4a1598:72267ed7:3b34867b:9c56497a
....
> # definitions of existing MD arrays
> ARRAY metadata=imsm UUID=084b969a:0808f5b8:6c784fb7:62659383
> ARRAY /dev/md/OneTB-RAID1-PV container=084b969a:0808f5b8:6c784fb7:62659383 member=0 UUID=ae4a1598:72267ed7:3b34867b:9c56497a

Yes, the uuids are definitely all correct.
This really should work. I just tested a similar config and it worked
exactly as exported.
Weird.

Whatever version of mdadm are you running???
Can you try getting the latest (3.1.4) from
http://www.kernel.org/pub/linux/utils/raid/mdadm/

and see how that works.
Just
make
./mdadm -Asvv

NeilBrown


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20101118111149.7b5004a2@notabene.brown">http://lists.debian.org/20101118111149.7b5004a2@notabene.brown

Mike Viau 11-17-2010 11:56 PM

How to recreate a dmraid RAID array with mdadm
 
> On Thu, 18 Nov 2010 11:11:49 +1100 <neilb@suse.de> wrote:
>
> > On Wed, 17 Nov 2010 17:36:23 -0500 Mike Viau wrote:
> >
> > > On Wed, 17 Nov 2010 14:15:14 +1100
> > >
> > > This looks wrong. mdadm should be looking for the container as listed in
> > > mdadm.conf and it should find a matching uuid on sda and sdb, but it doesn't.
> > >
> > > Can you:
> > >
> > > mdadm -E /dev/sda /dev/sdb ; cat /etc/mdadm/mdadm.conf
> > >
> > > so I can compare the uuids?
> > >
> >
> > Sure.
> >
> > # definitions of existing MD arrays ( So you don't have to scroll down :P )
> >
> > ARRAY metadata=imsm UUID=084b969a:0808f5b8:6c784fb7:62659383
> >
> > ARRAY /dev/md/OneTB-RAID1-PV container=084b969a:0808f5b8:6c784fb7:62659383 member=0 UUID=ae4a1598:72267ed7:3b34867b:9c56497a
> >
> ....
> > UUID : 084b969a:0808f5b8:6c784fb7:62659383
> > [OneTB-RAID1-PV]:
> > UUID : ae4a1598:72267ed7:3b34867b:9c56497a
> ....
>
> Yes, the uuids are definitely all correct.
> This really should work. I just tested a similar config and it worked
> exactly as exported.
> Weird.
>
> Whatever version of mdadm are you running???
> Can you try getting the latest (3.1.4) from
> http://www.kernel.org/pub/linux/utils/raid/mdadm/

I am running the same version, from a Debian Squeeze package which I presume is the same.

mdadm -V

mdadm - v3.1.4 - 31st August 2010

>
> and see how that works.
> Just
> make
> ./mdadm -Asvv

Regardless, I did recompile (attached is the make output -- no errors) and got similar mdadm output:

./mdadm -Asvv
mdadm: looking for devices for further assembly
mdadm: no RAID superblock on /dev/md126p1
mdadm: /dev/md126p1 has wrong uuid.
mdadm: no RAID superblock on /dev/md/OneTB-RAID1-PV
mdadm: /dev/md/OneTB-RAID1-PV has wrong uuid.
mdadm: no RAID superblock on /dev/dm-3
mdadm: /dev/dm-3 has wrong uuid.
mdadm: no RAID superblock on /dev/dm-2
mdadm: /dev/dm-2 has wrong uuid.
mdadm: no RAID superblock on /dev/dm-1
mdadm: /dev/dm-1 has wrong uuid.
mdadm: no RAID superblock on /dev/dm-0
mdadm: /dev/dm-0 has wrong uuid.
mdadm: no RAID superblock on /dev/loop0
mdadm: /dev/loop0 has wrong uuid.
mdadm: cannot open device /dev/sdc7: Device or resource busy
mdadm: /dev/sdc7 has wrong uuid.
mdadm: cannot open device /dev/sdc6: Device or resource busy
mdadm: /dev/sdc6 has wrong uuid.
mdadm: cannot open device /dev/sdc5: Device or resource busy
mdadm: /dev/sdc5 has wrong uuid.
mdadm: no RAID superblock on /dev/sdc2
mdadm: /dev/sdc2 has wrong uuid.
mdadm: cannot open device /dev/sdc1: Device or resource busy
mdadm: /dev/sdc1 has wrong uuid.
mdadm: cannot open device /dev/sdc: Device or resource busy
mdadm: /dev/sdc has wrong uuid.
mdadm: cannot open device /dev/sdb: Device or resource busy
mdadm: /dev/sdb has wrong uuid.
mdadm: cannot open device /dev/sda: Device or resource busy
mdadm: /dev/sda has wrong uuid.
mdadm: looking for devices for /dev/md/OneTB-RAID1-PV
mdadm: no recogniseable superblock on /dev/md126p1
mdadm/dev/md126p1 is not a container, and one is required.
mdadm: no recogniseable superblock on /dev/md/OneTB-RAID1-PV
mdadm/dev/md/OneTB-RAID1-PV is not a container, and one is required.
mdadm: no recogniseable superblock on /dev/dm-3
mdadm/dev/dm-3 is not a container, and one is required.
mdadm: no recogniseable superblock on /dev/dm-2
mdadm/dev/dm-2 is not a container, and one is required.
mdadm: no recogniseable superblock on /dev/dm-1
mdadm/dev/dm-1 is not a container, and one is required.
mdadm: no recogniseable superblock on /dev/dm-0
mdadm/dev/dm-0 is not a container, and one is required.
mdadm: no recogniseable superblock on /dev/loop0
mdadm/dev/loop0 is not a container, and one is required.
mdadm: cannot open device /dev/sdc7: Device or resource busy
mdadm/dev/sdc7 is not a container, and one is required.
mdadm: cannot open device /dev/sdc6: Device or resource busy
mdadm/dev/sdc6 is not a container, and one is required.
mdadm: cannot open device /dev/sdc5: Device or resource busy
mdadm/dev/sdc5 is not a container, and one is required.
mdadm: no recogniseable superblock on /dev/sdc2
mdadm/dev/sdc2 is not a container, and one is required.
mdadm: cannot open device /dev/sdc1: Device or resource busy
mdadm/dev/sdc1 is not a container, and one is required.
mdadm: cannot open device /dev/sdc: Device or resource busy
mdadm/dev/sdc is not a container, and one is required.
mdadm: cannot open device /dev/sdb: Device or resource busy
mdadm/dev/sdb is not a container, and one is required.
mdadm: cannot open device /dev/sda: Device or resource busy
mdadm/dev/sda is not a container, and one is required.


So what could this mean???


-M
make

gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o mdadm.o mdadm.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o config.o config.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o mdstat.o mdstat.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o ReadMe.o ReadMe.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o util.o util.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o Manage.o Manage.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o Assemble.o Assemble.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o Build.o Build.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o Create.o Create.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o Detail.o Detail.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o Examine.o Examine.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o Grow.o Grow.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o Monitor.o Monitor.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o dlink.o dlink.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o Kill.o Kill.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o Query.o Query.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o Incremental.o Incremental.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o mdopen.o mdopen.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o super0.o super0.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o super1.o super1.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o super-ddf.o super-ddf.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o super-intel.o super-intel.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o bitmap.o bitmap.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o restripe.o restripe.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o sysfs.o sysfs.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -DHAVE_STDINT_H -o sha1.o -c sha1.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o mapfile.o mapfile.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o crc32.o crc32.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o sg_io.o sg_io.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o msg.o msg.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o platform-intel.o platform-intel.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o probe_roms.o probe_roms.c
gcc -o mdadm mdadm.o config.o mdstat.o ReadMe.o util.o Manage.o Assemble.o Build.o Create.o Detail.o Examine.o Grow.o Monitor.o dlink.o Kill.o Query.o Incremental.o mdopen.o super0.o super1.o super-ddf.o super-intel.o bitmap.o restripe.o sysfs.o sha1.o mapfile.o crc32.o sg_io.o msg.o platform-intel.o probe_roms.o
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o mdmon.o mdmon.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o monitor.o monitor.c
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=""/usr/sbin/sendmail -t"" -DCONFFILE="/etc/mdadm.conf" -DCONFFILE2="/etc/mdadm/mdadm.conf" -DMAP_DIR="/dev/.mdadm" -DMAP_FILE="map" -DMDMON_DIR="/dev/.mdadm" -DUSE_PTHREADS -c -o managemon.o managemon.c
gcc -pthread -z now -o mdmon mdmon.o monitor.o managemon.o util.o mdstat.o sysfs.o config.o Kill.o sg_io.o dlink.o ReadMe.o super0.o super1.o super-intel.o super-ddf.o sha1.o crc32.o msg.o bitmap.o platform-intel.o probe_roms.o
sed -e 's/{DEFAULT_METADATA}/1.2/g' mdadm.8.in > mdadm.8
nroff -man mdadm.8 > mdadm.man
nroff -man md.4 > md.man
nroff -man mdadm.conf.5 > mdadm.conf.man
nroff -man mdmon.8 > mdmon.man

Neil Brown 11-18-2010 12:28 AM

How to recreate a dmraid RAID array with mdadm
 
On Wed, 17 Nov 2010 19:56:10 -0500
Mike Viau <viaum@sheridanc.on.ca> wrote:


> I am running the same version, from a Debian Squeeze package which I presume is the same.
>
> mdadm -V
>
> mdadm - v3.1.4 - 31st August 2010

Yes, should be identical to what I am running.
>
> >
> > and see how that works.
> > Just
> > make
> > ./mdadm -Asvv
>
> Regardless, I did recompile (attached is the make output -- no errors) and got similar mdadm output:
>
> ./mdadm -Asvv
> mdadm: looking for devices for further assembly
> mdadm: no RAID superblock on /dev/md126p1
> mdadm: /dev/md126p1 has wrong uuid.
> mdadm: no RAID superblock on /dev/md/OneTB-RAID1-PV
> mdadm: /dev/md/OneTB-RAID1-PV has wrong uuid
....
> mdadm: cannot open device /dev/sdb: Device or resource busy
> mdadm: /dev/sdb has wrong uuid.
> mdadm: cannot open device /dev/sda: Device or resource busy
> mdadm: /dev/sda has wrong uuid.

The arrays are clearly currently assembled. Trying to assemble them again is
not likely to produce a good result :-) I should have said to "./mdadm -Ss"
first.

Could you apply this patch and then test again with:

./mdadm -Ss
./mdadm -Asvvv

Thanks,
NeilBrown

diff --git a/Assemble.c b/Assemble.c
index afd4e60..11323fa 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -344,9 +344,14 @@ int Assemble(struct supertype *st, char *mddev,
if (ident->uuid_set && (!update || strcmp(update, "uuid")!= 0) &&
(!tst || !tst->sb ||
same_uuid(content->uuid, ident->uuid, tst->ss->swapuuid)==0)) {
- if (report_missmatch)
+ if (report_missmatch) {
+ char buf[200];
fprintf(stderr, Name ": %s has wrong uuid.
",
devname);
+ fprintf(stderr, " want %s
", __fname_from_uuid(ident->uuid, 0, buf, ':'));
+ fprintf(stderr, " have %s
", __fname_from_uuid(content->uuid, 0, buf, ':'));
+ fprintf(stderr, " metadata=%s
", tst->ss->name);
+ }
goto loop;
}
if (ident->name[0] && (!update || strcmp(update, "name")!= 0) &&


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20101118122847.1530d86c@notabene.brown">http://lists.debian.org/20101118122847.1530d86c@notabene.brown

Mike Viau 11-18-2010 01:05 AM

How to recreate a dmraid RAID array with mdadm
 
> On Thu, 18 Nov 2010 12:28:47 +1100 <neilb@suse.de> wrote:
> >
> > I am running the same version, from a Debian Squeeze package which I presume is the same.
> >
> > mdadm -V
> >
> > mdadm - v3.1.4 - 31st August 2010
>
> Yes, should be identical to what I am running.
> >
> > >
> > > and see how that works.
> > > Just
> > > make
> > > ./mdadm -Asvv
> >
> > Regardless, I did recompile (attached is the make output -- no errors) and got similar mdadm output:
> >
> > ./mdadm -Asvv
> > mdadm: looking for devices for further assembly
> > mdadm: no RAID superblock on /dev/md126p1
> > mdadm: /dev/md126p1 has wrong uuid.
> > mdadm: no RAID superblock on /dev/md/OneTB-RAID1-PV
> > mdadm: /dev/md/OneTB-RAID1-PV has wrong uuid
> ....
> > mdadm: cannot open device /dev/sdb: Device or resource busy
> > mdadm: /dev/sdb has wrong uuid.
> > mdadm: cannot open device /dev/sda: Device or resource busy
> > mdadm: /dev/sda has wrong uuid.
>
> The arrays are clearly currently assembled. Trying to assemble them again is
> not likely to produce a good result :-) I should have said to "./mdadm -Ss"
> first.
>
> Could you apply this patch and then test again with:
>
> ./mdadm -Ss
> ./mdadm -Asvvv
>

Applied the patch:

if (ident->uuid_set && (!update || strcmp(update, "uuid")!= 0) &&
******************* (!tst || !tst->sb ||
******************** same_uuid(content->uuid, ident->uuid, tst->ss->swapuuid)==0)) {
************************ if (report_missmatch) {
***************************** char buf[200];
******************************* fprintf(stderr, Name ": %s has wrong uuid.
",
*************************************** devname);
************************** fprintf(stderr, " want %s
", __fname_from_uuid(ident->uuid, 0, buf, ':'));
************************** fprintf(stderr, " have %s
", __fname_from_uuid(content->uuid, 0, buf, ':'));
************************** fprintf(stderr, " metadata=%s
", tst->ss->name);
******************* }
*********************** goto loop;
*************** }


And got:

./mdadm -Ss

mdadm: stopped /dev/md127


./mdadm -Asvvv

mdadm: looking for devices for further assembly
mdadm: no RAID superblock on /dev/dm-3
mdadm: /dev/dm-3 has wrong uuid.
*want UUID-084b969a:0808f5b8:6c784fb7:62659383
Segmentation fault


I took the liberty of extending the char buffer to 2000 bytes/chars and 64K (1<<16) but got the same segfaults.


-M


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BAY148-w149179108DC6D340247236EF390@phx.gbl">http://lists.debian.org/BAY148-w149179108DC6D340247236EF390@phx.gbl

GeraldCC 11-18-2010 01:18 AM

How to recreate a dmraid RAID array with mdadm
 
On Thursday, November 18, 2010 10:11:49 am Neil Brown wrote:
> On Wed, 17 Nov 2010 17:36:23 -0500
>
> Mike Viau <viaum@sheridanc.on.ca> wrote:
> > > On Wed, 17 Nov 2010 14:15:14 +1100 <neilb@suse.de> wrote:
> > >
> > > This looks wrong. mdadm should be looking for the container as listed
> > > in mdadm.conf and it should find a matching uuid on sda and sdb, but
> > > it doesn't.
> > >
> > > Can you:
> > >
> > > mdadm -E /dev/sda /dev/sdb ; cat /etc/mdadm/mdadm.conf
> > >
> > > so I can compare the uuids?
> >
> > Sure.
> >
> > # definitions of existing MD arrays ( So you don't have to scroll down :P
> > )
> >
> >
> > ARRAY metadata=imsm UUID=084b969a:0808f5b8:6c784fb7:62659383
> >
> > ARRAY /dev/md/OneTB-RAID1-PV
> > container=084b969a:0808f5b8:6c784fb7:62659383 member=0
> > UUID=ae4a1598:72267ed7:3b34867b:9c56497a
>
> ....
>
> > UUID : 084b969a:0808f5b8:6c784fb7:62659383
> > [OneTB-RAID1-PV]:
> > UUID : ae4a1598:72267ed7:3b34867b:9c56497a
>
> ....
>
> > # definitions of existing MD arrays
> > ARRAY metadata=imsm UUID=084b969a:0808f5b8:6c784fb7:62659383
> > ARRAY /dev/md/OneTB-RAID1-PV
> > container=084b969a:0808f5b8:6c784fb7:62659383 member=0
> > UUID=ae4a1598:72267ed7:3b34867b:9c56497a
>
> Yes, the uuids are definitely all correct.
> This really should work. I just tested a similar config and it worked
> exactly as exported.
> Weird.
>
> Whatever version of mdadm are you running???
> Can you try getting the latest (3.1.4) from
> http://www.kernel.org/pub/linux/utils/raid/mdadm/
>
> and see how that works.
> Just
> make
> ./mdadm -Asvv
>
> NeilBrown
Hi,
I am just starting to use RAID on my systems and it was suggested that I make
sure my drives were set to raid by:---- "fdisk -l"
This should say that the relavent drives are set to "raid auto-detect".
Gerald


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201011181218.13724.gcsgcatling@bigpond.com">http://lists.debian.org/201011181218.13724.gcsgcatling@bigpond.com

Neil Brown 11-18-2010 01:32 AM

How to recreate a dmraid RAID array with mdadm
 
On Wed, 17 Nov 2010 21:05:40 -0500
Mike Viau <viaum@sheridanc.on.ca> wrote:


> ./mdadm -Ss
>
> mdadm: stopped /dev/md127
>
>
> ./mdadm -Asvvv
>
> mdadm: looking for devices for further assembly
> mdadm: no RAID superblock on /dev/dm-3
> mdadm: /dev/dm-3 has wrong uuid.
> *want UUID-084b969a:0808f5b8:6c784fb7:62659383
> Segmentation fault

Try this patch instead please.

NeilBrown

diff --git a/Assemble.c b/Assemble.c
index afd4e60..11e6238 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -344,9 +344,17 @@ int Assemble(struct supertype *st, char *mddev,
if (ident->uuid_set && (!update || strcmp(update, "uuid")!= 0) &&
(!tst || !tst->sb ||
same_uuid(content->uuid, ident->uuid, tst->ss->swapuuid)==0)) {
- if (report_missmatch)
+ if (report_missmatch) {
+ char buf[200];
fprintf(stderr, Name ": %s has wrong uuid.
",
devname);
+ fprintf(stderr, " want %s
", __fname_from_uuid(ident->uuid, 0, buf, ':'));
+ fprintf(stderr, " tst=%p sb=%p
", tst, tst?tst->sb:NULL);
+ if (tst) {
+ fprintf(stderr, " have %s
", __fname_from_uuid(content->uuid, 0, buf, ':'));
+ fprintf(stderr, " metadata=%s
", tst->ss->name);
+ }
+ }
goto loop;
}
if (ident->name[0] && (!update || strcmp(update, "name")!= 0) &&




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20101118133247.7ffa99d1@notabene.brown">http://lists.debian.org/20101118133247.7ffa99d1@notabene.brown

Mike Viau 11-18-2010 02:03 AM

How to recreate a dmraid RAID array with mdadm
 
> On Thu, 18 Nov 2010 13:32:47 +1100 <neilb@suse.de> wrote:
> > ./mdadm -Ss
> >
> > mdadm: stopped /dev/md127
> >
> >
> > ./mdadm -Asvvv
> >
> > mdadm: looking for devices for further assembly
> > mdadm: no RAID superblock on /dev/dm-3
> > mdadm: /dev/dm-3 has wrong uuid.
> > want UUID-084b969a:0808f5b8:6c784fb7:62659383
> > Segmentation fault
>
> Try this patch instead please.

Applied new patch and got:

./mdadm -Ss

mdadm: stopped /dev/md127


./mdadm -Asvvv
mdadm: looking for devices for further assembly
mdadm: no RAID superblock on /dev/dm-3
mdadm: /dev/dm-3 has wrong uuid.
*want UUID-084b969a:0808f5b8:6c784fb7:62659383
*tst=0x10dd010 sb=(nil)
Segmentation fault


Again tried various buffer sizes (segfault above was with char buf[200];)


if (ident->uuid_set && (!update || strcmp(update, "uuid")!= 0) &&
*** (!tst || !tst->sb ||
**** same_uuid(content->uuid, ident->uuid, tst->ss->swapuuid)==0)) {
******* if (report_missmatch) {
************ char buf[1<<16];
*************** fprintf(stderr, Name ": %s has wrong uuid.
",
*********************** devname);
********* fprintf(stderr, " want %s
", __fname_from_uuid(ident->uuid, 0, buf, ':'));
************ fprintf(stderr, " tst=%p sb=%p
", tst, tst?tst->sb:NULL);
************ if (tst) {
********************** fprintf(stderr, " have %s
", __fname_from_uuid(content->uuid, 0, buf, ':'));
*********************** fprintf(stderr, " metadata=%s
", tst->ss->name);
************ }
*** }
******* goto loop;
}



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BAY148-w494B0F5EB60CC742DFC817EF390@phx.gbl">http://lists.debian.org/BAY148-w494B0F5EB60CC742DFC817EF390@phx.gbl

Neil Brown 11-18-2010 02:17 AM

How to recreate a dmraid RAID array with mdadm
 
On Wed, 17 Nov 2010 22:03:41 -0500
Mike Viau <viaum@sheridanc.on.ca> wrote:

>
> > On Thu, 18 Nov 2010 13:32:47 +1100 <neilb@suse.de> wrote:
> > > ./mdadm -Ss
> > >
> > > mdadm: stopped /dev/md127
> > >
> > >
> > > ./mdadm -Asvvv
> > >
> > > mdadm: looking for devices for further assembly
> > > mdadm: no RAID superblock on /dev/dm-3
> > > mdadm: /dev/dm-3 has wrong uuid.
> > > want UUID-084b969a:0808f5b8:6c784fb7:62659383
> > > Segmentation fault
> >
> > Try this patch instead please.
>
> Applied new patch and got:
>
> ./mdadm -Ss
>
> mdadm: stopped /dev/md127
>
>
> ./mdadm -Asvvv
> mdadm: looking for devices for further assembly
> mdadm: no RAID superblock on /dev/dm-3
> mdadm: /dev/dm-3 has wrong uuid.
> *want UUID-084b969a:0808f5b8:6c784fb7:62659383
> *tst=0x10dd010 sb=(nil)
> Segmentation fault

Sorry... I guess I should have tested it myself..

The
if (tst) {

Should be

if (tst && content) {

NeilBrown


>
>
> Again tried various buffer sizes (segfault above was with char buf[200];)
>
>
> if (ident->uuid_set && (!update || strcmp(update, "uuid")!= 0) &&
> *** (!tst || !tst->sb ||
> **** same_uuid(content->uuid, ident->uuid, tst->ss->swapuuid)==0)) {
> ******* if (report_missmatch) {
> ************ char buf[1<<16];
> *************** fprintf(stderr, Name ": %s has wrong uuid.
",
> *********************** devname);
> ********* fprintf(stderr, " want %s
", __fname_from_uuid(ident->uuid, 0, buf, ':'));
> ************ fprintf(stderr, " tst=%p sb=%p
", tst, tst?tst->sb:NULL);
> ************ if (tst) {
> ********************** fprintf(stderr, " have %s
", __fname_from_uuid(content->uuid, 0, buf, ':'));
> *********************** fprintf(stderr, " metadata=%s
", tst->ss->name);
> ************ }
> *** }
> ******* goto loop;
> }
>
>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20101118141718.44c1837f@notabene.brown">http://lists.debian.org/20101118141718.44c1837f@notabene.brown

Mike Viau 11-18-2010 04:10 AM

How to recreate a dmraid RAID array with mdadm
 
> On Thu, 18 Nov 2010 14:17:18 +1100 <neilb@suse.de> wrote:
> >
> > > On Thu, 18 Nov 2010 13:32:47 +1100 wrote:
> > > > ./mdadm -Ss
> > > >
> > > > mdadm: stopped /dev/md127
> > > >
> > > >
> > > > ./mdadm -Asvvv
> > > >
> > > > mdadm: looking for devices for further assembly
> > > > mdadm: no RAID superblock on /dev/dm-3
> > > > mdadm: /dev/dm-3 has wrong uuid.
> > > > want UUID-084b969a:0808f5b8:6c784fb7:62659383
> > > > Segmentation fault
> > >
> > > Try this patch instead please.
> >
> > Applied new patch and got:
> >
> > ./mdadm -Ss
> >
> > mdadm: stopped /dev/md127
> >
> >
> > ./mdadm -Asvvv
> > mdadm: looking for devices for further assembly
> > mdadm: no RAID superblock on /dev/dm-3
> > mdadm: /dev/dm-3 has wrong uuid.
> > want UUID-084b969a:0808f5b8:6c784fb7:62659383
> > tst=0x10dd010 sb=(nil)
> > Segmentation fault
>
> Sorry... I guess I should have tested it myself..
>
> The
> if (tst) {
>
> Should be
>
> if (tst && content) {
>

Apply update and got:

mdadm: /dev/sdb is identified as a member of /dev/md/imsm0, slot -1.
mdadm: /dev/sda is identified as a member of /dev/md/imsm0, slot -1.
mdadm: added /dev/sda to /dev/md/imsm0 as -1
mdadm: added /dev/sdb to /dev/md/imsm0 as -1
mdadm: Container /dev/md/imsm0 has been assembled with 2 drives
mdadm: looking for devices for /dev/md/OneTB-RAID1-PV


Full output at: http://paste.debian.net/100103/
expires:

2010-11-21 06:07:30
-M




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BAY148-w508672292A737E86BE8332EF390@phx.gbl">http://lists.debian.org/BAY148-w508672292A737E86BE8332EF390@phx.gbl


All times are GMT. The time now is 01:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.