Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LVM2+udev+multipath-tools error: can't create runfile
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
PT_LAmb
Guru
Guru


Joined: 22 Apr 2002
Posts: 332
Location: Lisboa (Lisbon), Portugal

PostPosted: Tue Aug 23, 2005 7:35 pm    Post subject: LVM2+udev+multipath-tools error: can't create runfile Reply with quote

Hi,

I use LVM2 to manage all but my swap and root partitions based on The Gentoo LVM2 Installation Guide. Here's mount's output.
Quote:
/dev/hda7 on / type reiserfs (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
udev on /dev type tmpfs (rw,nosuid)
devpts on /dev/pts type devpts (rw)
/dev/vga/var on /var type reiserfs (rw,noatime)
/dev/vga/tmp on /tmp type reiserfs (rw,noatime)
/dev/vga/usr on /usr type reiserfs (rw,noatime)
/dev/vga/opt on /opt type reiserfs (rw,noatime)
/dev/vga/home on /home type reiserfs (rw,noatime)
/dev/vga/ccache on /var/tmp/ccache type reiserfs (rw,noatime)
/dev/vga/iso on /mnt/iso type reiserfs (rw,noatime)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /proc/bus/usb type usbfs (rw)
none on /dev/shm type tmpfs (rw)


I migrated my system from devfs to udev yesterday, and during the first boot, I got 20+ error lines.
Quote:
* Populating /dev with device nodes ...
device mapper prerequisites not met.
device mapper prerequisites not met.
device mapper prerequisites not met.
device mapper prerequisites not met.
...


After searching in multipath-tools' source code, I found that I had to compile Device Mapper Support and Multipath Target built in the kernel. I did it and rebooted to find that the error was replaced by another.
Quote:
* Populating /dev with device nodes ...
can't create runfile
can't create runfile
can't create runfile
can't create runfile
...


I tweaked multipath/main.c and added a perror("") line right after fprintf(stderr, "can't create runfile\n");.
Code:
 int try_lock (char * file)
{
        int fd;
        struct flock fl;

        /*
         * create the file to lock if it does not exist
         */
        fd = open(file, O_CREAT|O_RDWR);

        if (fd < 0) {
                fprintf(stderr, "can't create runfile\n");
                perror();
                exit(1);
        }
...
Hence that file == "/var/run/multipath.run"

As /var is a separated partition, I bound /root/newroot to / with mount / -o bind ~/newroot and checked that /var/run/multipath.run was present.
Quote:
milk linux # ls -la /root/newroot/var/run/
total 0
drwxr-xr-x 2 root root 80 Aug 23 19:11 .
drwxr-xr-x 5 root root 120 Aug 22 19:02 ..
---s--xr-T 1 root root 0 Aug 23 19:11 multipath.run
milk linux #
deleted it and rebooted the system...
Quote:
* Populating /dev with device nodes ...
can't create runfile
Read-only filesystem
can't create runfile
Read-only filesystem
can't create runfile
Read-only filesystem
can't create runfile
Read-only filesystem
...
I find that this error is wierd because multipath.run was again present in /var/run.

I just don't know what's happening. If someone could give me a hint, or tell me what else to check, I would be every gratefull.

Should I file this as a bug?

Thanks in advance,
Ricardo
_________________
SETI@Home - http://setiathome.ssl.berkeley.edu/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
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