I have worked quite a bit with CentOS 4.x with SAN, multipathing, LVM etc. The way I mount my file systems is using a script that is called during startup that runs fsck, imports the physical volumes, and volume groups, activates the logical volumes, creates the mount point if needed then mounts the volume, I mainly made it for software iSCSI due to the iscsi stack loading after the system mount process. I adapted it to my fiber channel systems as well and it worked great(mainly so I could have a consistent experience between FC and iSCSI).
In testing with CentOS 5.1 it seems that my entries in /etc/fstab that are marked "noauto" are still infact queried when the system boots (before multipathing, etc fires up). These devices don't exist at the time which causes the boot to halt(so I can fsck the file system manually). I have worked around it by commenting out the line in fstab, and just adjusting my script to look for the commented line, but this never happened under CentOS 4.x, seems like a bug ? I peeked at Red Hat's bugzilla but didn't see much.
If so I can file one..
thanks
nate
On Wed, 2008-11-19 at 10:29 -0800, nate wrote:
I have worked quite a bit with CentOS 4.x with SAN, multipathing, LVM etc. The way I mount my file systems is using a script that is called during startup that runs fsck, imports the physical volumes, and volume groups, activates the logical volumes, creates the mount point if needed then mounts the volume, I mainly made it for software iSCSI due to the iscsi stack loading after the system mount process. I adapted it to my fiber channel systems as well and it worked great(mainly so I could have a consistent experience between FC and iSCSI).
Hmm.. not sure about older versions of CentOS but for lvm over iscsi in 5.2 all you should need is
/dev/foo.vg/foo.lv /foo xfs _netdev,noatime,rw 0 0
in /etc/fstab and iscsi node startup set to automatic (which is the default I believe). _netdev being the key as it will mount it after iscsi is loaded and connected.
And since the volume is being asked to mount at boot time, the startup scripts are smart enough to find and activate the volume group and logical volume.
Nothing extra required.
Only issue I've had is sometimes after unclean shutdowns the volume group gets deactivated and must be manually activated and mounted, though this has never prevented booting.
Though this doesn't include the fsck'ing you mentioned..
On Wed, 2008-11-19 at 10:48 -0800, nate wrote:
Matthew Kent wrote:
Hmm.. not sure about older versions of CentOS but for lvm over iscsi in 5.2 all you should need is
/dev/foo.vg/foo.lv /foo xfs _netdev,noatime,rw 0 0
Any idea if that takes into account multipathing as well?
Yeah it does. multipathd is started by default just after iscsi so everything works nicely.
thanks for the info!
No problem :)
Matthew Kent wrote:
On Wed, 2008-11-19 at 10:29 -0800, nate wrote:
I have worked quite a bit with CentOS 4.x with SAN, multipathing, LVM etc. The way I mount my file systems is using a script that is called during startup that runs fsck, imports the physical volumes, and volume groups, activates the logical volumes, creates the mount point if needed then mounts the volume, I mainly made it for software iSCSI due to the iscsi stack loading after the system mount process. I adapted it to my fiber channel systems as well and it worked great(mainly so I could have a consistent experience between FC and iSCSI).
Hmm.. not sure about older versions of CentOS but for lvm over iscsi in 5.2 all you should need is
/dev/foo.vg/foo.lv /foo xfs _netdev,noatime,rw 0 0
in /etc/fstab and iscsi node startup set to automatic (which is the default I believe). _netdev being the key as it will mount it after iscsi is loaded and connected.
Found the root issue here I believe in /etc/rc.sysinit
if [ "${RHGB_STARTED}" != "0" -a -w /etc/rhgb/temp/rhgb-console ]; then fsck -T -t noopts=_netdev -A $fsckoptions > /etc/rhgb/temp/rhgb-console else fsck -T -t noopts=_netdev -A $fsckoptions fi
It scans all file systems by default unless the _netdev option is set, whereas in CentOS 4.x it ONLY scans the root file system
if [ "${RHGB_STARTED}" != "0" -a -w /etc/rhgb/temp/rhgb-console ]; then fsck -T -a $rootdev $fsckoptions > /etc/rhgb/temp/rhgb-console else initlog -c "fsck -T -a $rootdev $fsckoptions" fi
I'll think about filing a bug/feature request I think the 'noauto' option should be included in the exclusion list.
Perhaps fsck should be fixed as well, according to the manpage 'noauto' means it won't get mounted when you do mount -a, perhaps it should not get fsck'd either if you do fsck -A
nate