SG_REM_REST_ELEM(8) | SG3_UTILS | SG_REM_REST_ELEM(8) |
sg_rem_rest_elem - send SCSI remove or restore element command
sg_rem_rest_elem [--capacity=RC] [--element=EID] [--help] [--quick] [--remove] [--restore] [--timeout=SE] [--verbose] [--version] DEVICE
Sends a SCSI REMOVE ELEMENT AND TRUNCATE [RMEAT] or RESTORE ELEMENTS AND REBUILD [RSEAR] command to the DEVICE. Since both these commands have a potentially huge impact on the DEVICE (similar to the FORMAT UNIT command: destroying data and taking a long time to complete fully), they first give the user the chance to reconsider (3 times within 15 seconds) before taking action.
Unlike the FORMAT UNIT command, these commands seem designed to work in the background. So they will return quickly (although sbc5r01.pdf does not state that) and the disk will be placed in a reduced functionality state where only a specified number of commands will be executed (e.g. INQUIRY and REPORT LUNS) until the operation is complete. Other commands will receive sense data with a sense key of NOT READY and an additional sense code of 'Depopulation in progress' (for RMEAT) or 'Depopulation restoration in progress' (for RSEAR).
The REMOVE ELEMENT AND TRUNCATE has a close relative in ZBC-2
called the REMOVE ELEMENT AND MODIFY ZONES [RMEMZ] command. See the sg_zone
utility for an implementation of the latter command.
The difference between RMEAT and RMEMZ is that the former "changes the
association between LBAs and physical blocks" and the latter does not
change that association. Zones affected by the RMEMZ command are placed into
the zone condition: "Offline".
Arguments to long options are mandatory for short options as well.
Once an element is removed successfully it is termed as "depopulated". Depopulated elements that have the 'Restoration Allowed' (RALWD) bit set (see sg_get_elem_status) are candidates for future restoration.
A (storage) element of a rotating hard disk is one side of a platter typically associated with one head. Such hard disks typically have multiple platters with two heads per platter (i.e. one head each side of the platter).
The exit status of sg_rem_rest_elem is 0 when it is successful. Otherwise see the sg3_utils(8) man page.
Written by Douglas Gilbert.
Report bugs to <dgilbert at interlog dot com>.
Copyright © 2022-2023 Douglas Gilbert
This software is distributed under a BSD-2-Clause license. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
sg_get_elem_status,sg_zone(sg3_utils)
May 2023 | sg3_utils-1.48 |