[sheepdog] [PATCH 4/4] dog: make repairing vdi optional

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Aug 22 09:09:45 CEST 2013


At Thu, 22 Aug 2013 13:56:39 +0800,
Liu Yuan wrote:
> 
> On Thu, Aug 22, 2013 at 01:01:43PM +0900, MORITA Kazutaka wrote:
> > From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> > 
> > Basically, sheepdog doesn't allow multiple clients against the same
> > vdi, so consistency repair is not safe when there may be a VM who uses
> > the image.  This patch makes automatic repair optional to reduce the
> > risk of corrupting the image, and show confirm message when it is not
> > specified.
> 
> What about I don't specify '-C' but specify '-A' for vdi check? Have option C
> and A makes 'vdi check' hard to use. I think if user specify '-C', it implies
> 'yes' to fix any consistency found in the process

I don't think it's a good idea to mixing consistency check and
auto-repair.  'vdi check' will be complex either way because there
still remain a lot of things to be added for vdi health checking;
snapshot relation check, vdi object corruption check, etc.
Auto-repair should be disable for all of them by default, and it looks
bad to treat consistency check as a special case.

If it is not good to have many check options, how about creating
subcommands for specifying a check type?

E.g.

  dog vdi check existence      # existence check
  dog vdi check consistency    # consistency check
  dog vdi check relation       # snapshot relation check
  dog vdi check inode          # inode coruption check
  dog vdi check all            # full check

and '-A' means auto-repair.

Or if '-C' is acceptable, the following may be cleaner
  dog vdi check replica        # check replica (do consistency check with '-C')
  dog vdi check relation       # snapshot relation check
  dog vdi check inode          # inode coruption check
  dog vdi check all            # full check

Thanks,

Kazutaka



More information about the sheepdog mailing list