All of lore.kernel.org
 help / color / mirror / Atom feed
* mdadm problem
@ 2010-03-21 18:26 Graeme Gemmill
  2010-03-21 18:51 ` Tom Carlson
  0 siblings, 1 reply; 7+ messages in thread
From: Graeme Gemmill @ 2010-03-21 18:26 UTC (permalink / raw)
  To: linux-raid

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

I would be very grateful for advice on removing all traces of a previous 
mdadm attempt to create a 3-disk RAID 5 setup so that I can try again 
(or give some advice to solve the problem).
Mandriva 2010.0, mdadm v3.0.2
I had apparently created the RAID 5 set using /dev/sda, /dev/sdc, 
/dev/sdd. I could write to it locally but not from the PC that has the 
data I want to protect, but couldn't stop it(some message to the effect 
that the devise was busy? Can't remember).
I therefore re-installed Mandriva 2010.0, used fdisk to create a single 
partition on each of the three disks but was unable to create the array. 
I was very surprised to find that /proc/mdstat appeared to have survived 
the re-install although mdadm appears not to recognise elements of the 
array (See attachment). Furthermore the existence of /dev/sda1 as a 
RAID-type partition appears to cause elements of the Mandriva Control 
Centre to exit abnormally (the program blkid -o udev -p /dev/sda doesn't 
work).
Some RAID expertise would be very welcome!
TIA
Graeme Gemmill

[-- Attachment #2: mdadmOutput --]
[-- Type: text/plain, Size: 8527 bytes --]

# fdisk /dev/sda
Command (m for help): p
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x699d5c03                     
   Device Boot      Start         End      Blocks   Id  System
Command (m for help): n
Command action         
   e   extended                                                                                                                                              
   p   primary partition (1-4)                                                                                                                               
p                                                                                                                                                            
Partition number (1-4): 1                                                                                                                                    
First cylinder (1-60801, default 1):                                                                                                                         
Using default value 1                                                                                                                                        
Last cylinder, +cylinders or +size{K,M,G} (1-60801, default 60801):                                                                                          
Using default value 60801                                                                                                                                    
                                                                                                                                                             
Command (m for help): t                                                                                                                                      
Selected partition 1                                                                                                                                         
Hex code (type L to list codes): fd                                                                                                                          
Changed system type of partition 1 to fd (Linux raid autodetect)                                                                                             
                                                                                                                                                             
Command (m for help): p                                                                                                                                      
                                                                                                                                                             
Disk /dev/sda: 500.1 GB, 500107862016 bytes                                                                                                                  
255 heads, 63 sectors/track, 60801 cylinders                                                                                                                 
Units = cylinders of 16065 * 512 = 8225280 bytes                                                                                                             
Disk identifier: 0x699d5c03                                                                                                                                  
                                                                                                                                                             
   Device Boot      Start         End      Blocks   Id  System                                                                                               
/dev/sda1               1       60801   488384001   fd  Linux raid autodetect                                                                                
                                                                                                                                                             
Command (m for help): w                                                                                                                                      
The partition table has been altered!                                                                                                                        
                                                                                                                                                             
Calling ioctl() to re-read partition table.                                                                                                                  
Syncing disks.                                                                                                                                               
[root@Bach ~]# fdisk /dev/sdc
> SNIP
   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       60801   488384001   fd  Linux raid autodetect
>SNIP                           
[root@Bach ~]# fdisk /dev/sdd
>SNIP
   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1       60801   488384001   fd  Linux raid autodetect
                           
[root@Bach ~]# mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sda1 /dev/sdc1 /dev/sdd1
mdadm: layout defaults to left-symmetric                                                                 
mdadm: chunk size defaults to 64K                                                                        
mdadm: layout defaults to left-symmetric                                                                 
mdadm: super0.90 cannot open /dev/sda1: Device or resource busy                                          
mdadm: layout defaults to left-symmetric                                                                 
mdadm: super1.x cannot open /dev/sda1: Device or resource busy                                           
mdadm: ddf: Cannot use /dev/sda1: Device or resource busy                                                
mdadm: Cannot use /dev/sda1: It is busy                                                                  
mdadm: device /dev/sda1 not suitable for any style of array                                              
[root@Bach ~]# cat /etc/mtab
/dev/sdb2 / ext3 rw 0 0     
none /proc proc rw 0 0      
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
gvfs-fuse-daemon /home/graeme/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=graeme 0 0
[root@Bach ~]# cat /etc/fstab
# Entry for /dev/sdb2 :      
UUID=f0c2de4f-422a-44bb-88d2-194c55dc127b / ext3 defaults 1 1
none /proc proc defaults 0 0                                 
[root@Bach ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] 
md127 : active raid5 sda[0] sdd[2] sdc[1]
      976772992 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]

unused devices: <none>
[root@Bach ~]# mdadm --stop /dev/sda
mdadm: /dev/sda does not appear to be an md device
[root@Bach ~]# mdadm --stop /dev/sdc
mdadm: /dev/sdc does not appear to be an md device
[root@Bach ~]# mdadm --zero-superblock /dev/sda1
mdadm: Couldn't open /dev/sda1 for write - not zeroing
[root@Bach ~]# mdadm --zero-superblock /dev/sda
mdadm: Couldn't open /dev/sda for write - not zeroing
[root@Bach ~]# mdadm -Q /dev/sda
/dev/sda: is not an md array
/dev/sda: device 0 in 3 device active raid5 /dev/md127.  Use mdadm --examine for more detail.
[root@Bach ~]# mdadm --examine /dev/sda
/dev/sda:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : cc526422:3aae7bc9:d6030a07:261540d2
  Creation Time : Wed Mar 17 15:53:39 2010
     Raid Level : raid5
  Used Dev Size : 488386496 (465.76 GiB 500.11 GB)
     Array Size : 976772992 (931.52 GiB 1000.22 GB)
   Raid Devices : 3
  Total Devices : 3
Preferred Minor : 127

    Update Time : Sun Mar 21 07:10:38 2010
          State : clean
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 60a86cd3 - correct
         Events : 50

         Layout : left-symmetric
     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     0       8        0        0      active sync   /dev/sda

   0     0       8        0        0      active sync   /dev/sda
   1     1       8       32        1      active sync   /dev/sdc
   2     2       8       48        2      active sync   /dev/sdd
[root@Bach ~]#

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mdadm problem
  2010-03-21 18:26 mdadm problem Graeme Gemmill
@ 2010-03-21 18:51 ` Tom Carlson
  2010-03-22 10:56   ` Graeme Gemmill
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Carlson @ 2010-03-21 18:51 UTC (permalink / raw)
  To: Graeme Gemmill; +Cc: linux-raid

On 21 March 2010 18:26, Graeme Gemmill <graeme@gemmill.name> wrote
some stuff....
> Some RAID expertise would be very welcome!

I'm no expert... but I think you need to do the following:
mdadm --stop /dev/md127
mdadm --zero-superblock /dev/sd[a-c]
mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1

All the best,

T

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mdadm problem
  2010-03-21 18:51 ` Tom Carlson
@ 2010-03-22 10:56   ` Graeme Gemmill
  0 siblings, 0 replies; 7+ messages in thread
From: Graeme Gemmill @ 2010-03-22 10:56 UTC (permalink / raw)
  To: Tom Carlson; +Cc: linux-raid

On 21/03/10 18:51, Tom Carlson wrote:
> On 21 March 2010 18:26, Graeme Gemmill<graeme@gemmill.name>  wrote
> some stuff....
>    
>> Some RAID expertise would be very welcome!
>>      
> I'm no expert... but I think you need to do the following:
> mdadm --stop /dev/md127
> mdadm --zero-superblock /dev/sd[a-c]
> mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1
>
> All the best,
>
> T
>    
Maybe not, Tom, but you're clearly well on the way to becoming one!
Steps 1& 2 worked, but the create step failed because mdadm said it 
couldn't recognise /dev/sda1.
However a reboot later and it worked.
Thanks,
Graeme

^ permalink raw reply	[flat|nested] 7+ messages in thread

* mdadm problem
@ 2011-05-24 22:05 retail.mdadm
  0 siblings, 0 replies; 7+ messages in thread
From: retail.mdadm @ 2011-05-24 22:05 UTC (permalink / raw)
  To: linux-raid

Recently I decided to upgrade my old linux based hdd enclosure:
processor arm9
kernel 2.6.12
I can't update or upgrade linux or it's kernel

So I tried to update HDDs:

When I run this command I realized that I need linear, not raid0
mdadm -Cv /dev/md0 --level=0 -n2 /dev/sda2 /dev/sdb

but when I tried to zero superblocks (I stopped md0 previously) I've
got "Segmentation fault" error..
Later I have connected my drives to PC and zeroed superblocks sucessfully,
but when I connected drives back to enclosure and tried to create
linear I've got "Segmentation fault" error again!

And from now every time I'm trying to do something via mdadm with
these drives I'm getting that "Segmentation fault" error!

I haven't tried dd if=/dev/zero of=/dev/sda2 cause my hard drive have 2Tb!

Here are my questions:
1. Can mdadm damage my hard drive(s)?
2. How to locate and zero superblocks completely? (I know that there
are two versions of superblocks.. but I don't know which one I have)

Thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mdadm problem
  2004-12-06  9:37 Jean-Yves Mertès
  2004-12-06 10:14 ` David Greaves
@ 2004-12-06 11:23 ` Luca Berra
  1 sibling, 0 replies; 7+ messages in thread
From: Luca Berra @ 2004-12-06 11:23 UTC (permalink / raw)
  To: linux-raid

On Mon, Dec 06, 2004 at 10:37:52AM +0100, Jean-Yves Mertès wrote:
>Hello!
>
>I do not know if I may receive any support about mdadm through this 
>e-mail address. If not, please, could you forward this message to the 
>appropriate box if one exists.
>
>I am currently trying to migrate a Linux partition (Mandrake 10) to RAID 
>1. To this purpose I have installed mdadm V1.8.1. The first attempt was 
>to configure an equally-sized partition of my second disk (/dev/hdb) as 
>part of a degraded RAID 1 device. Unfortunately, starting the array 
>fails. The following shows pieces of information that should help  
>understanding the case:
there is no 1.8.1 mdadm in Mandrake 10, please use the mdadm shipped
with the distro.

L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \
-
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mdadm problem
  2004-12-06  9:37 Jean-Yves Mertès
@ 2004-12-06 10:14 ` David Greaves
  2004-12-06 11:23 ` Luca Berra
  1 sibling, 0 replies; 7+ messages in thread
From: David Greaves @ 2004-12-06 10:14 UTC (permalink / raw)
  To: jym; +Cc: linux-raid

Jean-Yves Mertès wrote:

> Hello!
>
> I do not know if I may receive any support about mdadm through this 
> e-mail address. If not, please, could you forward this message to the 
> appropriate box if one exists.
>
> I am currently trying to migrate a Linux partition (Mandrake 10) to 
> RAID 1. To this purpose I have installed mdadm V1.8.1.

This is an experimental version:

This is a "development" release of mdadm.  It should *not* be
considered stable and should be used primarily for testing.
The current "stable" version is 1.8.0.


> The first attempt was to configure an equally-sized partition of my 
> second disk (/dev/hdb) as part of a degraded RAID 1 device. 
> Unfortunately, starting the array fails. The following shows pieces of 
> information that should help  understanding the case:
>
> The command I use is:
> mdadm -C /dev/md0 --metadata=1 --level=raid1 --raid-devices=2 missing 
> /dev/hdb5 -v
>
> To which mdadm answers:
> mdadm: /dev/hdb5 appears to contain an ext2fs file system
>    size=4843912K  mtime=Thu Dec  2 17:11:54 2004
> mdadm: /dev/hdb5 appears to be part of a raid array:
>    level=1 devices=2 ctime=Sat Dec  4 18:28:46 2004
> mdadm: size set to 4843904K
> Continue creating array? y
> VERS = 9000
> mdadm: ADD_NEW_DISK for /dev/hdb5 failed: Invalid argument

_possibly_ because

Version 1 superblocks requires 2.6.10 or a recent 2.6.10-rc snapshot


Try agin with 1.8.0 and if you have probs then yell :)

HTH
David
-
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* mdadm problem
@ 2004-12-06  9:37 Jean-Yves Mertès
  2004-12-06 10:14 ` David Greaves
  2004-12-06 11:23 ` Luca Berra
  0 siblings, 2 replies; 7+ messages in thread
From: Jean-Yves Mertès @ 2004-12-06  9:37 UTC (permalink / raw)
  To: linux-raid

Hello!

I do not know if I may receive any support about mdadm through this 
e-mail address. If not, please, could you forward this message to the 
appropriate box if one exists.

I am currently trying to migrate a Linux partition (Mandrake 10) to RAID 
1. To this purpose I have installed mdadm V1.8.1. The first attempt was 
to configure an equally-sized partition of my second disk (/dev/hdb) as 
part of a degraded RAID 1 device. Unfortunately, starting the array 
fails. The following shows pieces of information that should help  
understanding the case:

The command I use is:
mdadm -C /dev/md0 --metadata=1 --level=raid1 --raid-devices=2 missing 
/dev/hdb5 -v

To which mdadm answers:
mdadm: /dev/hdb5 appears to contain an ext2fs file system
    size=4843912K  mtime=Thu Dec  2 17:11:54 2004
mdadm: /dev/hdb5 appears to be part of a raid array:
    level=1 devices=2 ctime=Sat Dec  4 18:28:46 2004
mdadm: size set to 4843904K
Continue creating array? y
VERS = 9000
mdadm: ADD_NEW_DISK for /dev/hdb5 failed: Invalid argument

Running cat /proc/mdstat, it appears that the array has not been 
started, despite it (and the corresponding superblock) seems having been 
created:
/dev/hdb5:
          Magic : a92b4efc
        Version : 01.00
     Array UUID : 67458b6bc6:237b3269:983c6473:483366
           Name :
  Creation Time : Sat Dec  4 18:45:49 2004
     Raid Level : raid1
   Raid Devices : 2

    Device Size : 9687808 (4.62 GiB 4.96 GB)
   Super Offset : 9687808 sectors
    Device UUID : 67458b6bc6:237b3269:983c6473:483366
    Update Time : Sat Dec  4 18:45:49 2004
       Checksum : b1fb29ae - correct
         Events : 1


   Array State : _U 383 spares


Checking the log files, here is what I found:
Dec  4 18:45:49 localhost kernel: md: invalid raid superblock magic on hdb5
Dec  4 18:45:49 localhost kernel: md: hdb5 has invalid sb, not importing!
Dec  4 18:45:49 localhost kernel: md: md_import_device returned -22

So I tried to start the array by means of the -A switch together with an 
/etc/mdadm.conf file I filled in manually:
mdadm -A -s /dev/md0 -v

Here is the result:
mdadm: looking for devices for /dev/md0
Segmentation fault

A look at the log files gives:
Dec  4 19:01:41 localhost kernel: md: md0 stopped.

This log appears very strange to me since the array was not running ;-)

I have not succeeded in finding some directions to understand the 
problem. I hope someone could help me.

Best regards.

Jean-Yves MERTES

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-05-24 22:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-21 18:26 mdadm problem Graeme Gemmill
2010-03-21 18:51 ` Tom Carlson
2010-03-22 10:56   ` Graeme Gemmill
  -- strict thread matches above, loose matches on Subject: below --
2011-05-24 22:05 retail.mdadm
2004-12-06  9:37 Jean-Yves Mertès
2004-12-06 10:14 ` David Greaves
2004-12-06 11:23 ` Luca Berra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.