linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] SuSE/LVM boot problem
@ 2000-05-02  5:20 Marco Shaw
  2020-11-27 16:17 ` Michael Marxmeier
  0 siblings, 1 reply; 23+ messages in thread
From: Marco Shaw @ 2000-05-02  5:20 UTC (permalink / raw)
  To: linux-lvm

I lost my floppy with lilo on it.  Now I have to reconstruct it.  I've
tried booting in rescue mode, but even the rescue SuSE CD doesn't appear to
have LVM support.

What can I do at this point?

Thanks,
Marco

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: [linux-lvm] SuSE/LVM boot problem
@ 2000-05-03  7:38 Michael Marxmeier
  2000-05-03 16:53 ` dgould
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Marxmeier @ 2000-05-03  7:38 UTC (permalink / raw)
  To: linux-lvm

Forwarded message from Andreas Dilger <adilger@turbolabs.com>

-------- Original Message --------
From: Andreas Dilger <adilger@turbolabs.com>
Message-Id: <200005030309.e4339BK11871@webber.adilger.net>
Subject: Re: [linux-lvm] SuSE/LVM boot problem
In-Reply-To: <20000502232221.A20803@gondor.com> "from Jan Niehusmann
at May 2,
 2000 11:22:21 pm"
To: Jan Niehusmann <list039@gondor.com>
Date: Tue, 2 May 2000 21:09:10 -0600 (MDT)

Jan writes:
> > On this topic, what is needed to make lvm work for both / and /boot with
> > full lilo support? I think it somewhat limits the utility of lvm not to
> > be able to make a fully lvm system, and might be tempted to do some of
> > the heavy lifting if it is not too gruesome.
> 
> I can imagine two ways to make lilo work with lvm:
> 
> 1) at install time (when you run /sbin/lilo), lilo maps the logical (lvm)
> locations to physical locations and writes these to the boot block. The boot
> code doesn't need to be changed.
> 
> Option 1 is way easier to implement, but has one big disadvantage: Whenever
> you move physical extents, you have to re-run lilo.
> 
> Both ways, you may end up with the kernel (or parts of it) moved to
> a drive that's not accessible by lilo.  (while the 1024-cylinder-limit
> is gone, there are still drives that are accessible by linux but not by
> the bios, for example scsi drives on a controller without bios)

I don't think that these limitations are very serious.  You can always
put some restrictions on how /boot is created under LVM (e.g. must be
contiguous or on a BIOS visible disk).  I assume it is possible with
lvcreate to force creation of an LV on a specific PV, at least.  With
the newer LILO, there is no longer the 1024 cylinder limit either, so
as long as the kernel is on a single disk, LILO can boot it.

It might be nice to allow LILO to boot from a mirrored /boot LV, by
having it internally think there are two kernels involved, or by
having it write slightly different boot sectors to the mirror drives
used (i.e. if we are using /dev/hda1 and /dev/hdb1 to mirror /boot,
LILO could go through /etc/lilo.conf once with root=/dev/hda and once
with root=/dev/hdb).  However, this is not a requirement at all - get
LILO to work with /boot in an LV, and you've won 90% of the battle.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of
antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               --
Dogbert

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: [linux-lvm] SuSE/LVM boot problem
@ 2000-05-03 18:09 Andreas Dilger
  2000-05-03 21:01 ` Eric M. Hopper
  0 siblings, 1 reply; 23+ messages in thread
From: Andreas Dilger @ 2000-05-03 18:09 UTC (permalink / raw)
  To: Linux LVM mailing list

David Gould writes:
> > Option 1 is way easier to implement, but has one big disadvantage: Whenever
> > you move physical extents, you have to re-run lilo.

> Yes. Would it be reasonable to have LVM tools check for this and warn
> the user?

You need to re-run LILO even if you move the kernel on a regular filesystem,
so I don't think it's that important if LVM doesn't warn you about this.
How often do you move LVs around anyways?  If you keep them in your /boot
LV and it's only a couple of PPs in size, it shouldn't be an issue.  Under
AIX, you are forced to have your boot LV contiguous (which I think LILO
doesn't need, as long as it is a single disk), and you are still required
to run "bosboot" if you move or mirror your BLV.

> If I have understood this, we need the following to make this
> work (some of this may already exist):
> 
>  - lvm needs to have a way of tracking/enforcing/satisfying the constraint
>    that specified lvs need to be in the bios bootable physical area

I think this can mostly be left up to the sysadmin for now.  I think if
LILO can handle LVs at all, it already complains if your kernel isn't
in a BIOS bootable area.

>  - lilo needs to understand about lvm and use the lvm provided ways to
>    get physical mappings.

How does LILO do this now?  It currently gets a filename for the kernel,
and that's it.  It must do some sort of internal calculation or IOCTL to
get the physical block numbers on the disk.  Is the problem that it does
its calculations w.r.t. the start of the partition?

>  - the kernel needs to be able to reconstruct enough of the lvm
>    descriptors to mount / at boot time.

You could always require that the / partition be contiguous, so it can
initially be mounted as ext2 directly.  If you want to resize your root
filesystem, you have to migrate the blocks after it to another location,
or move the whole LV to a contiguous region large enough for the new
size and re-run LILO.  I think it is already possible to specify an offset
into a block device for the / filesystem (think bootfloppy), so the kernel
could mount /dev/hda1 + X blocks read-only at boot, and when it goes to
mount read/write it remounts /dev/rootvg/lv00 as read-write.

I think I need to dig a bit more into the LILO code to see what's really
happening there.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: [linux-lvm] SuSE/LVM boot problem
@ 2000-05-03 23:50 Andreas Dilger
  2000-05-04  2:28 ` dgould
  2000-05-04  2:38 ` Eric M. Hopper
  0 siblings, 2 replies; 23+ messages in thread
From: Andreas Dilger @ 2000-05-03 23:50 UTC (permalink / raw)
  To: Linux LVM mailing list

Eric M. Hopper writes:
> 	One idea for making this happens is to have a way of locking
> logical extents to physical extents so that you have to use a special
> command to unlock them.  This kind of thing is already done in different
> parts of LVM to make sure you don't delete logical volumes that are in
> use, or remove physical volumes that still have extents allocated to
> them.

> 	One this exists, altering lilo to detect LVM, and automatically
> lock the necessary logical->physical extent mappings isn't too hard.

> 	Well, the problem is that moving a few physical extents does not
> obviously suggest re-running lilo.  Many physical extents are fine to
> move, and trying to keep track of which physical extents lilo cares
> about, and which one's it doesn't isn't a task I think a sysadmin should
> have to deal with.

I agree.  If it is possible/easy to already do this, I would say do it.
I'm also saying that if it isn't possible (or if it is, but it's a lot
of work), then it isn't really a show stopper.  People don't often move
their kernels around, and if they do, there is no indication that LILO
should be run either.  The /boot filesystem (or / if no /boot) is special
in other ways as well, and I don't think many sysadmins will have a problem
with remembering not to move it.

> 	While I expected that /boot would have to be ext2fs, and
> allocated a very generous 50M to it, I purposely compiled lvm into the
> kernel in the hopes of one day having an lvm / parition.  Of course,
> resizing an lvm / partition is a dicey affair.  :-)

Why do you say that?  You can resize it while it is mounted:
http://ext2resize.sourceforge.net/

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

^ permalink raw reply	[flat|nested] 23+ messages in thread
* RE: [linux-lvm] SuSE/LVM boot problem
@ 2000-05-04 12:18 Shaw, Marco
  0 siblings, 0 replies; 23+ messages in thread
From: Shaw, Marco @ 2000-05-04 12:18 UTC (permalink / raw)
  To: Linux LVM mailing list

You've all seen this?

http://lwn.net/980514/a/resizefs.html

Marco

> -----Original Message-----
> From:	Eric M. Hopper [SMTP:hopper@omnifarious.mn.org]
> Sent:	May 3, 2000 11:38 PM
> To:	Linux LVM mailing list
> Subject:	Re: [linux-lvm] SuSE/LVM boot problem
> 
> On Wed, May 03, 2000 at 05:50:57PM -0600, Andreas Dilger wrote:
> > 
> > Why do you say that?  You can resize it while it is mounted:
> > http://ext2resize.sourceforge.net/
> 
> 	Thanks for pointing this out to me.  I had been illegally using
> Partition Magic's utility.  :-)  Although, I may very well buy a copy of
> that program because it's so useful.
> 
> Have fun (if at all possible),
> -- 
> Its name is Public Opinion.  It is held in reverence. It settles
> everything.
> Some think it is the voice of God.  Loyalty to petrified opinion never yet
> broke a chain or freed a human soul.     ---Mark Twain
> -- Eric Hopper (hopper@omnifarious.mn.org
> http://omnifarious.mn.org/~hopper) --

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2020-11-27 16:17 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-02  5:20 [linux-lvm] SuSE/LVM boot problem Marco Shaw
2020-11-27 16:17 ` Michael Marxmeier
2000-05-02 18:41   ` dgould
2000-05-02 21:22     ` Jan Niehusmann
2000-05-02 22:18       ` Heinz Mauelshagen
2000-05-03 10:05       ` Ulf Bartelt
2000-05-31  8:40       ` Andi Kleen
2000-05-03  0:15     ` Marco Shaw
2000-05-03  7:38 Michael Marxmeier
2000-05-03 16:53 ` dgould
2000-05-31  9:01   ` Andi Kleen
2000-05-31 16:13     ` Christoph Hellwig
2000-05-31 16:18       ` Andi Kleen
2000-05-31 18:25         ` Michael Marxmeier
2000-06-01 12:15           ` Ulf Bartelt
2000-06-01  9:01     ` David Gould
2000-05-03 18:09 Andreas Dilger
2000-05-03 21:01 ` Eric M. Hopper
2000-05-03 23:50 Andreas Dilger
2000-05-04  2:28 ` dgould
2000-05-04  5:21   ` Michael Loftis
2000-05-04  2:38 ` Eric M. Hopper
2000-05-04 12:18 Shaw, Marco

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).