Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: udev/eudev, sep /usr, no initramfs. 204/1.1 rc:0.11.8
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2161
Location: The Peanut Gallery

PostPosted: Fri Nov 29, 2013 4:11 pm    Post subject: Reply with quote

Thanks for the heads-up, saellaven. I've put a warning in the OP.

I have this currently in /etc/lvm/lvm.conf:
Code:
devices {
..
    #   N.B. Any device node or symlink not managed by udev in
    # udev directory will be ignored with this setting on.
    # obtain_device_list_from_udev = 1
   # initramfs=no: udev is not running when lvm starts
        obtain_device_list_from_udev = 0
which means it scans the /dev directory itself. The note above explains why I use this.

For my local machine, I restrict this scan to /dev/sda and sdb:
Code:
    # Don't have more than one filter line active at once: only one gets used.

    # Run vgscan after you change this parameter to ensure that
    # the cache file gets regenerated (see below).
    # If it doesn't do what you expect, check the output of 'vgscan -vvvv'.


    # By default we accept every block device:
    # Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel
    # noise if probed when not available.
    # filter = [ "r|/dev/nbd.*|", "a/.*/" ]
   # ie:
   # filter = [ "r|/dev/nbd.*|" ]

    # Exclude the cdrom drive
    # filter = [ "r|/dev/cdrom|" ]

    # When testing I like to work with just loopback devices:
    # filter = [ "a/loop/", "r/.*/" ]

    # Or maybe all loops and ide drives except hdc:
    # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]

    # Use anchors if you want to be really specific
    # filter = [ "a|^/dev/hda8$|", "r/.*/" ]

   # LOCAL: only allow fixed drives on this mobo
   # NOTE this is only appropriate if your disk-controller is built-in
   # (ie *not* a module) and you have two fixed drives via scsi-disk module,
   # which most are, including modern PATA
        filter = [ "a|^/dev/sd[ab]|", "r/.*/" ]

    # The results of the filtering are cached on disk to avoid
    # rescanning dud devices (which can take a very long time).
    # By default this cache is stored in the /etc/lvm/cache directory
    # in a file called '.cache'.
    # It is safe to delete the contents: the tools regenerate it.
    # (The old setting 'cache' is still respected if neither of
    # these new ones is present.)
    # N.B. If obtain_device_list_from_udev is set to 1 the list of
    # devices is instead obtained from udev and any existing .cache
    # file is removed.
    cache_dir = "/etc/lvm/cache"
    #cache_file_prefix = ""
   # LOCAL: hostname so file is not hidden
        cache_file_prefix = "myhost"

    # You can turn off writing this cache file by setting this to 0.
    write_cache_state = 1
although I think sysfs_scan = 1 (which I believe is default) should suffice.

Also, under "activation {" there's udev_sync and udev_rules, which I haven't explored properly yet; only that having both 0 doesn't work. The comment for the first mentions "the command line argument --nodevsync" however, so we may need to use that when starting up lvm, and ! yesno ${initramfs:-YES}. (Or perhaps just pass it in extra params?.)
Back to top
View user's profile Send private message
yuyuyak
n00b
n00b


Joined: 23 Nov 2012
Posts: 31
Location: United States

PostPosted: Thu Feb 06, 2014 11:27 am    Post subject: Reply with quote

Thanks saellaven, I have the same problem, that vgscan --mknode works temporarily. It finds my root lv but not the home partition on the same pv.
Funtoo is moving to eudev and we specifically must block <lvm-2.02.97, so currently we have only one choice and that is 2.02.103.
Has anyone found a way around this? I tried SteveL 's suggestion in lvm.conf but it didn't work for me. Also moved udev to boot in rc-update.
Back to top
View user's profile Send private message
yuyuyak
n00b
n00b


Joined: 23 Nov 2012
Posts: 31
Location: United States

PostPosted: Fri Feb 07, 2014 1:01 am    Post subject: Reply with quote

This problem was solved. In the past we have used mdev as a udev helper, it is now a detriment. Removed mdev from default runlevels and now my lv's mount no problem. This is with lvm-2.02.103 and eudev 1.4.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2161
Location: The Peanut Gallery

PostPosted: Sat Feb 15, 2014 6:25 pm    Post subject: Reply with quote

Thanks yuyuyak, good info. I'll try the upgrade (have it masked currently.)
Back to top
View user's profile Send private message
saellaven
Apprentice
Apprentice


Joined: 23 Jul 2006
Posts: 209

PostPosted: Wed Apr 16, 2014 9:00 pm    Post subject: Reply with quote

After eudev-1.6 wanted to pull in lvm2-2.02.103, I decided to make a little time to look at it again and can report that lvm2-2.02.103 is still broken for me. I have no mdev installed.

Code:

# rc-update show
                 acct |      default                                 
                acpid |      default                                 
            alsasound |      default                                 
              apache2 |      default                                 
                  atd |      default                                 
           bootchart2 |      default                                 
             bootmisc | boot                                         
                clamd |      default                                 
          consolefont | boot                                         
           consolekit |      default                                 
         cpufrequtils |      default                                 
         cups-browsed |      default                                 
                cupsd |      default                                 
                 cvsd |      default                                 
                 dbus |      default                                 
                devfs |                                        sysinit
        device-mapper | boot                                         
              distccd |      default                                 
                dmesg |                                        sysinit
             dmeventd | boot                                         
                 fsck | boot                                         
                  gpm |      default                                 
             hostname | boot                                         
              hwclock | boot                                         
              keymaps | boot                                         
            killprocs |                        shutdown               
                local |      default nonetwork                       
           localmount | boot                                         
             loopback | boot                                         
                  lvm | boot                                         
              modules | boot                                         
             mount-ro |                        shutdown               
         mozilla-sync |      default                                 
                 mtab | boot                                         
                mysql |      default                                 
                named |      default                                 
             net.eth0 |      default                                 
               net.lo | boot                                         
             netmount |      default                                 
                  nfs |      default                                 
           ntp-client |      default                                 
                 ntpd |      default                                 
             opendkim |      default                                 
               procfs | boot                                         
              proftpd |      default                                 
                 root | boot                                         
            savecache |                        shutdown               
             sendmail |      default                                 
               smartd |      default                                 
                 sshd |      default                                 
                 swap | boot                                         
            swapfiles | boot                                         
               sysctl | boot                                         
                sysfs |                                        sysinit
            syslog-ng |      default                                 
         termencoding | boot                                         
         tmpfiles.dev |                                        sysinit
       tmpfiles.setup | boot                                         
                 udev | boot                                         
           udev-mount |                                        sysinit
       udev-postmount |      default                                 
                 upsd |      default                                 
               upsdrv |      default                                 
               upsmon |      default                                 
              urandom | boot                                         
           vixie-cron |      default                                 
               xinetd |      default


sys-fs/eudev-1.5.3-r1
sys-apps/openrc-0.12.4

using /dev/mapper/* nodes in /etc/fstab

I tried setting obtain_device_list_from_udev = 0 and obtain_device_list_from_udev = 1 in /etc/lvm/lvm.conf

also set:

sysfs_scan = 1
udev_sync = 1
udev_rules = 1
Back to top
View user's profile Send private message
khayyam
Veteran
Veteran


Joined: 07 Jun 2012
Posts: 1547

PostPosted: Thu Apr 17, 2014 1:54 am    Post subject: Reply with quote

steveL wrote:
Code:
obtain_device_list_from_udev = 0

steve, saellaven, et al ...

I'm fairly sure udev is only used if lvm2 has the udev useflag enabled (which in my case it hasn't). Anyhow, I'm not using a separate /usr but have lvm2-2.02.97 in my initramfs, lvm2.02.103 installed currently, and mdev as device manager. I don't have any issues here, though the initialisation of the LV's is done from the initramfs (as they are within a dm-crypt volume). I was initially worried, but I seem to have no problems setting up, or initialising, lvm on other disks. I did have lvm2.02.103 package.masked for a while but figured its better to know it breaks ... than not. I plan on soon building an initramfs with lvm2.02.103 and so I'll keep you posted.

Yeah, I know you are avoiding the use of initramfs, but I was just posting in case something of my experience can inform saellaven's ... ie, perhaps {e,}udev is the culprit, not lvm2.

best ... khay
Back to top
View user's profile Send private message
saellaven
Apprentice
Apprentice


Joined: 23 Jul 2006
Posts: 209

PostPosted: Thu Apr 17, 2014 5:42 am    Post subject: Reply with quote

I tried compiling lvm2-2.02.103 with -udev and... it worked. At least as far as booting the system goes. When I loaded mate, it came up with no window decorations and I was unable to use multiple workspaces (everything was crammed into workspace 1 without decorations). I'm guessing there must be some dbus issue here, since all of my volumes were up when I ran startx (I don't use a login manager) so there's no reason for decorations to not be available in the filesystem.

Rather than give up, I recompiled with the udev flag and, after reading lvm.conf again, I set:
obtain_device_list_from_udev = 0
udev_sync = 1
udev_rules = 0

and, thus far, everything seems to be working as it should.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum