[parted-devel] ped_partition_is_flag_available doesn't work on freepartitions

Colin Watson cjwatson at ubuntu.com
Sun Jul 12 23:05:26 UTC 2009


On Fri, Jul 10, 2009 at 04:06:47PM +0200, Gilles Espinasse wrote:
> Colin Watson wrote:
> > None of the disklabel implementors of partition_is_flag_available appear
> > to care about the partition at all right now, although I suppose some
> > future implementor might (I've heard rumours that some SPARC systems
> > don't seem to support LVM physical volumes right at the start of the
> > disk, for instance).
> 
> I don't know for LVM but having tested raid1 on sparc, I noted in my script
>  if [ x$install_type = x"raid" ]; then
>   # first cylinder can't be used in raid case as swap or md use the first
> blocks
>   # disk block 0 and 1 are used by silo to write partition and second.b
>   parted_call "$dev mkpart ext2 1cyl ${root_size}MiB"
>  else
>   # ext2 does not use the first blocks contrary to swap and md partitions
>   parted_call "$dev mkpart ext2 0 ${root_size}MiB"
>  fi

OK. That suggests that it would be useful to have an interface that's
identical to the current ped_partition_is_flag_available, except that it
also permits the supplied PedPartition to be of type
PED_PARTITION_FREESPACE - e.g. "could I create a RAID partition in this
space?". What would be a good name for this interface?

Shouldn't this information about RAID not being permitted on the first
cylinder be added to sun_partition_is_flag_available, rather than being
scattered around various people's scripts? Likewise swap, presumably,
except that it would have to go in sun_partition_set_system (?). Maybe
Gilles could work up a patch for that, if he has a local test
environment?

-- 
Colin Watson                                       [cjwatson at ubuntu.com]



More information about the parted-devel mailing list