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

Sunil Mushran Sunil.Mushran at oracle.com
Tue Sep 26 13:35:04 PDT 2006


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
>   



More information about the Ocfs2-users mailing list