Re: [systemd-devel] initrd mount inactive

2015-05-06 Thread Lennart Poettering
On Thu, 30.04.15 15:20, aaron_wri...@selinc.com (aaron_wri...@selinc.com) wrote:

 Lennart Poettering lenn...@poettering.net wrote on 04/30/2015 02:39:45 
 AM:
  On Wed, 29.04.15 12:09, aaron_wri...@selinc.com 
  (aaron_wri...@selinc.com) wrote:
  
   I applied those other commits you listed, and I took a look at the 
 lvm2 
   package, which was being compile with --disable-udev_sync and 
   --disable-udev_rules. I enabled both of those and recompiled both 
 lvm2 
   and systemd.
   
   Nothing changed. Sometimes var.mount is still bound to an inactive 
   /dev/mapper/name.
  
  Well, it will be bound to it, but systemd should not act on it
  anymore and unmount it.
  
  Also, th device should become active as soon as udev ran and 
  reprobed everything.
  
   Do I need the *.rules files from lvm2?
  
  Well, you do need the DM ones at least. That's actually where the
  interesting bits are sicne they properly probe the LUKS device and
  make it available for other components including systemd to pick it up.
 
 I added a couple udev rules that are present in the Ubuntu dmsetup package 
 for my distribution, and now I get a couple errors from systemd-udevd:
 
 systemd-udevd[153]: conflicting device node 
 '/dev/mapper/91caea2d-0e19-441e-9ea7-7be1ed345e96' found, link to 
 '/dev/dm-1' will not be created
 systemd-udevd[154]: conflicting device node 
 '/dev/mapper/d8668b2e-3a40-46df-8c64-f369a1a7a09c' found, link to 
 '/dev/dm-0' will not be created

 With status as:
 
   dev-mapper-91caea2d\x2d0e19\x2d441e\x2d9ea7\x2d7be1ed345e96.device 
 loadedactivating tentative 
 /dev/mapper/91caea2d-0e19-441e-9ea7-7be1ed345e96
   dev-mapper-d8668b2e\x2d3a40\x2d46df\x2d8c64\x2df369a1a7a09c.device 
 loadedactivating tentative 
 /dev/mapper/d8668b2e-3a40-46df-8c64-f369a1a7a09c
 
 The system seems to work just fine though, so I'm wondering if I should 
 ignore these errors and move on. I'm sure what the impact is.

If they stay tentative then this isn't working correctly. After udev
is up and probed the devcies they should really be set to plugged
and not tentative anymore. There's something still wrong with your
udev rules I fear...

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] initrd mount inactive

2015-04-30 Thread Lennart Poettering
On Wed, 29.04.15 12:09, aaron_wri...@selinc.com (aaron_wri...@selinc.com) wrote:

 I applied those other commits you listed, and I took a look at the lvm2 
 package, which was being compile with --disable-udev_sync and 
 --disable-udev_rules. I enabled both of those and recompiled both lvm2 
 and systemd.
 
 Nothing changed. Sometimes var.mount is still bound to an inactive 
 /dev/mapper/name.

Well, it will be bound to it, but systemd should not act on it
anymore and unmount it.

Also, th device should become active as soon as udev ran and reprobed 
everything.

 Do I need the *.rules files from lvm2?

Well, you do need the DM ones at least. That's actually where the
interesting bits are sicne they properly probe the LUKS device and
make it available for other components including systemd to pick it up.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] initrd mount inactive

2015-04-30 Thread Aaron_Wright
Lennart Poettering lenn...@poettering.net wrote on 04/30/2015 02:39:45 
AM:
 On Wed, 29.04.15 12:09, aaron_wri...@selinc.com 
 (aaron_wri...@selinc.com) wrote:
 
  I applied those other commits you listed, and I took a look at the 
lvm2 
  package, which was being compile with --disable-udev_sync and 
  --disable-udev_rules. I enabled both of those and recompiled both 
lvm2 
  and systemd.
  
  Nothing changed. Sometimes var.mount is still bound to an inactive 
  /dev/mapper/name.
 
 Well, it will be bound to it, but systemd should not act on it
 anymore and unmount it.
 
 Also, th device should become active as soon as udev ran and 
 reprobed everything.
 
  Do I need the *.rules files from lvm2?
 
 Well, you do need the DM ones at least. That's actually where the
 interesting bits are sicne they properly probe the LUKS device and
 make it available for other components including systemd to pick it up.

I added a couple udev rules that are present in the Ubuntu dmsetup package 
for my distribution, and now I get a couple errors from systemd-udevd:

systemd-udevd[153]: conflicting device node 
'/dev/mapper/91caea2d-0e19-441e-9ea7-7be1ed345e96' found, link to 
'/dev/dm-1' will not be created
systemd-udevd[154]: conflicting device node 
'/dev/mapper/d8668b2e-3a40-46df-8c64-f369a1a7a09c' found, link to 
'/dev/dm-0' will not be created

With status as:

  dev-mapper-91caea2d\x2d0e19\x2d441e\x2d9ea7\x2d7be1ed345e96.device 
loadedactivating tentative 
/dev/mapper/91caea2d-0e19-441e-9ea7-7be1ed345e96
  dev-mapper-d8668b2e\x2d3a40\x2d46df\x2d8c64\x2df369a1a7a09c.device 
loadedactivating tentative 
/dev/mapper/d8668b2e-3a40-46df-8c64-f369a1a7a09c

The system seems to work just fine though, so I'm wondering if I should 
ignore these errors and move on. I'm sure what the impact is.___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] initrd mount inactive

2015-04-29 Thread Aaron_Wright
Lennart Poettering lenn...@poettering.net wrote on 04/27/2015 12:47:38 
PM:
 On Mon, 27.04.15 11:47, aaron_wri...@selinc.com 
 (aaron_wri...@selinc.com) wrote:
 
  I applied commit 628c89cc68ab96fce2de7ebba5933725d147aecc - core: 
rework 
  device state logic, but now I'm left with a random chance to boot or 
not.
  
  Some boots it comes up with /var mounted and lots of nice colored [ 
OK 
  ]s.
  
  Some boots it comes up with Unit var.mount is bound to inactive unit 
  /dev/mapper/name. Stopping, too. and no colored [ OK ]s and about 

  half the logs; only the systemd[1] messages, and it just hangs at 
some 
  point; it never reaches the default target.
  
  I create /dev/mapper/name in initrd with cryptsetup, and then mount 
it 
  to /newroot/var before switching root to /newroot and running systemd. 
I 
  don't use systemd in initrd.
 
 Make sure to apply 496068a8288084ab3ecf8b179a8403ecff1a6be8
 and f62009410a72f5a89bfb8fdd7e48d9d472a6887b.
 
 Also make sure you have LVM/DM compiled with proper udev support.

Thanks for hearing me out on this.

I applied those other commits you listed, and I took a look at the lvm2 
package, which was being compile with --disable-udev_sync and 
--disable-udev_rules. I enabled both of those and recompiled both lvm2 
and systemd.

Nothing changed. Sometimes var.mount is still bound to an inactive 
/dev/mapper/name.

Do I need the *.rules files from lvm2?

So an additional question, is it a requirement to use udev in initrd where 
/var is decrypted and mounted? I currently wasn't doing so. I just use 
whatever devtmpfs gave me.___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] initrd mount inactive

2015-04-27 Thread Lennart Poettering
On Mon, 27.04.15 11:47, aaron_wri...@selinc.com (aaron_wri...@selinc.com) wrote:

 I applied commit 628c89cc68ab96fce2de7ebba5933725d147aecc - core: rework 
 device state logic, but now I'm left with a random chance to boot or not.
 
 Some boots it comes up with /var mounted and lots of nice colored [ OK 
 ]s.
 
 Some boots it comes up with Unit var.mount is bound to inactive unit 
 /dev/mapper/name. Stopping, too. and no colored [ OK ]s and about 
 half the logs; only the systemd[1] messages, and it just hangs at some 
 point; it never reaches the default target.
 
 I create /dev/mapper/name in initrd with cryptsetup, and then mount it 
 to /newroot/var before switching root to /newroot and running systemd. I 
 don't use systemd in initrd.

Make sure to apply 496068a8288084ab3ecf8b179a8403ecff1a6be8
and f62009410a72f5a89bfb8fdd7e48d9d472a6887b.

Also make sure you have LVM/DM compiled with proper udev support.
 

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel