xfs
[Top] [All Lists]

Re: Disk Geometry/Partition API

To: "Quang Nguyen (Ngo)" <quang.nguyen@xxxxxxxxxxxx>
Subject: Re: Disk Geometry/Partition API
From: Keith Owens <kaos@xxxxxxx>
Date: Fri, 04 Jan 2002 11:37:52 +1100
Cc: "'linux-xfs@xxxxxxxxxxx'" <linux-xfs@xxxxxxxxxxx>
In-reply-to: Your message of "Thu, 03 Jan 2002 15:42:09 -0800." <ACD4093EB009D411BC8A009027D7699660A183@xxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Thu, 3 Jan 2002 15:42:09 -0800 , 
"Quang Nguyen (Ngo)" <quang.nguyen@xxxxxxxxxxxx> wrote:
>I'm writing a backup utility, which hopefully will handle full disaster
>recovery in case of a disk failure.  I want it to backup not only the data,
>ACL, etc, but also disk geometry and partition information.  This
>information will be used during the recovery procedure to recreate the
>partitions the original disk had with an option of resizing, etc...
>
>The app is Linux based, but I want it to be aware of other partitions
>created by a different OS as well.  I studied the source code of fdisk and
>sfdisk, /usr/include/linux/genhd.h hdreg.h so I have some ideas.  However, I
>wondered if there are C functions available that simplify the task.  I also
>need some documents on the ioctl commands specified in hdreg.h.

Look at the GNU partition editor (parted).
http://www.fsf.org/software/parted/parted.html


<Prev in Thread] Current Thread [Next in Thread>