Enabling and disabling resources

Enabling resources

Normally, all resources configured in /etc/drbd.conf are automatically enabled upon system startup by the /etc/init.d/drbd init script. If you choose to disable this startup script (as may be required by some applications), you may enable specific resources by issuing the commands

drbdadm attach resource
drbdadm syncer resource
drbdadm connect resource

or the shorthand version of the three commands above,

drbdadm up resource

As always, you may use the keyword all instead of a specific resource name if you want to enable all resources configured in /etc/drbd.conf at once.

Disabling resources

You may temporarily disable specific resources by issuing the commands

drbdadm disconnect resource
drbdadm detach resource

or the shorthand version of the above,

drbdadm down resource

[Note]Note

There is, in fact, a slight syntactical difference between these two methods. While drbdadm down implies a preceding resource demotion, drbdadm disconnect/detach does not. So while you can run drbdadm down on a resource that is currently in the primary role, drbdadm disconnect/detach in the same situation will be refused by DRBD's internal state engine.

Here, too, you may use the keyword all in place of a resource name if you wish to temporarily disable all resources listed in /etc/drbd.conf at once.