Phil Turmel <philip@xxxxxxxxxx> writes: > Good morning Neil, > > On 10/20/2015 09:35 PM, Neil Brown wrote: > >> Nothing dumb about that - you don't need a --backup option. >> If you did, mdadm would have complained. >> >> You only need --backup when the size of the array is unchanged or >> decreasing. > >> mdadm reads the first few stripes and stores them somewhere in each of >> the spares. md (in the kernel) then reads those stripes again and >> writes them out in the new configuration. It appears that one of the >> writes failed, others might have succeeded. This may not have corrupted >> anything (the first few blocks are in the same position for both the old >> and new layout) but it might have done. > >> If you do want to look for the backup, it is around about the middle of >> the device and has some metadata which contains the string >> "md_backup_data-1". If you find that, you are close to getting the >> backup data back. > > Hmmm. This feature has advanced beyond my last look at the code. I was > under the impression the backup option was only optional when mdadm > could move the data offset. Does this new algorithm apply to v0.90 > metadata, a v3.2 kernel, and v3.2.5 mdadm? > It isn't a new algorithm, it is the original algorithm. In mdadm-2.4-pre1 (march 2006), you couldn't specify a backup file, but you could grow a raid5 to more devices. That was changed by a patch with comment: Allow resize to backup to a file. To support resizing an array without a spare, mdadm now understands --backup-file= which should point to a file for storing a backup of critical data. This can be given to --grow which will create the file, or --assemble which will restore from the file if needed. The backup-file was subsequently used to support in-place reshapes and array shrinking. NeilBrown
Attachment:
signature.asc
Description: PGP signature