Re: [PATCH] ignore partition table on disks with AIX label

From: Valdis . Kletnieks
Date: Wed May 17 2006 - 04:54:11 EST


On Wed, 17 May 2006 10:13:14 +0200, Olaf Hering said:
>
> The on-disk data structures from AIX are not known, also the filesystem
> layout is not known. There is a msdos partition signature at the end of
> the first block, and the kernel recognizes 3 small (and overlapping) partitions.
> But they are not usable. Maybe the firmware uses it to find the bootloader
> for AIX, but AIX boots also if the first block is cleared.
>
> Handle the whole disk as empty disk.
> This fixes also YaST who compares the output from parted (and formerly fdisk)
> with /proc/partitions. fdisk recognizes the AIX label since a long time,
> SuSE has a patch for parted to handle the disk label as unknown.

One has to wonder if it might not be better to treat this case as
"one partition covering the entire disk", or even better, decode the AIX LVM
info and see if there's any LVM segments present on the disk, so as to limit
the chances of accidentally splatting live data.

The first 64K of the disk (a 'Physical Volume' in AIX LVM jargon) is
a Volume Group Descriptor Area (VGDA) described in <sys/bootrecord.h>

"The VGDA consists of

* BOOTRECORD: - first 512 bytes. Allows the Read Only System (ROS) to boot system
* BAD BLK DIRECTORY - found in <sys/bddir.h>
* LVM RECORD - found in <lvmrec.h>"

(from http://www.ahinc.com/aix/logicalvol.htm)

I'd attach the .h files in question (we have AIX boxes here still), but they
have IBM copyrights on them. Best either play "Chinese Wall" or have somebody
in IBM OK the use of the .h files...

Attachment: pgp00000.pgp
Description: PGP signature