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: 3318
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: 33
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: 33
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: 3318
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
Guru
Guru


Joined: 23 Jul 2006
Posts: 332

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
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2944

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
Guru
Guru


Joined: 23 Jul 2006
Posts: 332

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
steveL
Advocate
Advocate


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

PostPosted: Wed Apr 23, 2014 3:38 pm    Post subject: Reply with quote

Good work, saellaven; kudos for not giving up. :)

I'm sorry I still haven't upgraded; my desktop is several months behind as I need to sort out ABI warnings on --toolchain in update. The perl bonanza has made me want to handle those comprehensively, and since libpng is in the mix as well, it's a perfect opportunity to tweak the crufty old script that handles /etc/warning for the case when we have both, so that it matches my expectations. ;)

It was originally a saga as perl-5.16 is blocked, so we needed extra script to filter those, which does look better, and means we trigger on all blockages portage reports. I've just found we'll need to filter rebuilds as well, wrt libpng for example, so I'll add a fourth(!) routine (luckily the filters share code) and sort out the interaction when there's both toolchain and standard-list ABI warnings. There were a few issues Griz found as well, and while we were there I finally found the bug which meant we kept getting colour output from emerge, though not update, when output is redirected. Still need to sort out a couple of other routines, since I was focussed on stderr for a while, and the bash code was spaghetti compared to the sh work we've being doing for last couple of years.

I'm often behind the tree like this when there's major changes which show an area that needs improvement. If I get round it with emerge, it'll be another two years before the same situation hits me, and I won't bother. So even though I advise users that they need to know emerge, as update is not meant to shield you from it, and in tricky cases, "do it with emerge" has always been the advice, I can't really take that option myself, if we want things smooth for the next upgrade.

Thankfully Griz keeps on sweating the code with new installs, so in the interim any bugs in normal usage get flagged by him, and fixed when he pings me, or soon thereafter. QA should have high expectations of the programmers they manage; it works much better ime. I guess it's a bit like having high expectations of your kids: not that they'll always be top, just that they will do their best; not so much about competition as excellence.
Back to top
View user's profile Send private message
saellaven
Guru
Guru


Joined: 23 Jul 2006
Posts: 332

PostPosted: Thu Aug 28, 2014 12:04 am    Post subject: Reply with quote

just confirming that everything is continuing to work with eudev-1.10 and lvm2-2.02.109
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


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

PostPosted: Mon Sep 01, 2014 10:04 am    Post subject: Reply with quote

Thanks saellaven.

I'm still lagging, but hopefully I'll get my toolchain work done in the next day or two, and will be switching my workstation to eudev after that.
Back to top
View user's profile Send private message
ExecutorElassus
l33t
l33t


Joined: 11 Mar 2004
Posts: 779
Location: Stuttgart, Germany

PostPosted: Tue Sep 02, 2014 7:07 am    Post subject: Reply with quote

because I'm dumb, how do I know whether I have / on an lvm? I know it's on a RAID1, but I'm not sure if lvm is managing it. 'mount' shows:

Code:
 # mount
rootfs on / type rootfs (rw)
/dev/md126 on / type ext3 (rw,noatime,errors=continue,barrier=1,data=writeback)


but maybe that's just RAID?

Cheers,

EE
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


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

PostPosted: Sun Sep 07, 2014 9:34 am    Post subject: Reply with quote

Hey EE; I'm not sure tbh: I've always stayed away from RAID. I'd imagine it's using the same device mapper under the hood, so if your rootfs is on that, this method is unlikely to work.

I'd ask in #gentoo or #gentoo-chat, if I were in your position.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 33040
Location: 56N 3W

PostPosted: Sat Sep 20, 2014 8:46 pm    Post subject: Reply with quote

ExecutorElassus,

Code:
/dev/md126 on /
is root on raid. This will work for you if
Code:
sudo mdadm -E /dev/sd*
/dev/sda5:
          Magic : a92b4efc
        Version : 0.90.00

shows that the version is 0.90.00 and that you use kernel raid auto assembly.

If your version is not 0.90.00 - its game over.
If version is 0.90.00, check that the partition type is
Code:
/dev/sda5        1124613   11631059   10506447     5G fd Linux raid autodetect
and that your kernel has raid auto asseble selected.
Both of those things can be fixed.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ExecutorElassus
l33t
l33t


Joined: 11 Mar 2004
Posts: 779
Location: Stuttgart, Germany

PostPosted: Sat Sep 20, 2014 9:01 pm    Post subject: Reply with quote

Hi again, Neddy! Thanks for the advice!

/dev/sda3 (one of the three partitions that constitute the RAID1 array for / ) is indeed using 0.90.00. As for kernel RAID auto-assembly, where do I check for that?

Sigh. And here I thought I'd gotten out of having to follow this guide.

Thanks (?) for setting me back on the path of righteousness.

Cheers,

EE
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 33040
Location: 56N 3W

PostPosted: Sat Sep 20, 2014 10:45 pm    Post subject: Reply with quote

ExecutorElassus,

Code:
CONFIG_MD_AUTODETECT:                                                                             │ 
  │                                                                                                   │ 
  │ If you say Y here, then the kernel will try to autodetect raid                                    │ 
  │ arrays as part of its boot process.                                                               │ 
  │                                                                                                   │ 
  │ If you don't use raid and say Y, this autodetection can cause                                     │ 
  │ a several-second delay in the boot time due to various                                            │ 
  │ synchronisation steps that are part of this step.                                                 │ 
  │                                                                                                   │ 
  │ If unsure, say Y.                                                                                 │ 
  │                                                                                                   │ 
  │ Symbol: MD_AUTODETECT [=n]                                                                        │ 
  │ Type  : boolean                                                                                   │ 
  │ Prompt: Autodetect RAID arrays during kernel boot                                                 │ 
  │   Location:                                                                                       │ 
  │     -> Device Drivers                                                                             │ 
  │       -> Multiple devices driver support (RAID and LVM) (MD [=y])                                 │ 
  │         -> RAID support (BLK_DEV_MD [=y])                                                         │ 
  │   Defined at drivers/md/Kconfig:33                                                                │ 
  │   Depends on: MD [=y] && BLK_DEV_MD [=y]=y           


If you don't have an initrd but you have root on raid it must be on - unless something else is broken too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


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

PostPosted: Sun Sep 21, 2014 12:48 am    Post subject: Reply with quote

EE: This post showing Neddy's initrd script might be of use to you.

It certainly seems to be what you guys are talking about; as I said if your rootfs is on mdadm or some other sort of device-mapper backed storage like lvm, such that you need modules loaded, or commands run before you can access root, then this method isn't for you. You will need an initramfs, but as Neddy shows, it can be very simple and effectively fixed for the lifetime of the machine (or until a drive fails.)

Although, as the discussion in the linked thread shows, the same issues crop up in both arenas: early userspace is early userspace, however you cut it. (And a good reason for maintaining the traditional /usr vs rootfs linkage restrictions.)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 33040
Location: 56N 3W

PostPosted: Sun Sep 21, 2014 10:42 am    Post subject: Reply with quote

steveL,

My original install, that I couldn't afford to do without when I first posted in this thread, is expendable now.
I just need to update it. Its so old that the advice I give others is that a reinstall is faster.
However, I've never done a reinstall for Gentoo and I don't propose to start now :)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 33040
Location: 56N 3W

PostPosted: Sun Sep 21, 2014 10:51 am    Post subject: Reply with quote

steveL,

Thats only a part of my initrd script.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


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

PostPosted: Mon Sep 22, 2014 7:19 am    Post subject: Reply with quote

NeddySeagoon wrote:
My original install, that I couldn't afford to do without when I first posted in this thread, is expendable now.
I just need to update it. Its so old that the advice I give others is that a reinstall is faster.
However, I've never done a reinstall for Gentoo and I don't propose to start now :)

Lul :-) I started writing up using update after a long gap, but since that world update, haven't actually upgraded much, so I can deal with perl warnings (which brings up blockers which are warnings, etc) as I'm the on last leg of --toolchain (and frankly I needed a timeout from it.)
The post shows the toolchain handling, though; I'm quite proud of the linkage checks from around that time, which verify the version of gcc used to build your other toolchain packages, including across splitdebug. Just a shame the perl hoopla hit and meant a whole load of extra work, to do right. Still, nearly there (famous last words.. ;-)
Quote:
Thats only a part of my initrd script.

Yeah, but it does have the relevant mdraid stuff, since that's what the OP there was asking about. Sides, you could just post your whole script (redacted for host-specifics); I'll set up another git repo a bit later, since it shouldn't be in the overlay. (Or just poke Monkeh if you see him.) Though it does seem cogent to the whole "Olde-Fashioned Gentooee" thing; old-fashioned doesn't mean incapable, after all.. ;-)
Back to top
View user's profile Send private message
saellaven
Guru
Guru


Joined: 23 Jul 2006
Posts: 332

PostPosted: Sun Jan 18, 2015 4:50 am    Post subject: Reply with quote

Just a heads up that with sys-apps/openrc-0.13.7 and sys-fs/udev-init-scripts-27 going stable today, the patch is currently broken. udev-init-scripts-27 does away with /etc/init.d/udev-mount for starters. I haven't had time to delve deeper.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


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

PostPosted: Sun Jan 18, 2015 12:10 pm    Post subject: Reply with quote

Thanks saellaven; I'm still far behind the tree, I'm afraid, been caught up in a work project. I'll schedule a couple of days for updates this week.
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