[ClusterLabs] Antw: [EXT] Changing order in resource group after it's created

Reid Wahl nwahl at redhat.com
Fri Dec 18 01:43:17 EST 2020


I agree that it is somewhat counter-intuitive. It is in the `--help`
output, however -- although you have to already have an idea of where
to look in order to find it ;).

[root at fastvm-rhel-7-6-21 ~]# pcs resource group --help

Usage: pcs resource group...
    group add <group id> <resource id> [resource id] ... [resource id]
              [--before <resource id> | --after <resource id>] [--wait[=n]]
        Add the specified resource to the group, creating the group if it does
        not exist. If the resource is present in another group it is moved to
        the new group. You can use --before or --after to specify the position
        of the added resources relatively to some resource already existing in
        the group. By adding resources to a group they are already in and
        specifying --after or --before you can move the resources in the group.
        If --wait is specified, pcs will wait up to 'n' seconds for the
        operation to finish (including moving resources if appropriate) and
        then return 0 on success or 1 on error. If 'n' is not specified it
        defaults to 60 minutes.


Note: "By adding resources to a group they are already in and
specifying --after or --before you can move the resources in the
group."

On Thu, Dec 17, 2020 at 3:39 AM Tony Stocker <akostocker at gmail.com> wrote:
>
> On Thu, Dec 17, 2020 at 6:29 AM Ulrich Windl
> <Ulrich.Windl at rz.uni-regensburg.de> wrote:
> >
> > >>> Tony Stocker <akostocker at gmail.com> schrieb am 17.12.2020 um 12:21 in
> > Nachricht
> > <CACLi31X9=aibQK5LaWAvHPrD+ych6-a2aTVwYxZhaXSftHKq7w at mail.gmail.com>:
> > > I have a resource group that has a number of entries. If I want to
> > > reorder them, how do I do that?
> > >
> > > I tried doing this:
> > >
> > > pcs resource update FileMount ‑‑after InternalIP
> > >
> > > but got this error:
> > >
> > > Error: Specified option '‑‑after' is not supported in this command
>
> >
> > I have no experince with pcs, but with crm I'd do:
> > enable maintenance mode (if you cannot restart the group)
> > "crm configure edit <groupname>
> > disable maintenance mode (the cluster should see that everything that is t be
> > started is started, and things should be OK)
> >
> > Regards,
> > Ulrich
>
> Thanks. I think I may have figured out the way using pcs, it seems
> somewhat counterintuitive to me but you have to use 'pcs resource
> group' as if you're creating a new group, but you use the existing
> group id, so the command looks like this:
>
> pcs resource group add webserver FileMount --after InternalIP
>
>
> It appears to work, so I suppose I should have waited before posting
> but that's usually how it is. I bang my head against the desk for an
> hour without finding something, then I post a question and magically I
> find the answer right afterwards. C'est la guerre!
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/



-- 
Regards,

Reid Wahl, RHCA
Senior Software Maintenance Engineer, Red Hat
CEE - Platform Support Delivery - ClusterHA



More information about the Users mailing list