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

MORITA Kazutaka morita.kazutaka at gmail.com
Thu Aug 22 18:33:54 CEST 2013


At Fri, 23 Aug 2013 00:27:37 +0800,
Liu Yuan wrote:
> 
> On Fri, Aug 23, 2013 at 01:22:41AM +0900, MORITA Kazutaka wrote:
> > At Fri, 23 Aug 2013 00:15:30 +0800,
> > Liu Yuan wrote:
> > > 
> > > On Fri, Aug 23, 2013 at 12:11:41AM +0800, Liu Yuan wrote:
> > > > On Fri, Aug 23, 2013 at 01:03:32AM +0900, MORITA Kazutaka wrote:
> > > > > At Thu, 22 Aug 2013 22:45:43 +0800,
> > > > > Liu Yuan wrote:
> > > > > > 
> > > > > > Actually I think users should not know any options at all. Anyone tries to run
> > > > > > vdi check, is just to check the health of the targeted vdi.
> > > > > 
> > > > > I agree to this, but...
> > > > > 
> > > > > > 
> > > > > > >  - It's difficult to maintain bash_completion_dog and dog.8 if we
> > > > > > >    allow the option list.
> > > > > > > 
> > > > > > > How about adding only one option "-o, --online", which filters unsafe
> > > > > > > check/repair when the vdi is in use?
> > > > > > > 
> > > > > > > E.g.
> > > > > > > 
> > > > > > > $ vdi check                   # This tries full check.
> > > > > > > $ vdi check --online          # This filters consistency check since it
> > > > > > >                               # doesn't work if the vdi is in use
> > > > > > > 
> > > > > > > $ vdi check --repair          # This tries full check and repair
> > > > > > > $ vdi check --repair --online # This does only existence check since
> > > > > > >                               # the other tests are not safe against online vdi.
> > > > > > > 
> > > > > > 
> > > > > > From the view of ordinary user, I think concept like existence, inode, consistency
> > > > > > won't make too much difference to them. If I were the user, I'd expect
> > > > > > 
> > > > > > $ vdi check # this will check the health and report the problem if any
> > > > > > $ vdi check -r # if problems reported, users can decide to repair, whatever problem is
> > > > > > 
> > > > > > That is all. For advanced users,
> > > > > > $ vdi check -o {option list}
> > > > > > or
> > > > > > $ vdi check -opt1 -opt2 -opt2 # for easier bash_completion_dog generation.
> > > > > 
> > > > > please take into account the user who are not familiar with the
> > > > > detailed option but want to check without stopping VMs.  Online health
> > > > > checking is definitely necessary and I know actual users who need it
> > > > > inside and outside my company.  SAN storages also usually support
> > > > > scheduled health checking (without stopping storage service, of
> > > > > course).
> > > > > 
> > > > 
> > > > can't we simply make 'vdi check' safe against online runing vm?
> > > > 
> > > 
> > > After we are reported that something goes wrong with 'vdi check', then users can
> > > decide whether to stop vms to 'vdi check -r' against broken one.
> > 
> > Consistency checking reads all the replicas.  If the vm updates the
> > object at the same, 'vdi check' reports a false alarm.  Is there any
> > way to prevent it?
> > 
> 
> I think we can skip consistency check for runing vm, can't we?

Then,

[for online check]
 $ dog vdi check

[for full check]
 $ dog vdi check -o consistency
or
 $ dog vdi check --cosistency   # this one is the same as what my patch implemented

Right?

Thanks,

Kazutaka



More information about the sheepdog mailing list