[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Linux-cluster] Specifying start/stop order of resources in a <resourcegroup>


I'm having some trouble with configuring start/stop order
of resources in a resource group.  When I specify start and
stop level values in resource elements, they are ignored. 
Resources are always started and stopped according to the
type-specific level specified in
cluster/rgmanager/src/resources/resourcegroup.sh (or

What I basically want to do during startup of an RG is
mount a couple of ext3 filesystems in a certain order, run
a custom application, and finally bring up an IP address. 
During shutdown I want to do exactly the opposite: bring
down IP address, stop application, and unmount volumes in
reverse order.

Here's what I have in cluster.conf:

<cluster ...>
    <resourcegroup name="rg1" domain="fd1">
      <fs name="foo" fstype="ext3"
          device="/dev/sdb1" mountpoint="/foo"
          start="1" stop="4"/>
      <fs name="foobar" fstype="ext3"
          device="/dev/sdb2" mountpoint="/foo/bar"
          start="2" stop="3"/>
      <script name="myapp" file="..."
          start="3" stop="2"/>
      <ip address="..." monitor_link="yes"
          start="4" stop="1"/>

The intention is to start the resource top-down, and stop
them bottom-up.  Notice the foobar volume mounts as
subdirectory of foo volume.  foo must be mounted first, and
unmounted last.

But the actual start order with the above configuration
turns out to be fs-foo, fs-foobar, ip and script.  The
order was determined by type-specific default start level
in resourcegroups.sh (fs=2, ip=3, script=5), and then top
to bottom.

The stop sequence was apparently the same as start
sequence.  When I ran "clusvcadm -s rg1" to stop the
resource group, the first thing tried was unmounting foo,
which failed because foobar wasn't unmounted first.  ip or
script was not tried before fs, which leads me to guess
stop sequence is determined by default _start_ level rather
than stop level.

Judging by the stop behavior I think there is a bug
somewhere.  But did I specify start/stop levels in my
cluster.conf incorrectly?



Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]