* [linux-lvm] Slackware init
@ 2001-02-25 18:33 ardy
2001-02-25 23:52 ` AJ Lewis
0 siblings, 1 reply; 9+ messages in thread
From: ardy @ 2001-02-25 18:33 UTC (permalink / raw)
To: linux-lvm
I've set up LVM on a slackware 7.0 box, its working for the most part, I
have some oddities I'd like to clear up as I may not be initializing LVM
correctly at boot. I'm trying to mount the volumes from fstab, when the
other partitions get mounted after /.
I have the following in fstab:
/dev/ws_scsi/ws_scsi_01 /home reiserfs defaults 1 1
/dev/ws_scsi/ws_scsi_02 /mnt/scsi reiserfs defaults 1 1
I have lvm as a module, and two modules.conf aliases for it:
alias block-major-58 lvm-mod
alias char-major-109 lvm-mod
I have placed the two lvm startup commands in rc.S right after / is
mounted read-write:
# Remount the root filesystem in read-write mode
echo "Remounting root device with read-write enabled."
/sbin/mount -w -v -n -o remount /
# Initialize Logical Volume Manager
/sbin/vgscan
/sbin/vgchange -ay
What happens is when vgscan starts, it takes about 1.5 minutes to scan,
and while its scanning, the kernel is reporting a whole lot of modprobe
errors for modules I don't have/need. What I ended up doing was aliasing
off the block-major devices that were being scanned that I don't have on
my system:
alias block-major-9 off
alias block-major-22 off
alias block-major-33 off
alias block-major-34 off
alias block-major-48 off
alias block-major-49 off
alias block-major-50 off
alias block-major-51 off
alias block-major-52 off
alias block-major-53 off
alias block-major-54 off
alias block-major-55 off
Consequently, the loop block module gets loaded because it too is scanned.
After the 1.5 minute scan, everything is mounted from fstab, including the
LVM volumes.
Also, I had written my own rc.lvm, and was calling it at the end of rc.S,
now this worked, but wasn't exactly what I wanted, since what I want is
for the volumes to load from fstab with the rest of the partitions.
But the scan only took a few moments when done this way.
So, am I doing something incorrectly here?
Why is the scan taking so long?
Why are devices nonexistent on my machine being scanned for?
Is there a better way to implement this under Slackware?
Thanks,
R. Dicaire
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Slackware init
2001-02-25 18:33 [linux-lvm] Slackware init ardy
@ 2001-02-25 23:52 ` AJ Lewis
2001-02-26 12:08 ` ardy
0 siblings, 1 reply; 9+ messages in thread
From: AJ Lewis @ 2001-02-25 23:52 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 1727 bytes --]
On Sun, Feb 25, 2001 at 01:33:05PM -0500, ardy@rdb.linux-help.org wrote:
> What happens is when vgscan starts, it takes about 1.5 minutes to scan,
> and while its scanning, the kernel is reporting a whole lot of modprobe
> errors for modules I don't have/need. What I ended up doing was aliasing
> off the block-major devices that were being scanned that I don't have on
> my system:
>
> alias block-major-9 off
> alias block-major-22 off
> alias block-major-33 off
> alias block-major-34 off
> alias block-major-48 off
> alias block-major-49 off
> alias block-major-50 off
> alias block-major-51 off
> alias block-major-52 off
> alias block-major-53 off
> alias block-major-54 off
> alias block-major-55 off
>
> Consequently, the loop block module gets loaded because it too is scanned.
> After the 1.5 minute scan, everything is mounted from fstab, including the
> LVM volumes.
Are you by chance using a 2.4.x kernel with devfs support compiled in, but
not being mounted? I am seeing the same thing with that setup.
--
AJ Lewis
Sistina Software Inc. Voice: 612-379-3951
1313 5th St SE, Suite 111 Fax: 612-379-3952
Minneapolis, MN 55414 E-Mail: lewis@sistina.com
http://www.sistina.com
Current GPG fingerprint = 3B5F 6011 5216 76A5 2F6B 52A0 941E 1261 0029 2648
Get my key at: http://www.sistina.com/~lewis/gpgkey
(Unfortunately, the PKS-type keyservers do not work with multiple sub-keys)
-----Begin Obligatory Humorous Quote----------------------------------------
Carpe Aptenodytes! (Seize the Penguins!)
-----End Obligatory Humorous Quote------------------------------------------
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Slackware init
2001-02-25 23:52 ` AJ Lewis
@ 2001-02-26 12:08 ` ardy
2001-02-26 14:27 ` AJ Lewis
0 siblings, 1 reply; 9+ messages in thread
From: ardy @ 2001-02-26 12:08 UTC (permalink / raw)
To: linux-lvm
On Sun, 25 Feb 2001, AJ Lewis wrote:
> Are you by chance using a 2.4.x kernel with devfs support compiled in, but
> not being mounted? I am seeing the same thing with that setup.
Yes, 2.4.2, no devfs.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Slackware init
2001-02-26 12:08 ` ardy
@ 2001-02-26 14:27 ` AJ Lewis
2001-02-26 17:29 ` Andreas Dilger
2001-02-26 21:39 ` [linux-lvm] " ardy
0 siblings, 2 replies; 9+ messages in thread
From: AJ Lewis @ 2001-02-26 14:27 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]
On Mon, Feb 26, 2001 at 07:08:55AM -0500, ardy@rdb.linux-help.org wrote:
> On Sun, 25 Feb 2001, AJ Lewis wrote:
>
> > Are you by chance using a 2.4.x kernel with devfs support compiled in, but
> > not being mounted? I am seeing the same thing with that setup.
>
> Yes, 2.4.2, no devfs.
I think the issue is that /proc is not yet mounted when you call vgscan.
If you look at the tools/lib/lvm_dir_cache.c file at line 90, you will
see that it checks for /proc/partitions. If it finds that, it only scans
the files in /proc/partitions. Otherwise, it goes through all the possible
devices LVM recognizes.
So if you can get /proc mounted before you call vgscan, it should not take
so long, nor should it scan for all those devices you do not have on your
system.
Regards,
--
AJ Lewis
Sistina Software Inc. Voice: 612-379-3951
1313 5th St SE, Suite 111 Fax: 612-379-3952
Minneapolis, MN 55414 E-Mail: lewis@sistina.com
http://www.sistina.com
Current GPG fingerprint = 3B5F 6011 5216 76A5 2F6B 52A0 941E 1261 0029 2648
Get my key at: http://www.sistina.com/~lewis/gpgkey
(Unfortunately, the PKS-type keyservers do not work with multiple sub-keys)
-----Begin Obligatory Humorous Quote----------------------------------------
Sometimes I have a difficult time handling myself in social situations.
I just start scampering around neurotically, frantically jumping all
over guests. I think it all goes back to when I was raised in the wild
by miniature schnauzers.
-----End Obligatory Humorous Quote------------------------------------------
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Slackware init
2001-02-26 14:27 ` AJ Lewis
@ 2001-02-26 17:29 ` Andreas Dilger
2001-02-27 0:14 ` [linux-lvm] FYI Functioning " ardy
2001-02-26 21:39 ` [linux-lvm] " ardy
1 sibling, 1 reply; 9+ messages in thread
From: Andreas Dilger @ 2001-02-26 17:29 UTC (permalink / raw)
To: linux-lvm
AJ Lewis writes:
> On Mon, Feb 26, 2001 at 07:08:55AM -0500, ardy@rdb.linux-help.org wrote:
> > On Sun, 25 Feb 2001, AJ Lewis wrote:
> >
> > > Are you by chance using a 2.4.x kernel with devfs support compiled in, but
> > > not being mounted? I am seeing the same thing with that setup.
> >
> > Yes, 2.4.2, no devfs.
>
> I think the issue is that /proc is not yet mounted when you call vgscan.
> If you look at the tools/lib/lvm_dir_cache.c file at line 90, you will
> see that it checks for /proc/partitions. If it finds that, it only scans
> the files in /proc/partitions. Otherwise, it goes through all the possible
> devices LVM recognizes.
>
> So if you can get /proc mounted before you call vgscan, it should not take
> so long, nor should it scan for all those devices you do not have on your
> system.
It is also worth mentioning that until beta5, the lvm_dir_cache() function
did not cache any of the device entries. This means that any time you wanted
to get a list of PVs (which happens quite often if you have multiple VGs),
it would do the full scan of /dev again.
Even with the proper lvm_dir_cache() operation in beta5, it still takes me
55 seconds on my laptop with a full /dev/ide (COMPAQ_SMART2) and /dev/rd
(DAC960), and only 4.5 seconds without these devices. If you don't have
these devices, feel free to delete the directories. For the next version
of the LVM tools, there will likely be a reorganization of this area so that
the whole thing will be speeded up.
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] 9+ messages in thread
* Re: [linux-lvm] Slackware init
2001-02-26 14:27 ` AJ Lewis
2001-02-26 17:29 ` Andreas Dilger
@ 2001-02-26 21:39 ` ardy
2001-02-26 22:15 ` Andreas Dilger
1 sibling, 1 reply; 9+ messages in thread
From: ardy @ 2001-02-26 21:39 UTC (permalink / raw)
To: linux-lvm
On Mon, 26 Feb 2001, AJ Lewis wrote:
> I think the issue is that /proc is not yet mounted when you call vgscan.
> If you look at the tools/lib/lvm_dir_cache.c file at line 90, you will
> see that it checks for /proc/partitions. If it finds that, it only scans
> the files in /proc/partitions. Otherwise, it goes through all the possible
> devices LVM recognizes.
>
> So if you can get /proc mounted before you call vgscan, it should not take
> so long, nor should it scan for all those devices you do not have on your
> system.
Well this is the problem, since I'm trying to mount the volumes from fstab
when mount is called, how would I go about getting /proc mounted after /
is mounted read-write, but before vgscan is run?
Have /proc mounted with a separate command in rc.S after / is remounted rw
and before vgscan is run?
Are there other alternatives, like removing unused emtries in /dev, to cut
down scan time (as was mentioned on this list earlier)?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Slackware init
2001-02-26 21:39 ` [linux-lvm] " ardy
@ 2001-02-26 22:15 ` Andreas Dilger
2001-02-26 23:21 ` ardy
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Dilger @ 2001-02-26 22:15 UTC (permalink / raw)
To: linux-lvm
Andy writes:
> On Mon, 26 Feb 2001, AJ Lewis wrote:
> > I think the issue is that /proc is not yet mounted when you call vgscan.
> > If you look at the tools/lib/lvm_dir_cache.c file at line 90, you will
> > see that it checks for /proc/partitions. If it finds that, it only scans
> > the files in /proc/partitions. Otherwise, it goes through all the possible
> > devices LVM recognizes.
>
> Well this is the problem, since I'm trying to mount the volumes from fstab
> when mount is called, how would I go about getting /proc mounted after /
> is mounted read-write, but before vgscan is run?
> Have /proc mounted with a separate command in rc.S after / is remounted rw
> and before vgscan is run?
In my Turbolinux init (I haven't used Slackware for many years), there is
an explicit mount of /proc in rc.sysinit. Later, when it is mounting the
rest of the filesystems, it uses "mount -a -t nonfs,proc", to avoid any
error messages.
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] 9+ messages in thread
* Re: [linux-lvm] Slackware init
2001-02-26 22:15 ` Andreas Dilger
@ 2001-02-26 23:21 ` ardy
0 siblings, 0 replies; 9+ messages in thread
From: ardy @ 2001-02-26 23:21 UTC (permalink / raw)
To: linux-lvm
On Mon, 26 Feb 2001, Andreas Dilger wrote:
> In my Turbolinux init (I haven't used Slackware for many years), there is
> an explicit mount of /proc in rc.sysinit. Later, when it is mounting the
> rest of the filesystems, it uses "mount -a -t nonfs,proc", to avoid any
> error messages.
Oh, this is excellent, I never thought of adding proc to that mount
command, how thoughtless of me.
That ought to about fix me up then, thank you very much!
^ permalink raw reply [flat|nested] 9+ messages in thread
* [linux-lvm] FYI Functioning Slackware init
2001-02-26 17:29 ` Andreas Dilger
@ 2001-02-27 0:14 ` ardy
0 siblings, 0 replies; 9+ messages in thread
From: ardy @ 2001-02-27 0:14 UTC (permalink / raw)
To: linux-lvm
Ok, with the help of list members I was able to resolve the vgscan
problems I was experiencing booting Slackware. I'm going to share my
setup.
In /etc/rc.d/rc.S:
# Remount the root filesystem in read-write mode
echo "Remounting root device with read-write enabled."
/sbin/mount -w -v -n -o remount /
# This was an addition, limits vgscan to /proc thus
# speeding up the scan immensely.
/sbin/mount /proc
# Initialize Logical Volume Manager
/sbin/vgscan
/sbin/vgchange -ay
.....
# mount file systems in fstab (and create an entry for /)
# but not NFS because TCP/IP is not yet configured
/sbin/mount -a -v -t nonfs,proc
As I had detailed in a previous posting, I had to alias off a bunch
of devices I don't have, in modules.conf. I no longer require those
aliases, and the loop module no longer loads since loop devices are no
longer scanned either.
Again, my thanks to the list, and I hope this can help other Slackware
users.
P.S. Perhaps this can be added to the HOWTO for Slackware init?
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2001-02-27 0:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-25 18:33 [linux-lvm] Slackware init ardy
2001-02-25 23:52 ` AJ Lewis
2001-02-26 12:08 ` ardy
2001-02-26 14:27 ` AJ Lewis
2001-02-26 17:29 ` Andreas Dilger
2001-02-27 0:14 ` [linux-lvm] FYI Functioning " ardy
2001-02-26 21:39 ` [linux-lvm] " ardy
2001-02-26 22:15 ` Andreas Dilger
2001-02-26 23:21 ` ardy
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).