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

Re: Moving mdadm raid volume to new OS install



Shane Johnson wrote:
> Sam Martin wrote:
> >>
...174 lines snipped...

It would be super awesome if you would trim the previously quoted
material to just the parts you are responding to before mailing.  Thanks.

> From my experience you have to manually put it in there.  Going from
> memory, I believe that *mdadm -E --scan > /etc/mdadm/mdadm.conf *should do
> the trick.  I would do it without the redirect first to make sure you just
> get the information in the right format.  If it's not correct a
> quick Google search should locate the correct command to get it in there.
> I read a lot of recommendations that you just add it by hand but the above
> method worked for me.

The mdadm man page describes the command in the examples section.

  man mdadm

I would not use a '>' to truncate and rewrite the file.  Since there
are other things in that file I think it is best to merge the two by
hand.  The man page documents needing the DEVICE directive for
example.  But along with it are these that would be lost:

  # 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

Not having those means that the compiled in defaults will be used.
Which are probably fine and the same.  But there is still the man page
documented need for the DEVICE directive.  Better to write the output
to a temporary file location and then merge them in by hand.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: