Operating System - Linux
1753427 Members
4852 Online
108793 Solutions
New Discussion юеВ

disable autostart LVM on redhat AS4

 
kevin leong
Frequent Advisor

disable autostart LVM on redhat AS4

Dear Expert ,
May I know that how could deactive LVM loading on redhat AS 4 .

Reason I ask because I knew HPUX can select vgXX to start as manual .

SuSe also can select which vgXX to active .Can RedHat AS4 can do this ?

Thanks
LeongKO
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: disable autostart LVM on redhat AS4

Shalom,

the vgchange command works exactly the same on Linux as it does on HP-UX.

What I'm sure of is a vg configuration file that can control vg activation at startup. If the feature exists, the filename is different than HP-UX.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Serviceguard for Linux
Honored Contributor

Re: disable autostart LVM on redhat AS4

If you want to deactivate at boot add the following to rc.sysinit. Make sure you add it near the end where you are sure it will be executed. It needs to be near teh end because the overall LVM start commands are in this file.

Command:
vgchange -a n

for each VG you want to make sure is deactivated at boot.

Serviceguard for Linux
Honored Contributor

Re: disable autostart LVM on redhat AS4

Just noticed my typos in my other answer. That is teh problem with answering too early in the morning. I didn't mean "overall" but meant "other".

There are other vg related commands in /etc/rc.sysinit. You want to make sure that any vgchange commands you add are after the ones that are already there. Also, make sure you are not in any of the "if" commands.
kevin leong
Frequent Advisor

Re: disable autostart LVM on redhat AS4

HI Guys ,
Possible that showing step by step or give template ?

I not clear what you mean .

Thanks
leongko
Serviceguard for Linux
Honored Contributor

Re: disable autostart LVM on redhat AS4

Below is an extract from a /etc/rc.sysinit file.
The comments and the example show where to do
the changes. This is about 30 lines before the end of the file.

Hope this helps.



# Boot time profiles. Yes, this should be somewhere else.
if [ -x /usr/sbin/system-config-network-cmd ]; then
if strstr "$cmdline" netprofile= ; then
for arg in $cmdline ; do
if [ "${arg##netprofile=}" != "${arg}" ]; then
/usr/sbin/system-config-network-cmd --profile ${arg##netprofile=}
fi
done
fi
fi
#
# Add the vgchange commands here to disable all of the
# VGs used by SGLX packages
vgchange -a n VGPKG1
vgchange -a n VGPKG2
#
#

# Now that we have all of our basic modules loaded and the kernel going,
# let's dump the syslog ring somewhere so we can find it later
dmesg -s 131072 > /var/log/dmesg

# create the crash indicator flag to warn on crashes, offer fsck with timeout
touch /.autofsck &> /dev/null