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

Some design issues with autopartkit



I looking at autopartkit again, and have a few issues I would like to
get some comments and suggestions on.

autopartkit is a d-i udeb to automatically partition the hard drives,
make the file system, mount everything on /target/, and create
/target/etc/fstab.  It works quite well, but will _wipe clean all your
hard drives_ if you use it.  This is intentional and by design.  I'm
am working on making it more flexible, and less destructive. :)


First of all, I want to rewrite the program make it easier to change
which partition table to use.  At the moment, it will fetch
debian-installer/profile and use this to choose which table to use
from /etc/autopartkit/*.table.  The mapping from profile to table is
hard coded.  I would like to make this more flexible, and easier to
change.  I want to split autopartkit into two packages, one for the
active code, and one for the tables and mapping used by Skolelinux.

I plan to do this by changing autopartkit to load the table specified
in it's debconf variable autopartkit/partition_table.  But I also want
to let other packages modify the content of this variable before
autopartkit gets the question.

I could solve this by letting other udeb packages supply scripts which
will be executed by the autopartkit udeb, something like prebaseconfig
is doing at the moment.  But how do I make sure that the udeb with
this script is installed before autopartkit is installed?  I believe I
want some 'Install-before: autopartkit' in debian/control.  Is there
another way?

Is it OK for me to create /usr/lib/autopartkit.d/ for script fragments
to run before autopartkit is executed?


The next issue I am thinking about is how to handle LVM mount points
in autopartkit.  At the moment, the tables in /etc/autoparkit/*.table
looks something like this:

  /mount/point  file-system  min-size max-size

At the moment all file systems supported by libparted is supported, in
addition to 'default' (decided at compile time) and 'lvm' (create
partition with type Linux LVM).

Now that LVM is available in d-i, I am planning to add support for
creating LVM logical volumes, and use them for the system directories.
But I am a bit unsure how to specify this in the config file.  I guess
for each LVM partition I need to specify which volume group it should
be part of, and for each LVM mount point, I need to specify volume
group name (vg_name), logical volume name (lv_name).  I have one idea
using ':' as separators.  The LVM partitions could thus be changed to
something like this:

  vg_name  lvm  min-size  max-size

The LVM mounting points could be specified like this:

  /mount/point  lvm:vg_name:lv_name:file-system  min-size  max-size

This would make it fairly easy to extend the format to support other
volume managers (evms comes to mind).  Is there some reason to not use
colon as a separator?  I would use slash '/' instead.

  /mount/point  lvm/vg_name/lv_name/file-system  min-size  max-size

It just seem less correct to me.  On the other hand, there is no
reason to store all the extra information in the filesystem filed.  I
could just add another field into the format, and store all the extra
info in the option field.

  /mount/point  file-system  min-size  max-size  options

Anyone have any opinions on this issue?



Reply to: