Re: Re: General question
Stephan von Krawczynski <[email protected]>
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Organization | ith Kommunikationstechnik GmbH |
| Message-ID | <[email protected]> |
On Tue, 7 Jun 2005 19:14:22 +0200 (MET DST) "Peter T. Breuer" <[email protected]> wrote: > "Also sprach Stephan von Krawczynski:" > > How can I mark a certain mirror partition as new (increase event counter > > manually)? > > I'm afraid I don't REALLy know, but I suspect if I looked into the > latest version of mdadm, the option would be there to manipulate things > like that. I hoped that, but was not able to find a corresponding option so far. > > > I would like to be able to write to a secondary mirror partition mounted > > locally, while primary is dead. Then, after primary comes up again, md > > should know somehow that the primary is outdated ... > > Err - I think you are trying to dictate the direction in which resync is > done? Yes, thats right. > I'm pretty sure that everything should work right automatically. It does not, I checked that. Basic reason is: Jun 7 18:50:15 mail-a01 kernel: md: ndb's event counter: 00000000 Jun 7 18:50:15 mail-a01 kernel: md: nda's event counter: 00000000 Jun 7 18:50:15 mail-a01 kernel: md: md0: raid array is not clean -- starting background reconstruction Jun 7 18:50:15 mail-a01 kernel: md: RAID level 1 does not need chunksize! Continuing anyway. Jun 7 18:50:15 mail-a01 kernel: md0: max total readahead window set to 124k Jun 7 18:50:15 mail-a01 kernel: md0: 1 data-disks, max readahead per data-disk: 124k Jun 7 18:50:15 mail-a01 kernel: raid1: device ndb operational as mirror 1 Jun 7 18:50:15 mail-a01 kernel: raid1: device nda operational as mirror 0 Jun 7 18:50:15 mail-a01 kernel: raid1: raid set md0 not clean; reconstructing mirrors Jun 7 18:50:15 mail-a01 kernel: raid1: raid set md0 active with 2 out of 2 mirrors Jun 7 18:50:15 mail-a01 kernel: md: syncing RAID array md0 And after that the data I wrote raid-offline to ndb is gone.... > The event cunt on the primary will be old, so it will be resynced from > the secndary when the primary is brought into the mirror. The problem is that the event counter is obviously not updated if the fs is not mounted via enbd but locally. As seen above both counters are zero, although I wrote 30 M data to the partition that ndb uses. > But you can always force such things with mkraid --dangerous-no-resync > followed by a bit of setfaulty, remove, and add. Well, manually: yes. Only I wanted to be able to flag/mark simply the newer mirror partition so that the normal resync knows what to do. This does not actually sound complicated, but I can't see the correct way ... Regards, Stephan