1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
=head1 NAME
nbddiscard, nbdzero - discard or zero all data on a Network Block Device
=head1 SYNOPSIS
nbddiscard [-c|--check] [-z|--zero] [--fast-zero]
[-q|--quiet] [-v|--verbose] [-y|--yes]
[-o|--offset OFFSET] [-l|--length LENGTH] NBD-URI
nbddiscard -V|--version
nbddiscard -h|--help
=for paragraph
nbdzero [-c|--check] [--fast-zero]
[-q|--quiet] [-v|--verbose] [-y|--yes]
[-o|--offset OFFSET] [-l|--length LENGTH] NBD-URI
nbdzero -V|--version
nbdzero -h|--help
=head1 DESCRIPTION
nbddiscard discards all data on a Network Block Device (NBD) endpoint.
If supported, this frees up the backing storage and makes the device
completely sparse. For example, if an NBD server is running locally
on port 10809 you could do:
$ nbddiscard nbd://localhost
PERMANENTLY ERASE everything on nbd://localhost bytes 0 - 1073741823
(y/N)? y
nbdzero is the same, but the data is replaced by allocated, zeroed
blocks.
B<All data in the discarded or zeroed region is PERMANENTLY ERASED.>
For information about NBD URIs, see L<nbd_connect_uri(3)>.
=head1 OPTIONS
=over 4
=item B<-c>
=item B<--check>
Rather than modify the disk, merely check whether it is already sparse,
or with I<-z> that it already reads as zero.
=item B<--fast-zero>
Attempt fast zero (see L<nbd_can_fast_zero(3)>), which implies
I<--zero>.
Not all servers support the fast zero flag, but those that do promise
that an attempted fast zero operation will either complete more
quickly than explicitly writing zeroes to the image, or that it will
immediately fail because the operation is not inherently faster.
=item B<-h>
=item B<--help>
Display brief command line help and exit.
=item B<-l> LENGTH
=item B<--length> LENGTH
Instead of discarding to the end of the disk, discard only length
bytes. You can use the normal suffixes like C<K>, C<M> etc.
=item B<-o> OFFSET
=item B<--offset> OFFSET
Instead of starting from the beginning of the disk, start at the given
offset. You can use the normal suffixes like C<K>, C<M> etc.
=item B<-q>
=item B<--quiet>
Quiet mode, do not print any warnings.
=item B<-v>
=item B<--verbose>
Enable verbose libnbd messages. This has the same effect as setting
the environment variable C<LIBNBD_DEBUG=1>
=item B<-V>
=item B<--version>
Display the package name and version and exit.
=item B<-y>
=item B<--yes>
Assume yes to all questions. This will proceed straight to erasing
your data. Use this in scripts to avoid interactivity.
=item B<-z>
=item B<--zero>
Zero, instead of discarding. nbdzero is just nbddiscard with I<-z>.
=back
=head1 SEE ALSO
L<libnbd(3)>,
L<libnbd-python(3)>,
L<nbd_connect_uri(3)>,
L<nbdcopy(1)>,
L<nbddump(1)>,
L<nbdfuse(1)>,
L<nbdinfo(1)>,
L<nbdsh(1)>,
L<nbdublk(1)>,
L<blkdiscard(8)>,
L<qemu-img(1)>.
=head1 AUTHORS
Richard W.M. Jones
=head1 COPYRIGHT
Copyright Red Hat
|