HASTCTL(8) | MidnightBSD System Manager's Manual | HASTCTL(8) |
hastctl
— Highly
Available Storage control utility
hastctl |
create [-d ]
[-c config]
[-e extentsize]
[-k keepdirty]
[-m mediasize]
name ... |
hastctl |
role [-d ]
[-c config] ⟨init |
primary | secondary⟩ all |
name ... |
hastctl |
list [-d ]
[-c config]
[all | name ...] |
hastctl |
status [-d ]
[-c config]
[all | name ...] |
hastctl |
dump [-d ]
[-c config]
[all | name ...] |
The hastctl
utility is used to control the
behaviour of the hastd(8)
daemon.
This utility should be used by HA software like
heartbeat
or ucarp
to setup
HAST resources role when changing from primary mode to secondary or vice
versa. Be aware that if a file system like UFS exists on HAST provider and
primary node dies, file system has to be checked for inconsistencies with
the fsck(8) utility after
switching secondary node to primary role.
The first argument to hastctl
indicates an
action to be performed:
create
-e
extentsize-k
keepdirty-m
mediasizeIf size is suffixed with a k, M, G or T, it is taken as a kilobyte, megabyte, gigabyte or terabyte measurement respectively.
role
init
primary
secondary
list
status
dump
In addition, every subcommand can be followed by the following options:
Exit status is 0 on success, or one of the values described in sysexits(3) on failure.
Initialize HAST provider, create file system on it and mount it.
nodeB# hastctl create shared nodeB# hastd nodeB# hastctl role secondary shared nodeA# hastctl create shared nodeA# hastd nodeA# hastctl role primary shared nodeA# newfs -U /dev/hast/shared nodeA# mount -o noatime /dev/hast/shared /shared nodeA# application_start
Switch roles for the shared
HAST
resource.
nodeA# application_stop nodeA# umount -f /shared nodeA# hastctl role secondary shared nodeB# hastctl role primary shared nodeB# fsck -t ufs /dev/hast/shared nodeB# mount -o noatime /dev/hast/shared /shared nodeB# application_start
sysexits(3), geom(4), hast.conf(5), fsck(8), ggatec(8), ggatel(8), hastd(8), mount(8), newfs(8)
The hastctl
utility appeared in
FreeBSD 8.1.
The hastctl
was developed by
Pawel Jakub Dawidek
<pjd@FreeBSD.org>
under sponsorship of the FreeBSD Foundation.
September 8, 2016 | midnightbsd-3.1 |