LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-14-2006, 12:38 PM   #1
Slim Backwater
Member
 
Registered: Nov 2005
Distribution: Slackware 10.2 2.6.20
Posts: 68

Rep: Reputation: 15
Slackware -current udev and lvm?


While I have already found the commented-out lvm support entry in udev.rules (which creates my volume group and logical volume entries in /dev), udev isn't creating the /dev/mapper entries, and as the lvm entries are symlinks to the mapper entries, they don't work.

How/ what must I do to get udev to create the /dev/mapper entries?

As a workaround, I have edited the two vgscan calls in rc.S to include the --mknodes option, but is this really the best way?

Additionally, Why is the lvm entry in udev.rules commented out in the first place? Support for LVM isn't commented out in rc.S.

I'm running 2.6.16.27.

Thanks.

Wooo wait. Just about to post, but I found this commented-out line in udev.rules (around like 119):
Code:
#KERNEL=="dm-[0-9]*",   PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c"
Is that what I'm missing? I guess I'll reboot and try.

._.

*Edit: That didn't work, and /sbin/devmap_name doesn't even exist. I softlinked dmsetup to it, and in /dev now I get nodes like /dev/main-usr /dev/main-var which work, and soft link to /dev/dm-0, dm-1, etc, but /dev/main/[usr,var] still link to /dev/mapper/dm-0 which doesn't exist. Is something missing in the start up? Is my initrd wrong?

Last edited by Slim Backwater; 08-14-2006 at 04:15 PM.
 
Old 08-15-2006, 04:55 AM   #2
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 36
I have no solution to you but I use LVM2 on my Slackware-current without any problems. I just installed 10.2 on my laptop and then created the LVM partition and copied files in there and upgraded to current. Everything worked smoothly. Had no need to create anything

Have you run the "vgscan"?
 
Old 08-15-2006, 04:41 PM   #3
Slim Backwater
Member
 
Registered: Nov 2005
Distribution: Slackware 10.2 2.6.20
Posts: 68

Original Poster
Rep: Reputation: 15
I must not know something fundamental about devices nodes, the device mapper and udev.

I'm using an Initrd and the generic 2.6.16.27 kernel. The initrd loads the dm-mod, md-mod, raid1, and reiserfs kernel modules and then because my Partition types are not RAID Autodetect, the initrd calls mdadm --assemble --scan with an etc/mdadm.conf file to assemble the raids (three of them).

Maybe the initrd needs to do something more after the pivot root? Like dmsetup mknodes?

Getting the slackware initrd working with LVM on RAID has not been easy, so far:
1. dev/md2 is a symlink to nowhere, so delete and recreate.
2. Copy in sbin/mdadm
3. Create a etc/mdadm.conf
4. Edit linuxrc to call mdadm --assemble --scan after loading the kernel modules but before the LVM discovery stuff already there.
5. Copy in sbin/lvm.static
6. Create all the lvm symlinks in sbin

After the pivot_root, the nodes in /dev/mapper (in the real root) are missing so the LVM symlinks in /dev/main/ point nowhere so my logical volumes don't mount (and those lvs are for /usr /var /tmp /opt so it's kinda important).

The /dev/mapper nodes must get created when the dm-mod kernel module is loaded. Those are getting created in the initrd /dev structure. After the pivot root, what is supposed to recreate the nodes in the new root's /dev?

And this problem only started after the 0.96 udev upgrade, which came in on August 7th but I only updated to that -current about a week ago.

Maybe I didn't understand the switch from hotplug to udev; should both rc.hotplug and rc.udev be marked executable at the same time?

I mean I'm running, I just didn't like how I got here, and it took so long to learn LVM (including the lost time trying EVMS).

One really annoying thing; I borked my initrd and had to boot Ubuntu to fix it. Choosing to use LVM means not being able to boot the Slackware install CD to fix a 'won't boot' condition. However, I'm sure glad I knew what I was doing at the command line once I got into Ubuntu and could see the s/w raids and the lvm volumes.

._.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
udev problems in current MS3FGX Slackware 15 08-14-2006 07:20 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 04:43 AM
udev and missing lvm nodes in -current? Slim Backwater Slackware 0 08-08-2006 09:10 PM
How to upgrade to -current ? New udev for new kernel !? introuble Slackware 8 04-21-2006 03:47 PM
udev update question (from Current Changelog) dhave Slackware 31 07-22-2005 08:49 PM


All times are GMT -5. The time now is 07:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration