FS#30553 - [initscripts] /var/lock/ does not exists during activating LVM2 groups

Attached to Project: Arch Linux
Opened by Krzysztof Warzecha (hiciu) - Thursday, 05 July 2012, 16:40 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 05 July 2012, 16:44 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Hello,

http://imagebin.org/219566

[code]
Thu Jul 5 19:58:20 2012: :: Bringing up loopback interface [BUSY] [DONE]
Thu Jul 5 19:58:20 2012: :: Activating LVM2 groups [BUSY] /var/lock/lvm: mkdir failed: Nie ma takiego pliku ani katalogu
Thu Jul 5 19:58:20 2012: [DONE]
Thu Jul 5 19:58:20 2012: :: Unlocking encrypted volumes [BUSY] [DONE]
[/code]

(sorry for localized message, "Nie ma takiego pliku ani katalogu" == "No such file or directory").

This shows up on every boot since todays update (pacman log here: http://pastebin.com/rvKzVgbb). This message is coming from function activate_vgs() in /etc/rc.d/functions:

[code]
activate_vgs() {
[[ $USELVM = [yY][eE][sS] && -x $(type -P lvm) && -d /sys/block ]] || return 0
stat_busy "Activating LVM2 groups"
vgchange --sysinit -a y >/dev/null
(( $? == 0 )) && stat_done || stat_fail
}
[/code]

I poked vgchange with strace during startup, it does something like this:

[code]
416 stat("/var/lock/lvm", 0x7fffbd7a8a00) = -1 ENOENT (No such file or directory)
416 mkdir("/var", 0777) = -1 EEXIST (File exists)
416 mkdir("/var/lock", 0777) = -1 EEXIST (File exists)
416 mkdir("/var/lock/lvm", 0777) = -1 ENOENT (No such file or directory)
[/code]

Since todays update /var/lock is symlink to ../run/lock. /var/ exists, /var/lock is symlink, so it exists but points to nonexisting directory (so, mkdir returns "file exists"). mkdir /var/lock/lvm returns with "no such file or directory", cause /var/run/lock does not exists.

I tested it empirically too: http://imagebin.org/219572. I belive this is bug in filesystem or initscripts package. /run/lock should be created somewhere here (/etc/rc.sysinit):

[code]
# mount the api filesystems
# /proc, /sys, /run, /dev, /run/lock, /dev/pts, /dev/shm
mountpoint -q /proc || mount -t proc proc /proc -o nosuid,noexec,nodev
mountpoint -q /sys || mount -t sysfs sys /sys -o nosuid,noexec,nodev
mountpoint -q /run || mount -t tmpfs run /run -o mode=0755,nosuid,nodev
mountpoint -q /dev || mount -t devtmpfs dev /dev -o mode=0755,nosuid
mkdir -p /dev/{pts,shm}
mountpoint -q /dev/pts || mount -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec
mountpoint -q /dev/shm || mount -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev
[/code]

Additional info:
* package version(s)
* config and/or log files etc.

initscripts 2012.06.3-1
filesystem 2012.6-4

Steps to reproduce:

Boot archlinux from lvm.
This task depends upon

Closed by  Dave Reisner (falconindy)
Thursday, 05 July 2012, 16:44 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#30515 
Comment by Dave Reisner (falconindy) - Thursday, 05 July 2012, 16:44 GMT
This isn't an initscripts bug, and it's already fixed in testing

Loading...