[Ocfs2-users] Initramfs environment, o2cb prereq's

Christopher Hawkins chawkins at bplinux.com
Tue Sep 26 21:15:21 PDT 2006


Set -x on o2cb basically just shows the mount failing. I am working on the
modules issue, but it's not critical for now. Here's the strace output.
Lot's of file not found errors, but I don't have the expertise to say which
may be problematic and which are not. I mounted my other root, an ext3
partition, from within the initramfs and strace showed much the same but it
didn't seem to affect it. Here's /tmp/out:  (also I will attach
/tmp/out.ext3, the output from the successful mount of the other filesystem)

execve("/bin/mount", ["mount", "/dev/sda5", "/root"], [/* 17 vars */]) = 0
uname({sys="Linux", node="thunder", ...}) = 0
brk(0)                                  = 0x518000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2ab23f716000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = -1 ENOENT (No such file or
directory)
open("/lib/tls/x86_64/libblkid.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory) stat("/lib/tls/x86_64", 0x7fff6b3a96b0) = -1 ENOENT (No such file
or directory) open("/lib/tls/libblkid.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat("/lib/tls", 0x7fff6b3a96b0)        = -1 ENOENT (No such file or
directory)
open("/lib/x86_64/libblkid.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat("/lib/x86_64", 0x7fff6b3a96b0)     = -1 ENOENT (No such file or
directory)
open("/lib/libblkid.so.1", O_RDONLY)    = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 7\0\0\0"..., 640) =
640 fstat(3, {st_mode=S_IFREG|0644, st_size=38608, ...}) = 0 mmap(NULL,
1085480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2ab23f817000 mprotect(0x2ab23f81f000, 1052712, PROT_NONE) = 0
mmap(0x2ab23f91f000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x2ab23f91f000
close(3)                                = 0
open("/lib/libuuid.so.1", O_RDONLY)     = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\16\0"..., 640) =
640 fstat(3, {st_mode=S_IFREG|0644, st_size=10616, ...}) = 0 mmap(NULL,
1057536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2ab23f921000 mprotect(0x2ab23f923000, 1049344, PROT_NONE) = 0
mmap(0x2ab23fa23000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x2ab23fa23000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\305"..., 640) =
640
lseek(3, 624, SEEK_SET)                 = 624
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0"..., 32) =
32 fstat(3, {st_mode=S_IFREG|0755, st_size=1295640, ...}) = 0 mmap(NULL,
4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2ab23fa24000 mmap(NULL, 2354344, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ab23fa25000 mprotect(0x2ab23fb49000,
1158312, PROT_NONE) = 0 mmap(0x2ab23fc48000, 98304, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x123000) = 0x2ab23fc48000
mmap(0x2ab23fc60000, 15528, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab23fc60000
close(3)                                = 0
open("/lib/libdevmapper.so.1.02", O_RDONLY) = 3 read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0008\0\0"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0644, st_size=74256, ...}) = 0 mmap(NULL, 1121136,
PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ab23fc64000
mprotect(0x2ab23fc74000, 1055600, PROT_NONE) = 0 mmap(0x2ab23fd74000, 8192,
PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) =
0x2ab23fd74000
close(3)                                = 0
open("/lib/libselinux.so.1", O_RDONLY)  = 3 read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260@\0\0"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0644, st_size=84432, ...}) = 0 mmap(NULL, 1135936,
PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ab23fd76000
mprotect(0x2ab23fd8a000, 1054016, PROT_NONE) = 0 mmap(0x2ab23fe89000, 8192,
PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13000) =
0x2ab23fe89000 mmap(0x2ab23fe8b000, 1344, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab23fe8b000
close(3)                                = 0
open("/lib/libsepol.so.1", O_RDONLY)    = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000>\0\0"..., 640) =
640 fstat(3, {st_mode=S_IFREG|0644, st_size=232792, ...}) = 0 mmap(NULL,
4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2ab23fe8c000 mmap(NULL, 1322240, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ab23fe8d000 mprotect(0x2ab23fec5000,
1092864, PROT_NONE) = 0 mmap(0x2ab23ffc5000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x38000) = 0x2ab23ffc5000
mmap(0x2ab23ffc6000, 40192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab23ffc6000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\20\0\0"..., 640) =
640 fstat(3, {st_mode=S_IFREG|0644, st_size=10392, ...}) = 0 mmap(NULL,
1057000, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2ab23ffd0000 mprotect(0x2ab23ffd2000, 1048808, PROT_NONE) = 0
mmap(0x2ab2400d1000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x2ab2400d1000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2ab2400d3000 mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab2400d4000 mprotect(0x2ab23fc48000,
86016, PROT_READ) = 0 arch_prctl(ARCH_SET_FS, 0x2ab2400d3bc0) = 0
access("/etc/selinux/", F_OK)           = -1 ENOENT (No such file or
directory)
brk(0)                                  = 0x518000
brk(0x539000)                           = 0x539000
open("/proc/mounts", O_RDONLY)          = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap(NULL, 4096,
PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab2400d5000
read(3, "rootfs / rootfs rw 0 0\nnone /sys"..., 1024) = 172
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0x2ab2400d5000, 4096)            = 0
open("/lib/libsetrans.so.0", O_RDONLY)  = -1 ENOENT (No such file or
directory) open("/usr/lib/tls/x86_64/libsetrans.so.0", O_RDONLY) = -1 ENOENT
(No such file or directory) stat("/usr/lib/tls/x86_64", 0x7fff6b3a9820) = -1
ENOENT (No such file or directory) open("/usr/lib/tls/libsetrans.so.0",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls", 0x7fff6b3a9820)    = -1 ENOENT (No such file or
directory)
open("/usr/lib/x86_64/libsetrans.so.0", O_RDONLY) = -1 ENOENT (No such file
or directory) stat("/usr/lib/x86_64", 0x7fff6b3a9820) = -1 ENOENT (No such
file or directory) open("/usr/lib/libsetrans.so.0", O_RDONLY) = -1 ENOENT
(No such file or directory) stat("/usr/lib", {st_mode=S_IFDIR|0755,
st_size=0, ...}) = 0
open("/lib/x86_64-linux-gnu/tls/x86_64/libsetrans.so.0", O_RDONLY) = -1
ENOENT (No such file or directory) stat("/lib/x86_64-linux-gnu/tls/x86_64",
0x7fff6b3a9820) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/libsetrans.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory) stat("/lib/x86_64-linux-gnu/tls", 0x7fff6b3a9820) =
-1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/libsetrans.so.0", O_RDONLY) = -1 ENOENT
(No such file or directory) stat("/lib/x86_64-linux-gnu/x86_64",
0x7fff6b3a9820) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libsetrans.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory) stat("/lib/x86_64-linux-gnu", 0x7fff6b3a9820) = -1 ENOENT
(No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/libsetrans.so.0", O_RDONLY) = -1
ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff6b3a9820) = -1 ENOENT (No
such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/libsetrans.so.0", O_RDONLY) = -1 ENOENT
(No such file or directory) stat("/usr/lib/x86_64-linux-gnu/tls",
0x7fff6b3a9820) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/x86_64/libsetrans.so.0", O_RDONLY) = -1
ENOENT (No such file or directory) stat("/usr/lib/x86_64-linux-gnu/x86_64",
0x7fff6b3a9820) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libsetrans.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory) stat("/usr/lib/x86_64-linux-gnu", 0x7fff6b3a9820) =
-1 ENOENT (No such file or directory)
umask(022)                              = 022
open("/dev/null", O_RDWR)               = 3
close(3)                                = 0
getuid()                                = 0
geteuid()                               = 0
getgid()                                = 0
getegid()                               = 0
prctl(0x3, 0, 0, 0, 0)                  = 1
open("/etc/blkid.tab", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=137, ...}) = 0
fcntl(3, F_GETFL)                       = 0x8000 (flags
O_RDONLY|O_LARGEFILE)
fstat(3, {st_mode=S_IFREG|0644, st_size=137, ...}) = 0 mmap(NULL, 4096,
PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab2400d5000
lseek(3, 0, SEEK_CUR)                   = 0
read(3, "<device DEVNO=\"0x0805\" TIME=\"115"..., 4096) = 137
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x2ab2400d5000, 4096)            = 0
getuid()                                = 0
geteuid()                               = 0
lstat("/etc/mtab", {st_mode=S_IFREG|0644, st_size=421, ...}) = 0
stat("/dev/sda5", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 5), ...}) = 0
rt_sigprocmask(SIG_BLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0
open("/dev/sda5", O_RDONLY)             = 3
fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 5), ...}) = 0
lseek(3, 0, SEEK_SET)                   = 0
read(3, "\2\2\2\2\2\2\2\2this is an ocfs2 volume\0"..., 69632) = 69632
close(3)                                = 0
stat("/sbin/mount.ocfs2", 0x7fff6b3a9c10) = -1 ENOENT (No such file or
directory) mount("/dev/sda5", "/root", "ocfs2", MS_MGC_VAL, NULL) = -1
EINVAL (Invalid argument) rt_sigprocmask(SIG_UNBLOCK, ~[TRAP SEGV RTMIN
RT_1], NULL, 8) = 0 write(2, "mount: wrong fs type, bad option"..., 102) =
102 stat("/dev/sda5", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 5), ...}) =
0 open("/dev/sda5", O_RDONLY|O_NONBLOCK)  = 3
ioctl(3, BLKGETSIZE, 0x7fff6b3a9e30)    = 0
close(3)                                = 0
write(2, "       In some cases useful info"..., 86) = 86
stat("/etc/blkid.tab", {st_mode=S_IFREG|0644, st_size=137, ...}) = 0
access("/etc/blkid.tab", W_OK)          = 0
getpid()                                = 2169
open("/etc/blkid.tab-2YPbRO", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0 mmap(NULL, 4096,
PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab2400d5000
lseek(3, 0, SEEK_CUR)                   = 0
fchmod(3, 0644)                         = 0
write(3, "<device DEVNO=\"0x0805\" TIME=\"115"..., 137) = 137
close(3)                                = 0
munmap(0x2ab2400d5000, 4096)            = 0
unlink("/etc/blkid.tab.old")            = 0
link("/etc/blkid.tab", "/etc/blkid.tab.old") = 0
rename("/etc/blkid.tab-2YPbRO", "/etc/blkid.tab") = 0
exit_group(32)                          = ?

> -----Original Message-----
> From: Sunil Mushran [mailto:Sunil.Mushran at oracle.com] 
> Sent: Tuesday, September 26, 2006 4:35 PM
> To: Christopher Hawkins
> Cc: Ocfs2-Users at Oss. Oracle. Com
> Subject: Re: [Ocfs2-users] Initramfs environment, o2cb prereq's
> 
> Christopher Hawkins wrote:
> > Hello,
> > I am trying to start an ocfs2 cluster and mount a filesystem in an 
> > initramfs environment. Networking is up, hostname set, and the o2cb 
> > init script runs with no errors. Now the odd behavior starts... The 
> > mount of the ocfs2 filesystem fails, and I get dropped in to the 
> > ramdisk root where I can do all my troubleshooting.
> >   
> > mount /dev/sda5 /root  --> mount: mounting /dev/sda5 on 
> /root failed:
> > Invalid argument
> >   
> strace -ff -o /tmp/out mount .....
> 
> > Odd thing is that "/etc/init.d/o2cb status" completely 
> fails. It says 
> > no modules loaded, even though lsmod shows them all there, 
> along with 
> > /proc/modules. I brought in some other init scripts to get 
> networking 
> > up and set hostname, etc, so from the beginning, my boot 
> messages look like this:
> >   
> Add -x to the shell command line atop /etc/init.d/o2cb. All 
> it does is read and parse /proc/modules.
> 
> # for MODNAME in configfs ocfs2_nodemanager ocfs2_dlm 
> ocfs2_dlmfs do awk
> '$1 ~ /^'$MODNAME'$/{print $1,$3;exit}' < /proc/modules ; done;
> 
> > Cleaning up ifdown.... Done.
> > Setting up networking.... Done. 
> > Setting hostname to thunder... Done. 
> > Configuring network interfaces... Done. 
> > (** here's where I interject the o2cb init script, which 
> seems to work 
> > **) Loading module configfs: OK Mounting configfs filesystem at
> > /sys/kernel/config: OK Loading module ocfs2_nodemanager: OK Loading 
> > module
> > ocfs2_dlm: OK Loading module ocfs2_dlmfs: OK Mounting ocfs2_dlmfs 
> > filesystem at /dlm: OK Starting Oracle cluster storm: OK Done.
> >
> > At this point the boot process moves on to the initramfs 
> > local-premount script, which attempts to mount /dev/sda5 (the ocfs2 
> > root filesystem) on /root, which fails. Now I get dropped 
> into the shell:
> >
> > /etc/init.d/o2cb status
> >
> > module configfs: not loaded
> > Filesystem configfs: not mounted
> > Module ocfs2_nodemanager: not loaded
> > Module ocfs2_dlm: not loaded
> > Module ocfs2_dlmfs: not loaded
> > Filesystem ocfs2_dlmfs: not mounted
> >
> > mount
> >
> > none on /sys type sysfs (rw)
> > none on /proc type proc (rw)
> > udev on /dev type tmpfs (rw)
> > configfs on /sys/kernel/config type configfs (rw) 
> ocfs2_dlmfs on /dlm 
> > type ocfs2_dlmfs (rw)
> >
> > So they are mounted, along with the modules being loaded, but o2cb 
> > thinks they are not. My reading of the script itself 
> indicates that it 
> > checks /proc/mounts, which is correct (it shows everything 
> the mount 
> > command shows, and also "rootfs / rootfs rw 0 0" ) so I don't know 
> > what's going on. Further checking is also confusing:
> >
> > /etc/init.d/o2cb offline
> > Cleaning heartbeat on cluster storm: OK Stopping cluster storm: OK 
> > /etc/init.d/o2cb unload
> >
> > /etc/init.d/o2cb online
> >
> > Loading module configfs: OK
> > Mounting configfs filesystem at /sys/kernel/config: mount: 
> Device or 
> > resource busy Unable to mount configfs filesystem Failed
> >
> > So offlining the cluster works, except that it doesn't unmount 
> > configfs or dlmfs, apparently because it thinks they are 
> not mounted, 
> > similar to the "o2cb status" detection errors. If I umount them 
> > manually I can online the cluster and get the same happy OK 
> messages I 
> > observed during the original boot process. But again it 
> will not mount....
> >
> > mount /dev/sda5 /root
> > mount: mounting /dev/sda5 on /root failed: Invalid argument
> >
> > I know that the filesystem is ok because I can boot this machine to 
> > another partition with a standard install on ext3, and the cluster 
> > onlines and mounts /dev/sda5 no problem. In that install, the o2cb 
> > init script runs in rcS without difficulty. I believe I have copied 
> > all the relevant files and executables into my initramfs 
> and I'm stuck 
> > on what is going wrong with o2cb. Perhaps there is a 
> dependency that I 
> > am not aware of? Something else that needs to be 
> initialized in this 
> > environment? Any help / tips would be greatly appreciated!
> >
> > Chris
> >
> >
> > _______________________________________________
> > Ocfs2-users mailing list
> > Ocfs2-users at oss.oracle.com
> > http://oss.oracle.com/mailman/listinfo/ocfs2-users
> >   
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out.ext3
Type: application/octet-stream
Size: 12868 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/ocfs2-users/attachments/20060927/fae6eb2f/out-0001.obj


More information about the Ocfs2-users mailing list