Bug 693394 - error: unpacking of archive failed on file /var/lock/lvm: cpio: mkdir failed - Resource temporarily unavailable
error: unpacking of archive failed on file /var/lock/lvm: cpio: mkdir failed ...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: filesystem (Show other bugs)
15
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
:
: 693259 (view as bug list)
Depends On:
Blocks: F15Beta/F15BetaBlocker
  Show dependency treegraph
 
Reported: 2011-04-04 10:38 EDT by James Laska
Modified: 2013-09-02 02:55 EDT (History)
13 users (show)

See Also:
Fixed In Version: filesystem-2.4.40-1.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-04-05 17:31:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description James Laska 2011-04-04 10:38:31 EDT
Description of problem:

Installing a @core (text-install) of F-15-Beta fails when unpacking lvm2.  Closer inspection shows that /var/lock is not available in the /mnt/sysimage chroot during installation.

Version-Release number of selected component (if applicable):
 * systemd-22-1.fc15.x86_64
 * filesystem-2.4.39-1.fc15.x86_64

How reproducible:
 * 100%

Steps to Reproduce:
1. Perform a text-based F-15-Beta install
  
Actual results:

From /mnt/sysimage/root/install.log ...

Installing cronie-1.4.7-1.fc15.x86_64
Installing crontabs-1.11-2.20101115git.fc15.noarch
Installing kpartx-0.4.9-15.fc15.x86_64
Installing dmraid-events-1.0.0.rc16-15.fc15.x86_64
Installing dmraid-1.0.0.rc16-15.fc15.x86_64
Installing openssh-server-5.6p1-30.fc15.x86_64
Installing sendmail-8.14.4-20.fc15.x86_64
Installing lvm2-2.02.84-1.fc15.x86_64
error: unpacking of archive failed on file /var/lock/lvm: cpio: mkdir failed - Resource temporarily unavailable

Expected results:

The installer should not fail while installing packages that rely on /var/lock capabilities

Additional info:

* Packages appear to install in the proper order ...
    # grep -n "\(systemd\|filesystem\|lvm2\)-[0-9]" /mnt/sysimage/root/install.log
    4:Installing filesystem-2.4.39-1.fc15.x86_64
    164:Installing systemd-22-1.fc15.x86_64
    191:Installing lvm2-2.02.84-1.fc15.x86_64

* The /var/lock (or /run/lock) directory, doesn't exist
    # ls -l /mnt/sysimage/var/lock
    lrwxrwxrwx. 1 root root 11 Apr  4 10:10 /mnt/sysimage/var/lock -> ../run/lock

    # ls /mnt/sysimage/var/lock/lvm /mnt/sysimage/run/lock
    ls: cannot access /mnt/sysimage/var/lock/lvm: No such file or directory
    ls: cannot access /mnt/sysimage/run/lock: No such file or directory

    # ls /mnt/sysimage/var/run /mnt/sysimage/run
    /mnt/sysimage/run:
    console  faillock  netreport  plymouth  sepermit  setrans  utmp

    /mnt/sysimage/var/run:
    console  faillock  netreport  plymouth  sepermit  setrans  utmp
Comment 1 Lennart Poettering 2011-04-04 10:48:10 EDT
Hm, we create that dir dynamically on boot. If it is missing in the anaconda chroot, then the chroot should probably create it together with /run itself, at the same place it mounts /proc, /sys and friends.
Comment 2 Lennart Poettering 2011-04-04 10:55:06 EDT
Yeah, i think the chroot code should take responsibility for this. The same way it mounts /sys and /proc it should mount a tmpfs to /run, and then do mkdir -p -m 0755 /run/lock.
Comment 3 Chris Lumens 2011-04-04 12:13:38 EDT
systemd creates this (and a bunch of other directories it sounds like) automatically as part of bootup, correct?  If so, this will only hit us on F15 as on rawhide, I'm ditching our own init and using systemd there.
Comment 4 Chris Lumens 2011-04-04 12:18:45 EDT
Scratch that - you're talking about within /mnt/sysimage.  anaconda doesn't create /proc or /sys.  Those directories are all owned by the filesystem package and created when it is installed.  I'd suggest we treat these other directories the same way.
Comment 5 James Laska 2011-04-04 12:29:34 EDT
(In reply to comment #4)
> Scratch that - you're talking about within /mnt/sysimage.  anaconda doesn't
> create /proc or /sys.  Those directories are all owned by the filesystem
> package and created when it is installed.  I'd suggest we treat these other
> directories the same way.

Adding filesystem maintainer, ovasik, to the cc list for input
Comment 6 Ondrej Vasik 2011-04-04 13:36:36 EDT
Which input do you mean? 

Starting with this filesystem update, filesystem creates /var/run and /var/lock as symlinks to /run/ and /run/lock ... /run/ is created and owned by filesystem package, but /run/lock is owned by systemd package. So we need to have /run/lock on the system during the installation (before lvm2 package installation started) - doesn't really matter what will create this, as /run/ should be afaik tmpfs mounted and will not survive boot anyway.
Comment 7 Chris Lumens 2011-04-04 13:48:09 EDT
*** Bug 693259 has been marked as a duplicate of this bug. ***
Comment 8 James Laska 2011-04-04 14:36:30 EDT
(In reply to comment #6)
> Which input do you mean? 
> 
> Starting with this filesystem update, filesystem creates /var/run and /var/lock
> as symlinks to /run/ and /run/lock ... /run/ is created and owned by filesystem
> package, but /run/lock is owned by systemd package. So we need to have
> /run/lock on the system during the installation (before lvm2 package
> installation started)

So this means systemd should be responsible for this?  This is where i started with the bug, but I believe Lennart felt a different approach was needed.
Comment 9 Ondrej Vasik 2011-04-04 15:03:09 EDT
IMHO systemd and its post scriptlet is definitely one possibility. Another possibility is probably installer. Firstboot is too late I guess... Any other idea?
Comment 10 Lennart Poettering 2011-04-04 15:32:52 EDT
(In reply to comment #4)
> Scratch that - you're talking about within /mnt/sysimage.  anaconda doesn't
> create /proc or /sys.  Those directories are all owned by the filesystem
> package and created when it is installed.  I'd suggest we treat these other
> directories the same way.

But who mounts /proc into the chroot? That's not the filesystem rpm I am pretty sure. And that same code should also mount /run into the chroot (and do an mkdir in it)
Comment 11 Chris Lumens 2011-04-04 15:46:45 EDT
We do the bind mounting, but we don't create those directories to begin with.  The filesystem package owns those directories.  anaconda shouldn't be creating the directories, as if we do then they won't be owned by any package on the installed system.
Comment 12 Ondrej Vasik 2011-04-04 16:07:17 EDT
Chris, /run/lock is already owned by systemd package, so it will be owned by that package on the installed system. But it is created only after boot. 
Additionally, if created by anaconda, it should be only tmpfs anyway, so it will not survive the boot (and after boot everything should be handled by systemd itself) -> no unowned directory.
Comment 13 Ondrej Vasik 2011-04-04 16:08:49 EDT
(but if you are still worried about it, we could probably discuss moving ownership of that directory to filesystem package with Lennart)
Comment 14 Bill Nottingham 2011-04-04 16:42:17 EDT
I think it's best that /run/lock be owned by filesystem, not systemd; this introduces the least ordering issues. Having it ownedas a real directory in filesystem shouldn't cause any problems.
Comment 15 Ondrej Vasik 2011-04-05 03:40:50 EDT
Maybe it is really easiest way ... I'll do a filesystem f15 update with /run/lock owned and created by filesystem package.
Comment 16 Eetu Huisman 2011-04-05 06:11:08 EDT
I got my F15 installation blocked by this bug yesterday. Is there a workaround or am I forced to wait until a fix is released?
Comment 17 Ondrej Vasik 2011-04-05 06:48:53 EDT
I'm not aware of any workaround - except not using filesystem-2.4.39-1.fc15 - filesystem-2.4.37-1.fc15 should work without troubles. Anyway, update will be there in just few minutes...
Comment 18 Fedora Update System 2011-04-05 06:51:42 EDT
filesystem-2.4.39-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/filesystem-2.4.39-1.fc15
Comment 19 Ondrej Vasik 2011-04-05 06:56:08 EDT
Please use https://admin.fedoraproject.org/updates/filesystem-2.4.40-1.fc15 link :) ...
Comment 20 Fedora Update System 2011-04-05 17:31:39 EDT
filesystem-2.4.40-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.