Startup Script trouble in RH6.2
Hello,
OK, the newbie did a little reading and a little experimentation :)
The old FAQ I had didn't mention anything about startup scripts for RH, but the "new" one does. So, that's where I started.
I've got a generic RH6.2 box except for a 2.2.18 kernel with
LVM patches installed (and a few other patches). For experimenting purposes, I've got one volume group (vg1) and one logical volume (home_vg1). I created the lvm script and the symlinks as indicated in the FAQ (a symlink from /etc/rc.d/rc3.d/S20lvm to /etc/rc.d/init.d/lvm). I've also put a line in my fstab that looks like:
/dev/vg1/home_vg1 /home ext2 noauto,defaults 1 1
In RH, before entering run level 3, in the rc.sysinit script,
it scans for filesystems that can be checked (fsck). However, since it hasn't reached rc3.d, lvm has not activated the VGs nor the LVs. What I did to get around this was to modify rc.sysinit. I'd rather not do this. Does anyone have any suggestions how to get around this? (I'd rather not manually mount the filesystems in rc.local or something like that). However, if the suggested alternative is to modify rc.sysinit, where in the script should I put the lvm startyp? Should it be after loading the modules, but before adding the RAID devices?
TIA,
Jeff Layton
In article <[email protected]> you write:
Quoted 3 lines
However, if the suggested alternative is to modify rc.sysinit, where in the script should I put the lvm startyp? Should it be after loading the modules, but before adding the RAID devices?
I modified rc.sysinit - I put in vgscan and vgchange just before the "Mounting local filesystems" bit. I also put a vgchange -an in /etc/rc.d/init.d/halt just before remounting / ro.
Signature · 2 lines
Dave Meyer [email protected]
Quoted 8 lines · [email protected] wrote:
In article <[email protected]> you write:
Quoted 3 lines
However, if the suggested alternative is to modify rc.sysinit, where in the script should I put the lvm startyp? Should it be after loading the modules, but before adding the RAID devices?
I modified rc.sysinit - I put in vgscan and vgchange just before the "Mounting local filesystems" bit. I also put a vgchange -an in
/etc/rc.d/init.d/haltjust before remounting / ro.
I did the same thing and it works fine. But, I was hoping for some script magic from somebody to avoid this (I'm working with a company that ships RH based distributions with a custom kernel and they want to limit any changes to the standard RH init scripts).
Thanks!
Jeff
Quoted 9 lines
--
Dave Meyer
[email protected]
_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
Quoted 2 lines · Jeff Layton
I created the lvm script and the symlinks as indicated in the FAQ (a symlink from
/etc/rc.d/rc3.d/S20lvmto/etc/rc.d/init.d/lvm).
The faq is wrong, IMHO. The LVM startup should be done as early as possible. If it is in run level 3, this is "network server level", so far to late if you have any local LVM filesystems.
Quoted 2 lines
What I did to get around this was to modify rc.sysinit. I'd rather not do this. Does anyone have any suggestions how to get around this?
No, this is the correct place. Unfortunately, the current startup doesn't let you split rc.sysinit any further.
Quoted 3 lines
However, if the suggested alternative is to modify rc.sysinit, where in the script should I put the lvm startyp? Should it be after loading the modules, but before adding the RAID devices?
I put it after RAID startup, since it is possible to build LVM devices on top of MD devices (modulo MD bugs in the code that keep showing up). It is also possible to build MD on top of LVM, but this is much less commonly done.
Cheers, Andreas
Signature · 3 lines
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/ -- DogbertQuoted 3 lines · Andreas Dilger
The faq is wrong, IMHO. The LVM startup should be done as early as possible. If it is in run level 3, this is "network server level", so far to late if you have any local LVM filesystems.
especially when /usr happens to be a lv. due to the problems from the howto with the startup-scripts I've had to boot in single-user-mode to get stuff up at the moment, which I sadly have to do alot since 2.4.2-pre4 locks hard within hours of boot.
Signature · 2 lines
Terje - who finally started to run LVM after a hardware crash killed
uptime.