tech-kern archive

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

Re: Adding an ioctl to check for disklabel existence



On Wed 02 Oct 2019 at 19:40:01 -0700, John Nemeth wrote:
>      Cloning disks always presents issues.  However, gpt(8) has
> grown a "uuid" command to generate new UUIDs.  This was primarily
> done to help with the cloning problem.  Cloning a disk and then
> putting two disks with the same UUIDs on the same system is an
> operator error.

I was thinking the other day that it might be useful if gpt had a
subcommand to spit out a script to duplicate the partitioning of a disk,
but without the "unique" parts. The script would of course be
hand-editable for any changes one might want to make.

Such functionality would be the equivalent of using disklabel to get the
editable text-version of a disklabel from one disk, and applying it to a
different disk.

I use this sort of thing if I want to create a backup disk which should
have the same layout as the original.

There is "gpt backup", but the manual page mentions "It should not be
modified" and it contains the guids of the partition which in many cases
should NOT be duplicated. It also isn't very readable.

The intermediate solution I have used so far is to partition my disks in
all cases using a simple script, and keep the script corresponding to
each disk, so that I can use it again later. But if you didn't
originally partition a disk this way, it doesn't help.

-Olaf.
-- 
Olaf 'Rhialto' Seibert -- rhialto at falu dot nl
___  Anyone who is capable of getting themselves made President should on
\X/  no account be allowed to do the job.       --Douglas Adams, "THGTTG"

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index