linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolinux.com>
To: Linux LVM mailing list <linux-lvm@msede.com>
Cc: idsfa@visi.com
Subject: [linux-lvm] LVM support for LILO
Date: Thu, 7 Sep 2000 12:25:07 -0600 (MDT)	[thread overview]
Message-ID: <200009071825.MAA08578@lynx.turbolabs.com> (raw)

Heinz,
Michael Kellen and I have been working to add LILO support for booting
from a LV (i.e. have /boot be an LV, and then not have ANY DOS partitions).

However, the main problem that we are having is that you cannot use
an LV device major/minor to do anything with liblvm.  All of the liblvm
functions use an LV name, it would be good to add an ioctl which takes
a dev_t (e.g. 0x3a01) and returns an LV name, or maybe an lv_t which
we can use with liblvm.  Along the same lines, it may be good to have
an ioctl which takes a dev_t and returns a vg_t of the VG which this LV
is a part of.  Finally, it would be good to take the code out of lvm_map()
which only does block/dev remapping (which lvm_map() will call), but
which also be called by an ioctl like FIBMAP.

How this all fits together is:

1) LILO gets the name of a kernel image (e.g. /boot/vmlinuz) and does stat()
   on it to get the dev_t.

2) LILO does FIBMAP ioctl for each block in the kernel image to find the
   absolute block on the dev_t, and stores this into boot.map.

We need to take the LV dev_t and map it to an lv_t.  Then after LILO does
the FIMBAP on a file block (which returns an LV relative block number),
we need to call a function (ioctl) with (lv_t, lv_block) to return the PV
(dev_t, block), which will then be stored in the boot.map.  LILO needs
the underlying dev_t, because this is translated into a BIOS drive number.

All of these things are relatively easy to do, but it is useless if it
is not in the standard LVM code.  Mapping from a LV dev_t to an lv_t is
simply checking MAJOR(dev) == LVM_MAJOR, return lv[MINOR(dev) + 1] or so.
Doing the block remapping is already in lvm_map(), and just needs to be
moved into a separate function that can be called via ioctl.

Cheers, Andreas

             reply	other threads:[~2000-09-07 18:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-07 18:25 Andreas Dilger [this message]
2000-09-07 21:43 ` [linux-lvm] LVM support for LILO Andi Kleen
2000-09-07 22:39   ` Andreas Dilger
2000-09-07 22:46     ` Andi Kleen
2000-09-07 23:44       ` Andreas Dilger
2000-09-08 14:25         ` Andi Kleen
2000-09-08  0:11   ` Heinz J. Mauelshagen
2000-09-07 22:14     ` Andi Kleen
2000-09-07 23:00     ` Andi Kleen
2000-09-08  0:02 ` Heinz J. Mauelshagen
2000-09-07 23:29   ` Andreas Dilger
2000-09-08 13:02     ` Heinz J. Mauelshagen
2000-09-08 13:47       ` Luca Berra
2000-09-08 19:09         ` Heinz J. Mauelshagen
2000-09-08 14:03     ` Michael J Kellen
2001-02-27  0:30       ` Ralph Jennings
  -- strict thread matches above, loose matches on Subject: below --
2000-09-08 19:39 Andreas Dilger
2000-09-08 19:50 Andreas Dilger
2000-09-09  7:44 ` Luca Berra
2000-09-09 10:07 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200009071825.MAA08578@lynx.turbolabs.com \
    --to=adilger@turbolinux.com \
    --cc=idsfa@visi.com \
    --cc=linux-lvm@msede.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).