On Tue, 30 Aug 2011 12:12:03 +0200 Alexander Kühn <alexander.kuehn@xxxxxxxxxx> wrote: > > Zitat von NeilBrown <neilb@xxxxxxx>: > > > On Thu, 25 Aug 2011 19:14:45 -0700 Dan Williams <dan.j.williams@xxxxxxxxx> > > wrote: > > > >> mdadm -E /dev/sda --dump=foo > >> > >> Creates a sparse file image of /dev/sda named foo with a copy of the > >> metadata instance found by -E. > >> > >> When used in the opposite direction: > >> > >> mdadm -E foo --dump=/dev/sda > >> > >> ...can restore metadata to a given block device, assuming it is > >> identical size to the dump file. > > > > Suppose we did have a separate 'restore' function - what would it look like? > > An option to create? > > > > mdadm --create --restore=some-directory /dev/sda /dev/sdb > > > > Yes, from a UI perspective having separate dump/restore options is > better. Since there is also dump(8)/restore(8) it would also keep the > nomenclature. > Otherwise I would rather name it "copy-metadata" or something as with > copying the user is or should be aware that the order or arguments > matters. > Alex. Nearly two years later, I've committed some functionality based on this. mdadm --dump=/root/md /dev/* will create files in /root/md/ with metadata from any device with metadata recognised by mdadm. mdadm --restore=/root/md /dev/* will restore it all. More details in the man page. http://git.neil.brown.name/git?p=mdadm.git;a=blob;f=mdadm.8.in;h=c8559dae8e789a30e0c4ee826745a42980629977;hb=74db60b00a43a5ae636477c10c24e923e76049ce NeilBrown
Attachment:
signature.asc
Description: PGP signature