Re: help needed with mdctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday February 25, carlos@fisica.ufpr.br wrote:
> Neil Brown (neilb@cse.unsw.edu.au) wrote on 25 February 2002 21:34:
..
>  >Try putting
>  >
>  >   DEVICE /dev/sd*
>  >or maybe
>  >   DEVICE /dev/scsi/host?/bus?/target?/lun0/part?
>  >
>  >into /etc/mdctl.conf
>  >along with
>  >
>  >   ARRAY /dev/md2 super_minor=2
>  >
>  >and then run
>  > mdctl -v -Asf /dev/md2 
> 
> It aborts with
> 
> mdctl: unrecognised word on ARRAY line: super_minor=2
> mdctl: ARRAY line /dev/md2 has no identity information.
> mdctl: /dev/md2 not identified in config file.

Sorry, it should be "super-minor": a hyphen instead of an underscore.

> 
> I put the ? in the file...

yep.  That's right.

> 
>  >This should scan all partitions of all scsi devices looking for super
>  >blocks which say that they belong to /dev/md2.  It should then try to
>  >assemble them, re-writing the superblocks if necessary.
> 
> Is there a syntax where we can specify the partitions, and it
> discovers the order by itself???

Yes. just list the partitions:
   mdctl -Avf /dev/md2 /dev/partition /dev/otherpartition etc....

Alternately, the ARRAY line in /etc/mdctl.conf can be

   ARRAY /dev/md2 partition1,partition2,partition3,...

where the partitions don't have to be in order.

> 
>  >> Is it possible to build a raidtab and user mkraid --really-force even
>  >> with one faulty drive? It's easy to discover the partitions, but what
>  >> about the order of the disks?
> 
> Does this really mean that I can reconstruct the superblocks with
> mkraid --really-force?? If so, mdctl should probably be able to do it also.

Certainly.  You can remake the array with

 mdctl -C /dev/md2 -level=whatever --chunk=whatever \
   --raid-disks=whatever list of partitions in order

This would be effectively that same as what mkraid --really-force
does.

NeilBrown
-
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

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux