Linux repositories inspector

storage_rebuild(8)

RozoFS
DECEMBER 2014

rozofs-storaged

RozoFS storage daemon

NAME

storage_rebuild - RozoFS disk rebuild utility

SYNOPSIS

Rebuilding a full storage node all files : storage_rebuild [-r <exports>] [-p <//>] [-t <MB/s>] [-l <loop>]
nominal files only : storage_rebuild [-r <exports>] [-p <//>] [-t <MB/s>] [-l <loop>] --nominal
spare files only : storage_rebuild [-r <exports>] [-p <//>] [-t <MB/s>] [-l <loop>] --spare
Rebuilding only one logical storage within a storage node all files : storage_rebuild [-r <exports>] [-p <//>] [-t <MB/s>] [-l <loop>] -s <cid>/<sid>
nominal files only : storage_rebuild [-r <exports>] [-p <//>] [-t <MB/s>] [-l <loop>] -s <cid>/<sid> --nominal
spare files only : storage_rebuild [-r <exports>] [-p <//>] [-t <MB/s>] [-l <loop>] -s <cid>/<sid> --spare
Rebuilding only a device of a logical storage on the same device : storage_rebuild [-r <exports>] [-p <//>] [-t <MB/s>] [-l <loop>] -s <cid>/<sid> -d <device>
relocating files : storage_rebuild [-r <exports>] [-p <//>] [-t <MB/s>] [-l <loop>] -s <cid>/<sid> -d <device> -R
Clearing error counters a device of a logical storage storage_rebuild -C [-r <exports>] -s <cid>/<sid> -d <device>
Rebuilding only a FID of a logical storage storage_rebuild [-r <exports>] [-t <MB/s>] [-l <loop>] -s <cid>/<sid> -f <FID>
Getting the list of FID that are to be rebuilt. Then use rozo_fid2pathname utility on export node to translate FIDs to full path names. storage_rebuild -id <id> -list
Pause a running rebuild in order to resume it later. storage_rebuild -id <id> -pause
Resume a failed or paused rebuild. storage_rebuild -id <id> -resume [-l <loop>]
Abort definitively a rebuild. storage_rebuild -id <id> -abort

DESCRIPTION

storage_rebuild rebuilds
. either a file on a logical storage
. or a device of a logical storage
. or all devices of a logical storage
. or all devices of a storage node.
When the rebuild fails, one can get the list of FIDs that have not been rebuilt. Then with rozo_fid2pathname utility on export node one can translate these FIDs to full path names.
A rebuild can be paused temporarily. It is then possible to resume a paused or failed rebuild (i.e only rebuild the files that are not yet rebuilt).
A monitoring rebuild file provides information on the ongoing rebuild. The name of the rebuild monitoring file is displayed on return from the rebuild command except when --quiet option is set. In any case the name of the rebuild monitoring file can be found in the syslog file.

MAIN OPTIONS

-r, --rebuild <exports> Use <exports> as the list of addresses (or dns names) where exportd daemon is running. When securing the exportd thanks to a virtual IP address only the virtual IP address is given (i.e "--rebuild 192.168.10.1"). When no virtual IP address is used the list of "physical" IP addresses of each host securing the exportd must be given (i.e "--rebuild 192.168.10.1/192.168.20.1"). This parameter can be omitted when the server has been installed with the export_hosts filled in the rozofs.conf configuration file of the server.
-s, --sid <cid>/<sid>
Rebuilds only the logical storage instance <sid> of cluster <cid> of the storage node. When not set the rebuild operates on every logical storage instance of the storage node.
--nominal
Rebuilds only nominal files and no spare file.
--spare
Rebuilds only spare files and no nominal file.
-d, --device <device>
Rebuilds only device number <device> of a logical storage instance. When this option is set option --sid must be set too. When -d is not set, the rebuild is done for every devices of the logical storage or the storage node.
-f, --fid <FID>
Rebuilds only the file identified by <FID>. In this case --sid option is mandatory and --device option is ignored.
-R, --relocate
Enables relocation of the rebuilt files on other devices. This is used for repairing data files of a broken device on the remaining in service devices. When not set the data files are not relocated and are so rebuilt on the same devices they used to be.
-p, --parallel <//>
Use <//> processes in parallel for rebuilding. The greater is <//> the faster is the rebuild, but the more CPU and network/disk bandwidth consuming it is. Use --help option to get the default as well as the maximum value.
-t, --throughput <MB/s>
Limit the network bandwidth used for reading data from the logical storages for each of the processes run in parallel. The value is in MB/s units. When 4 processes are used with a throughput limitation of 10, no more than 40MB/s of network bandwidth will be consummed for reading during this rebuild. Default is not to have any bandwidth limitation.
-l, --loop <loop>
re-attempt automatically up to <loop> times the rebuild on files that fail to rebuild. The rebuild may fail on a file because of write competition between the rebuild process and a user write; a later rebuild re-attempt may then succeed. Use --help option to get the default as well as the maximum value.

ACTION OPTIONS

-pause
Stop a running rebuild. The -id option has to be set to identify the rebuild.
-list
Display the list of FIDs that are still to rebuild after the rebuild has failed or was paused. The -id option has to be set to identify the rebuild. The FID list can be translated into full path names on the export node using the rozo_fid2pathname utility.
-resume
Resume a paused or failed rebuild. The -id option has to be set to identify the rebuild.
-id <id>
<id> is the identifier of a rebuild.
-C, --clear
To re-initialize the satus of a device that has been set out of service after an automatic relocation of the data on other devices (self healing) and then rebuild it.

MISCELLANEOUS OPTIONS

-q, --quiet
This optional parameter enables to avoid any display on the terminal except immediate errors.
-fg
This optional parameter enables to run the rebuild in foreground while the default is to run it in background mode.
-bg
This parameter enables to run a resume in background mode when the target rebuild was previously in foreground.
-c, --config <cfg> Use <cfg> as storage node configuration file. This is optional parameter should not to be used in production.
-o,--output <file>
Write rebuild status in file /var/run/rozofs/rbs/rebuild/<file>.
-O,--OUTPUT <file path>
Write rebuild status in file with absolute name <file path>.
-h, --help Print help.

EXAMPLES

Rebuilding a whole storage node as fast as possible: storage_rebuild --parallel 64
Rebuilding every device of storage instance 2 of cluster 1: storage_rebuild --sid 1/2
Rebuilding only device 3 of storage instance 2 of cluster 1: storage_rebuild --sid 1/2 --device 3
Rebuilding by relocating device 3 of sid 2 of cluster 1 on other devices: storage_rebuild --sid 1/2 --device 3 --relocate
Putting device 3 of storage instance 2 of cluster 1 back in service when it has been set out of service by an automatic rebuild with relocation (self healing) storage_rebuild --sid 1/2 --device

FILES

/etc/rozofs/storage.conf (/usr/local/etc/rozofs/storage.conf)
The system wide configuration file. See storage.conf(5) for further details.
/var/log/syslog
The log file. See syslogd(8) and syslog.conf(5) for further details.

REPORTING BUGS

Report bugs to <>.

COPYRIGHT

Copyright (c) 2013 Fizians SAS. <http://www.fizians.com>
Rozofs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
Rozofs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

AUTHOR

⇧ Top