Scroll to navigation

storage_rebuild(8) User Manuals storage_rebuild(8)

NAME

storage_rebuild - RozoFS disk rebuild utility

SYNOPSIS


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

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

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
storage_rebuild -C [-r <exports>] -s <cid>/<sid> -d <device>
storage_rebuild [-r <exports>] [-t <MB/s>] [-l <loop>] -s <cid>/<sid> -f <FID>
storage_rebuild -id <id> -list
storage_rebuild -id <id> -pause
storage_rebuild -id <id> -resume [-l <loop>]
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

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.

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.

Rebuilds only nominal files and no spare file.

Rebuilds only spare files and no nominal file.

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.

Rebuilds only the file identified by <FID>. In this case --sid option is mandatory and --device option is ignored.

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.

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.

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.

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


Stop a running rebuild. The -id option has to be set to identify the rebuild.

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 a paused or failed rebuild. The -id option has to be set to identify the rebuild.

<id> is the identifier of a rebuild.

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


This optional parameter enables to avoid any display on the terminal except immediate errors.

This optional parameter enables to run the rebuild in foreground while the default is to run it in background mode.

This parameter enables to run a resume in background mode when the target rebuild was previously in foreground.
Use <cfg> as storage node configuration file. This is optional parameter should not to be used in production.

Write rebuild status in file /var/run/rozofs/rbs/rebuild/<file>.

Write rebuild status in file with absolute name <file path>.
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 3 --clear

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 <bugs@fizians.org>.

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

Fizians <http://www.fizians.org>

SEE ALSO

rozofs(7), storage.conf(5), rozofs.conf(5), exportd(8), rozofsmount(8)

DECEMBER 2014 RozoFS