tech-userlevel archive

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

Re: fdisk behavior on a gpt partitioned disks



On Fri, 29 May 2009, Mike M. Volokhov wrote:

On Fri, 29 May 2009 16:28:14 +0300 Mike M. Volokhov wrote:
On Fri, 29 May 2009 06:05:55 -0700 (PDT) Paul Goyette wrote:
On Fri, 29 May 2009, Mike M. Volokhov wrote:

The patch implements the following logic:

- always warn if disk have GPT

- in interactive mode: explicitly warn that any change to MBR will
 result in GPT removal, ask for confirmation, and remove GPT

- in non-interactive mode: remove GPT and explicitly note this fact

Wouldn't it be more reasonable to have a new command-line option to
remove the GPT? In non-interactive mode without the new option, if the

Probably no. To be fair, operator should use "gpt destroy" instead.

GPT exists the command should fail with a non-zero exit status (and an
appropriate error message).

You're right. I'm going to implement it via "double force" option (-ff).

Hrm, why looking to the fdisk(8) documentation I found the following:

        -f      Run fdisk in a non-interactive mode... Any [...]
                partitions which overlap the requested part of the disk
                will be silently deleted.

So it seems that fdisk already have behavior similar to the new one
(with GPT), therefore single -f is quite enough here. I.e. I'm done
with it (except documentation, of course).

Yeah, you're right. I personally abhor "silently deleted", but in my day job I'm a customer service engineer; "silently deleted" means more phone calls from surprised customers. :)

As I said before, any additional options would be extra so as "gpt
destroy" is intended to do the main work - use it, and fdisk should
provide just a reliable way to perform MBR style partitioning. Also,
please note that gpt(8) behaves similarly - it replaces (i.e. destroys
in fact) MBR partition table with GPT protective one.

Yup.  I'm satisfied.


-------------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:      |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul at whooppee.com   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index