bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parted check option


From: Thomas Roelz
Subject: Re: parted check option
Date: Thu, 16 Nov 2000 11:50:50 +0100

Andrew Clausen wrote:
> 
> Hi Tom :-)
> 
> Thomas Roelz wrote:
> >
> > Hi all!
> >
> > As far as I found out by now parted is (luckily) very
> > defensive with regard to doing what it is requested to do.
> > If something with the disk is not entirely okay it refuses
> > to start work. This is very good because it reduces the
> > chance to destroy something. Now I wonder if it would be
> > useful to have a check option to find out if parted _would_
> > execute the required action but _without_ doing it actually.
> > This feature might be useful for elaborate error handling
> > when running parted in script mode from a shell script or
> > such like.
> 
> Hmmm.
>
> > I know there is a check option but according to the
> > documentation it does only a "simple check on the file system".
> > I think there are more checks built in that could be accomplished
> > prior to execution.
>
> I'm not sure I understand what you mean by this.  i.e. "elaborate
> error handling", etc. ?
>
> The only case I can think of, is when you want to run many
> commands, and you want to check that your entire list of commands
> is do-able.  But, the approach you suggest won't work in the
> general case.  (eg: think about "swapping partitions", by: shrink A,
> shrink B, move A past B, grow A, grow B)  In this case, you have
> to "verify" the entire operation list in one go.
<snip>

Sorry for having been unclear with this...

Let me explain it a bit further. As you might have noticed we at
SuSE want to use parted within our installation workflow (Yes,
parted is a marvelous piece of software ;-)). In this context it
would be helpful to have the action related check option mentioned
above because the user might prearrange some installation specific
things (i.e. create some partitions, select packages to be installed
and such like). All this will be actually done later in the workflow,
so it would be nice to see if it is possible beforehand. Certainly I
agree that this is not possible for overlapping disk actions as
mentioned by you. But it could be helpful for "simple" one-step-actions
like resizing an existing partition. Since parted already _does_ check
the situation prior to doing something it should be not too difficult
to implement such a check-only-option using some kind of
"this is for real" flag in the relevant code parts.

BTW: How about the progress meter we talked about a few weeks ago?

Best Regards,

Tom

-- 
  ---------------------------------------------------  
           Mind your head and keep it simple !        
  ---------------------------------------------------  
  __     __  __  Thomas Roelz        -     address@hidden 
 (__    (__ [_   SuSE Labs           -  0911/74053-707
 ___)(_|___)[___ Schanzaeckerstr. 10 - 90443 Nuernberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]