Commit Graph

368 Commits (master)

Author SHA1 Message Date
David Sterba 4a1d07e8c3 btrfs-progs: docs: mount options, enhance ssd/nossd
Reported-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-31 19:40:05 +02:00
Nicholas D Steeves 17144afb40 btrfs-progs: docs: fix many typos, plus three edits for clarity
Signed-off-by: Nicholas D Steeves <nsteeves@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:48 +01:00
Joey Sabey d8eec1c0c1 btrfs-progs: docs: fix typo in btrfs-quota
qgruops -> qgroups

Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:48 +01:00
Joey Sabey 9a4b0e512e btrfs-progs: docs: fix typo in btrfs-quota
reinstall ation -> reinstallation

Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:48 +01:00
Erik Logtenberg 44a8084d39 btrfs-progs: docs: fix typo in btrfs-scrub manual page
Changed "An" to "A".

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:48 +01:00
Austin S. Hemmelgarn 01bba62728 btrfs-progs: better document btrfs receive security
This adds some extra documentation to the btrfs-receive manpage that
explains some of the security related aspects of btrfs-receive.  The
first part covers the fact that the subvolume being received is writable
until the receive finishes, and the second covers the current lack of
sanity checking of the send stream.

Signed-off-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
Suggested-by: Graham Cobb <g.btrfs@cobb.uk.net>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:47 +01:00
Jonathan Boulle 2c23b7b871 btrfs-progs: docs: fix typo in receive man page
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:46 +01:00
David Sterba 2920c8d526 btrfs-progs: build: remove unused variables from docs makefile
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:46 +01:00
Tsutomu Itoh bd1ac1fb1d btrfs-progs: qgroup: add sync option to 'qgroup show'
The 'qgroup show' command does not synchronize filesystem.
Therefore, 'qgroup show' may not display the correct value unless
synchronized with 'filesystem sync' command etc.

So add the '--sync' option so that we can choose whether or not
to synchronize when executing the command.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-01-25 09:48:33 +01:00
Esteve Fernandez e135ee70b8 btrfs-progs: docs: fix typo in btrfs-subvolume
Signed-off-by: David Sterba <dsterba@suse.com>
2017-01-25 09:47:53 +01:00
David Sterba 52f21fc769 btrfs-progs: defrag: force using v2 defrag ioctl and make default 32M threshold actually work
A user reported on IRC that the new 32M default for target extent size
does not work. This happens because if there are no commandline options,
the v1 ioctl is used that does not do any fine grained defrag. As the v2
ioctl has been introduced 6 years ago (2010, kernel 2.6.33) we won't
keep backward compatibility anymore.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-01-25 09:47:43 +01:00
Nicholas D Steeves b757cf4ba7 btrfs-progs: Fix spelling/typos in user-facing strings
Signed-off-by: Nicholas D Steeves <nsteeves@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-01-25 09:47:40 +01:00
David Sterba d62902e95b btrfs-progs: dev stats: update option name for checking non-zero status
Rename the option to -c|--check and update documentation.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:36 +01:00
David Sterba b67e9a1b13 btrfs-progs: docs: update dev stats help and manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:36 +01:00
David Sterba 01bafdbc90 btrfs-progs: dev stats: add long option for -z
Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:36 +01:00
Austin S. Hemmelgarn afd1e7b4e3 btrfs-progs: dev stats: add dev stats returncode option
Currently, `btrfs device stats` returns non-zero only when there was an
error getting the counter values.  This is fine for when it gets run by a
user directly, but is a serious pain when trying to use it in a script or
for monitoring since you need to parse the (not at all machine friendly)
output to check the counter values.

This patch adds an option ('-s') which causes `btrfs device stats`
to set bit 6 in the return code if any of the counters are non-zero.
This greatly simplifies checking from a script or monitoring software if
any errors have been recorded.  In the event that this switch is passed
and an error occurs reading the stats, the return code will have bit
0 set (so if there are errors reading counters, and the counters which
were read were non-zero, the return value will be 65).

Signed-off-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:35 +01:00
Noah Massey 0a7f141007 btrfs-progs: docs: fix typo in mkfs manual page
Signed-off-by: Noah Massey <noah.massey@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:35 +01:00
Adam Borowski 0a074116fc btrfs-progs: man mkfs: warn about RAID5/6 being experimental
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:35 +01:00
David Sterba b3afc1e814 btrfs-progs: docs: clarify trim after mkfs -K
A user question on IRC about mkfs -K and mount with discard.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:35 +01:00
David Sterba 44c22cf8be btrfs-progs: docs: update receive help and manual page
Reword several option descriptions, add missing short option -E,
formatting adjustments.

Visual bug fix: the first line is printed in short help, the second line
is long description, thus alternative calling syntax must be printed on
one line.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:34 +01:00
Qu Wenruo 798cec84dd btrfs-progs: receive: introduce option to dump send stream
Introduce new option, '--dump' for receive subcommand.

With this command, user can dump the metadata of a send stream.
Which is quite useful for education purpose or bug reporting.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:34 +01:00
David Sterba d960f81d8e btrfs-progs: docs: fix typo in btrfs-man5
Reported via IRC.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-30 12:42:09 +01:00
David Sterba d8f93ce802 btrfs-progs: Update README and other docs
Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-23 11:07:05 +01:00
Omar Sandoval a064f24e2e btrfs-progs: document space_cache=v2 more thoroughly
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-23 11:07:05 +01:00
Omar Sandoval 87895ef4da btrfs-progs: implement btrfs check --clear-space-cache v2
Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
[ adjusted error messages ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-23 11:07:05 +01:00
David Sterba a2214e582c btrfs-progs: docs: fix typo in btrfs-scrub manual page
Reported on IRC.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-23 10:50:37 +01:00
David Sterba 9e0dd182b4 btrfs-progs: docs: update mkfs help string and manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-09 13:47:34 +01:00
Qu Wenruo eb8a61b235 btrfs-progs: check: add support to clear v1 free space cache
Kernel clear_cache mount option will only rebuild free space cache if
the used space of that chunk has changed.

So it won't ensure any corrupted free space cache get cleared.

So add a new option "--clear-space-cache v1|v2" to btrfsck, to
completely wipe out free space cache.
So kernel won't complain again.

Reported-by: Ivan P <chrnosphered@gmail.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
[ adjusted error messages, doc wording changes ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-09 13:12:47 +01:00
Nicholas D Steeves 6bdb1cfbc1 btrfs-progs: fix user-facing typos in docs and help strings
Signed-off-by: Nicholas D Steeves <nsteeves@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 15:07:22 +02:00
Adam Borowski aa8ad8d4ae btrfs-progs: docs: document exit codes from scrub
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 15:07:22 +02:00
Lakshmipathi.G b56fe16922 btrfs-progs: convert: check source file system state
Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in>
[ add doc note ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:35:49 +02:00
adduxa 7f26e64ddd btrfs-progs: docs: fix typos in btrfs-subvolume
[ Documentation fix, github pull request 16 ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 11:50:13 +02:00
David Sterba 67786272ea btrfs-progs: docs: update flushoncommit default value
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 11:47:38 +02:00
Qu Wenruo f04db96f61 btrfs-progs: docs: Add warning for build RAID btrfs on partions from the same device
Quite a common sense for any RAID-like multi-device setup, just in case.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 11:47:35 +02:00
Qu Wenruo 53c4e289c2 btrfs-progs: mkfs: Warn user for minimal RAID5/6 devices setup
For RAID5, 2 devices setup is just RAID1 with more overhead.
For RAID6, 3 devices setup is RAID1 with 3 copies, not what most user
want.

So warn user at mkfs time for such case, and add explain in man pages.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 11:47:31 +02:00
David Sterba a5bd848719 btrfs-progs: dump-super: changes in options to specify superblocks
Some tools (check, select-super, dump-super) can use the alternate
superblocks, but the options are not consistent. To make it less
confusing, change the meaning of option -s in 'dump-super' to specify
the superblock copy, instead of taking the offset.

Though this is a change in UI, the old usage is detected and the result
would be the same, no breakage in existing scripts.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 11:46:33 +02:00
David Sterba 51d41fac76 btrfs-progs: docs: describe filesystem features
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-05 10:05:30 +02:00
David Sterba 55aa862ea2 btrfs-progs: docs: refer to btrfs(5) from btrfs(8)
Signed-off-by: David Sterba <dsterba@suse.com>
2016-08-18 19:50:43 +02:00
David Sterba 637c005ac8 btrfs-progs: docs: update btrfs-quota manual page, more sections
Add more overall sections.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-08-18 19:50:43 +02:00
David Sterba c7f8852296 btrfs-progs: docs: update btrfs-quota manual page
Copy the intoductory and usecases from the text written by Arne Jansen,

https://git.kernel.org/cgit/linux/kernel/git/arne/qgroups-doc.git/

The graphics missing for now.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-08-18 19:50:43 +02:00
David Sterba 87c1bd13c1 btrfs-progs: check: adjust command line options for the low-memory mode
Change the single-purpose option --low-memory to a generic option that
takes the mode. Currently supported are the original mode and the
low-memory in the same way.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-08-17 20:00:00 +02:00
Lu Fengqi bfecd8bd6a btrfs-progs: check: introduce low memory mode
Introduce a new fsck mode: low memory mode.

Old btrfsck is working efficiently but uses some memory for each extent
item.  This method will ensure extents are only iterated once at
extent/chunk tree check process.

But since it uses some memory for each extent item, for a large fs with
several TB metadata, this can easily eat up memory and cause OOM.

To handle such limitation and improve scalability, the new low-memory
mode will not use any heap memory to record which extent is checked.
Instead it will use extent backref to avoid most of uneeded checks on
shared fs/subvolume tree blocks.
And with the use forward and backward reference cross check, we can also
ensure every tree block is at least checked once.

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-08-17 19:04:51 +02:00
David Sterba 2f732723d6 btrfs-progs: fi defrag: change default extent target size to 32 MiB
The kernel default is too low, 32 MiB is recommended and should give
better results.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-28 14:08:30 +02:00
Qu Wenruo 2542112e0c btrfs-progs: Doc: Fix format error in btrfs-send
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-28 14:08:30 +02:00
David Sterba 7ce43670da btrfs-progs: docs: update btrfs-balance manual page
Update the new options.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-28 14:08:29 +02:00
Austin S. Hemmelgarn fe520b5cdc btrfs-progs: add option to run balance as daemon
Currently, balance operations are run synchronously in the foreground.
This is nice for interactive management, but is kind of crappy when you
start looking at automation and similar things.

This patch adds an option to `btrfs balance start` to tell it to
daemonize prior to running the balance operation, thus allowing us to
preform balances asynchronously.  The two biggest use cases I have for
this are starting a balance on a remote server without establishing a
full shell session, and being able to background the balance in a
recovery shell (which usually has no job control) so I can still get
progress information.

Because it simply daemonizes prior to calling the balance ioctl, this
doesn't actually need any kernel support.

Signed-off-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-26 19:26:29 +02:00
David Sterba 94d9fbbf01 btrfs-progs: docs: update btrfs manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-15 00:50:08 +02:00
David Sterba 4ec42ec46c btrfs-progs: docs: update btrfs-convert manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-15 00:20:48 +02:00
David Sterba e7d6760b1c btrfs-progs: docs: update btrfs-filesystem manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-14 23:43:38 +02:00
David Sterba 4692425c3f btrfs-progs: docs: update btrfs-scrub manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-14 23:35:26 +02:00
David Sterba c3e1703005 btrfs-progs: docs: update btrfs-subvolume manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-13 18:44:52 +02:00
David Sterba 97bb68ebf3 btrfs-progs: docs: update btrfs-balance manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-13 18:44:52 +02:00
David Sterba e67219255c btrfs-progs: docs: man5, document control device
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-13 18:44:45 +02:00
David Sterba b40233fa2e btrfs-progs: docs: update 'btrfs-device' manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-21 02:50:27 +02:00
David Sterba b8288277fb btrfs-progs: docs: update btrfs-restore manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-17 17:02:12 +02:00
Satoru Takeuchi 68702ea009 btrfs-progs: doc: correct the destination of btrfs-receive
We can set not only btrfs mount point but also any path belong to
btrfs mount point as btrfs-receive's destination.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-14 10:52:17 +02:00
Noah Massey 935d22ed15 btrfs-progs: doc: add missing newline in btrfs-convert
Signed-off-by: Noah Massey <noah.massey@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-14 10:47:15 +02:00
Merlin Hartley 57744bd1d2 btrfs-progs: doc: fix typo in btrfs-subvolume
Signed-off-by: Merlin Hartley <merlinhartley@hotmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-01 14:56:56 +02:00
David Sterba 16570509f6 btrfs-progs: docs: compression is disabled with nodatasum/nodatacow
Explicitly mention the constraints in all involved options.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-01 14:56:56 +02:00
M G Berberich 09c052a8b4 btrfs-progs: send: add quiet option
Add new options -q,--quiet to prevent printing messages on stderr, added
--verbose as alternative for -v.  Moved 'Mode NO_FILE_DATA enabled'
message to stderr. The default verboisty level is 1 to keep some
backward compatibility.

Signed-off-by: M G Berberich <btrfs@oss.m-berberich.de>
[ minor adjustments in the options, help text and changelog, added
  manual page text ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-01 14:56:56 +02:00
David Sterba 21dc9050b5 btrfs-progs: docs: clarify why mkfs selects single for SSDs
The section raised some user questions on IRC.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba 5079ae684a btrfs-progs: docs: update btrfs-check
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba ce69f8c36e btrfs-progs: docs: update btrfs-select-super
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba ae213f7633 btrfs-progs: docs: update btrfs-receive
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba eb3092c2a1 btrfs-progs: docs: update btrfs-send
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba 162257574a btrfs-progs: docs: update btrfs-scrub
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba b3751c131a btrfs-progs: docs: update btrfs-man5
Wording, added new options.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba c54b5a545e btrfs-progs: add safety delay before starting full balance
A short delay with a warning before starting a full balance should
improve usability. We have been getting reports from people who run full
balance after following some random advice and then get surprised by the
performance impact.

The countdown is done even when run from scripts, but as the whole
balance takes significanly more time, this shouldn't be an issue.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-02 14:44:56 +02:00
Alexander Fougner 1a9df1c68b btrfs-progs: update docs and completion for tree-stats
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-02 14:39:57 +02:00
David Sterba a5948c56bf btrfs-progs: docs: update mkfs page for dup on multidev fs
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-30 16:56:32 +02:00
David Sterba 40dc7c504c btrfs-progs: docs: man5, add space_cache=v2
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-17 14:49:32 +01:00
David Sterba c58e4d40bf btrfs-progs: docs: fi defrag, make some paragraphs more visible
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-16 19:03:05 +01:00
Satoru Takeuchi 4b80569b58 btrfs-progs: Describe optarg of -m option in the manpage of receive
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-16 10:16:20 +01:00
David Sterba fabe745d3b btrfs-progs: docs: add filesystem du
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-15 18:25:05 +01:00
David Sterba 80414d6939 btrfs-progs: remove btrfs-show-super manual page and point to inspect-internal
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-15 17:27:34 +01:00
David Sterba 7aedf5067b btrfs-progs: docs: update dump-super
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-15 17:16:00 +01:00
David Sterba 029b2433eb btrfs-progs: docs: rename and move dump-super
The command name is 'dump-super', move the section to it's alphabetical
order.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-15 16:44:55 +01:00
Anand Jain 2490de5da5 btrfs-progs: Introduce device delete by devid
This patch introduces new option <devid> for the command

  btrfs device delete <device_path|devid>[..]  <mnt>

In a user reported issue on a 3-disk-RAID1, one disk failed with its
SB unreadable. Now with this patch user will have a choice to delete
the device using devid.

The other method we could do, is to match the input device_path
to the available device_paths with in the kernel. But that won't
work in all the cases, like what if user provided mapper path
when the path within the kernel is a non-mapper path.

This patch depends on the below kernel patch for the new feature to work,
however it will fail-back to the old interface for the kernel without the
patch

  Btrfs: Introduce device delete by devid

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 14:11:33 +01:00
David Sterba 5f17513313 btrfs-progs: docs: fix more typos and spelling errors
With help of ispell.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 14:11:31 +01:00
Alexander Fougner 1086629272 btrfs-progs: docs: fix spelling errors
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:44:17 +01:00
David Sterba 83ad1dcbb0 btrfs-progs: remove btrfs-debug-tree manual page and point to inspect-internal
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
David Sterba 69874af7b8 btrfs-progs: dump-tree: let --tree understand name of the tree
For practical purposes teach -t about the human readable names of the
trees in addition to the numerical id. The name syntax is flexible.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
David Sterba 1538bc01ad btrfs-progs: docs: update dump-tree
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
Satoru Takeuchi 142041bb03 btrfs-progs: Describe device scan -d is a deprecated option in manpage
It's already marked as deprecated in cmd_device_scan_usage().

commit 5444864e56 ("btrfs-progs: remove BTRFS_SCAN_PROC scan method")

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
David Sterba 28d924290e btrfs-progs: docs: update check options
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
Vytas Dauksa 1e8246a058 btrfs-progs: convert: document -O|--features flag
Copy-pasted description found at mkfs.btrfs. I did not bother with
feature list as it seemed to be incomplete.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
Alexander Fougner c27640938d btrfs-progs: docs: add note about resizing to max after device replace
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
[ formatting adjustments ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
Alexander Fougner 2ae0b12df0 btrfs-progs: update docs for inspect-internal dump-super
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
[ minor formatting updates ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
Alexander Fougner a7dae09ae2 btrfs-progs: update docs and completion for inspect-internal dump-tree
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
Satoru Takeuchi 194a4053f9 btrfs-progs: describe btrfs-send requires read-only subvolume
Both man btrfs-send(8) and usage message don't describe
btrfs-send needs read-only snapshot as its argument.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-02-04 15:19:32 +01:00
Satoru Takeuchi bf111ecf90 btrfs-progs: Fix self-reference of man btrfs-subvolume
btrfs-subvolume(8) is mentioned at "SEE ALSO" section of itself.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-02-04 15:19:29 +01:00
Tsutomu Itoh 060a55c331 btrfs-progs: doc: fix size suffix in mkfs.btrfs
There is no petabyte in the explanation of the suffix of
the size parameter. So, it's added.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-28 12:42:00 +01:00
Tsutomu Itoh 39ac3d16c1 btrfs-progs: doc: fix typo of some documents
Some typos are corrected.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-28 12:41:56 +01:00
David Sterba 2460df7cd6 btrfs-progs: docs: update balance manual page
Make the new balance filters' syntax more explicit. Other rewording and
reformatting.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-15 15:19:50 +01:00
David Sterba ecd4bb607f btrfs-progs: docs: enhance btrfs-filesystem manual page
Wording, formatting, explanations, examples.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 18:42:49 +01:00
David Sterba 83a7413318 btrfs-progs: docs: document new mount option fragment
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:54 +01:00
David Sterba 23c51533ae btrfs-progs: docs: sort mount options alphabetically
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:54 +01:00
David Sterba 32c063ccb7 btrfs-progs: docs: rename btrfs-mount to btrfs-man5
The page does will not contain only mount options but other stuff.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:53 +01:00
David Sterba a8829f5335 btrfs-progs: docs, btrfs-mount: enhance file attributes section
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:02:53 +01:00
David Sterba cf0fce7ed4 btrfs-progs: docs, enhance the mount option manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:07 +01:00
David Sterba 154c389e92 btrfs-progs: docs, btrfs-mount: enhance fatal_erros
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:07 +01:00
David Sterba 79b8750fe7 btrfs-progs: docs, btrfs-mount: put NOTE tag to new paragraph
Otherwise it's not rendered properly.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:07 +01:00
David Sterba 7dffef0a37 btrfs-progs: docs, btrfs-mount: unindent descriptions
Asciidoc ignores special keywords like WARNING or NOTE if they're not at
the beginning of the line and they're not renedered very visibly in the
end.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:07 +01:00
Christoph Anton Mitterer d0ba996f5f btrfs-progs: document snapshot unaware defrag
In btrfs-filesystem(8), improved the documentation of snapshot unaware
defragmentation and included the exact kernel version numbers being affected as
well as the possible effects.
No longer use the word "unlink" which is easily understood as "deleting a file".
Moved the warning more to the beginning of "defragment" subcommand's
documentation where it's more visible to readers.

Added the same warning to the "autodefrag" option of btrfs-mount(5).

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
2016-01-12 15:01:06 +01:00
David Sterba 894c346714 btrfs-progs: docs, update btrfs(8) manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:06 +01:00
David Sterba 40db5cd7ff btrfs-progs: extend balance args to take min/max usage filter
Add the overlapping usage and [usage_min, usage_max] members to the
balance args. The min/max values are interpreted iff the corresponding
flag BTRFS_BALANCE_ARGS_USAGE_RANGE is set.

The minimum boundary is inclusive, maximum is exclusive:
* usage_min <= chunk_usage < usage_max

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:04 +01:00
Gabríel Arthúr Pétursson 0826a8ddb9 btrfs-progs: balance: add stripes filter
Add new balance filter 'stripes=<range>' to process only chunks that are
spread accross given number of chunks.

The range minimum and maximum are inclusive.

Signed-off-by: Gabríel Arthúr Pétursson <gabriel@system.is>
[ reworked a bit to use the range helpers, dropped the single value
  for stripes ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:04 +01:00
David Sterba 45e9bf8098 btrfs-progs: extend balance args to take min/max limit filter
Add the overlapping limit and [limit_min, limit_max] members to the
balance args. The min/max values are interpreted iff the corresponding
flag BTRFS_BALANCE_ARGS_LIMIT_RANGE is set.

The minimum and maximum are inclusive.

Note that the values are only 32bit, but this should be enough for the
foreseeable future.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:01:03 +01:00
David Sterba bbb0c589fc btrfs-progs: docs: mkfs, implications of DUP on devices
We offer DUP but still depend on the hardware, to do the right thing.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-04 11:28:12 +01:00
David Sterba 73a015578a btrfs-progs: docs: update raid table in mkfs manpage
* split copies to copies and parity and add a common header for all the
  raid options
* add missing RAID1
* n/a were dropped

Based on feedback from Duncan <1i5t5.duncan@cox.net>.

Signed-off-by: David Sterba <dsterba@suse.com>
2015-11-24 18:26:47 +01:00
Jeffrey Schiller 37a3f64756 btrfs-progs: docs: fix typo in balance man page
Signed-off-by: David Sterba <dsterba@suse.com>
2015-11-18 10:57:43 +01:00
Qu Wenruo c328e0db4a btrfs-progs: show-super: Add option to print superblock at given bytenr
Add '-s <sb_bytenr>' option to show superblock at given bytenr.

This is very useful to debug non-standard btrfs, like debuging the
1st stage btrfs of btrfs-convert.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
[ minor updates in docs ]
Signed-off-by: David Sterba <dsterba@suse.com>
2015-11-02 15:45:52 +01:00
David Sterba b1c222321e btrfs-progs: docs: enhance manual page for inspect-internal
Signed-off-by: David Sterba <dsterba@suse.com>
2015-11-02 15:10:16 +01:00
David Sterba 26d6392f70 btrfs-progs: docs: enhance the manual page for convert
Signed-off-by: David Sterba <dsterba@suse.com>
2015-11-02 15:10:15 +01:00
David Sterba bfb2659d12 btrfs-progs: docs: enhance manual page for balance
Signed-off-by: David Sterba <dsterba@suse.com>
2015-11-02 15:10:15 +01:00
David Sterba b44e84a650 btrfs-progs: docs: enhance manual page for btrfstune
Signed-off-by: David Sterba <dsterba@suse.com>
2015-11-02 15:10:15 +01:00
David Sterba a2d66e0962 btrfs-progs: docs: enhance manual page for mkfs
Signed-off-by: David Sterba <dsterba@suse.com>
2015-11-02 15:10:15 +01:00
Chandan Rajendra c11e36a29e Btrfs-progs: Do not force mixed block group creation unless '-M' option is specified
When creating small Btrfs filesystem instances (i.e. filesystem size <= 1GiB),
mkfs.btrfs fails if both sectorsize and nodesize are specified on the command
line and sectorsize != nodesize, since mixed block groups involves both data
and metadata blocks sharing the same block group. This is an incorrect behavior
when '-M' option isn't specified on the command line.

This commit makes optional the creation of mixed block groups i.e. Mixed block
groups are created only when -M option is specified on the command line.

Since we now allow small filesystem instances with sectorsize != nodesize to
be created, we can end up in the following situation,

[root@localhost ~]# mkfs.btrfs -f -n 65536 /dev/loop0
btrfs-progs v3.19-rc2-405-g976307c
See http://btrfs.wiki.kernel.org for more information.

Performing full device TRIM (512.00MiB) ...
Label:              (null)
UUID:               49fab72e-0c8b-466b-a3ca-d1bfe56475f0
Node size:          65536
Sector size:        4096
Filesystem size:    512.00MiB
Block group profiles:
  Data:             single            8.00MiB
  Metadata:         DUP              40.00MiB
  System:           DUP              12.00MiB
SSD detected:       no
Incompat features:  extref, skinny-metadata
Number of devices:  1
Devices:
   ID        SIZE  PATH
    1   512.00MiB  /dev/loop0
[root@localhost ~]# mount /dev/loop0 /mnt/
mount: mount /dev/loop0 on /mnt failed: No space left on device

The ENOSPC occurs during the creation of the UUID tree. This is because of
things like large metadata block size, DUP mode used for metadata and global
reservation consuming space. Also, large nodesize does not make sense on small
filesystems, hence this should not be an issue.

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2015-11-02 09:35:04 +01:00
David Sterba 4ee3d2e94d btrfs-progs: docs: add html build target
We can easily build the documentation in html format:

 $ make html

in the Documentation directory.

Signed-off-by: David Sterba <dsterba@suse.com>
2015-11-02 09:35:00 +01:00
Silvio Fricke 90b63ba242 btrfs-progs: check: add progress indicator
Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
[minor updates]
Signed-off-by: David Sterba <dsterba@suse.com>
2015-10-21 14:29:26 +02:00
David Sterba 1e6f194075 btrfs-progs: docs: add option variants, defaults and versions to mount options
Signed-off-by: David Sterba <dsterba@suse.com>
2015-09-15 00:40:00 +02:00
Adam Borowski 13be89d82e btrfs-progs: doc: document btrfs-select-super(8)
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: David Sterba <dsterba@suse.com>
2015-09-02 18:56:54 +02:00
David Sterba c78f3eea94 btrfs-progs: doc: update qgroup docs
Signed-off-by: David Sterba <dsterba@suse.com>
2015-08-31 19:25:11 +02:00
David Sterba e5a6610c94 btrfs-progs: qgroup assign: add option to schedule rescan
Previous patch detecs inconsistency and unconditionally triggers quota
rescan. This may not be always desired as it's a heavy metadata
operation. In case of batch assignments it's better to trigger the
rescan at the end.

Signed-off-by: David Sterba <dsterba@suse.com>
2015-08-31 19:25:11 +02:00
David Sterba 5b1c5b8878 btrfs-progs: inspect: add command min-dev-size
Previously in 'filesystem resize get_min_size', now
'inspect-internal min-dev-size'. We'd like to avoid cluttering the
'resize' syntax further.

The test has been updated to exercise the new option.

Signed-off-by: David Sterba <dsterba@suse.com>
2015-08-31 19:25:08 +02:00
Filipe Manana a57606e815 Btrfs-progs: add feature to get mininum size for resizing a fs/device
Currently there is not way for a user to know what is the minimum size a
device of a btrfs filesystem can be resized to. Sometimes the value of
total allocated space (sum of all allocated chunks/device extents), which
can be parsed from 'btrfs filesystem show' and 'btrfs filesystem usage',
works as the minimum size, but sometimes it does not, namely when device
extents have to relocated to holes (unallocated space) within the new
size of the device (the total allocated space sum).

This change adds the ability to reliably compute such minimum value and
extents 'btrfs filesystem resize' with the following syntax to get such
value:

   btrfs filesystem resize [devid:]get_min_size

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2015-08-31 19:25:03 +02:00
Wang Yanfeng 032f79d25b Documentation: update btrfs-replace manual to support RAID5/6
Man manual need to be updated since RAID5/6 has been supported
by btrfs-replace.

Signed-off-by: Wang Yanfeng <wangyf-fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2015-07-14 17:25:27 +02:00
Tsutomu Itoh cc68c4f9af btrfs-progs: doc: fix short explanation of restore in btrfs
Short explanation of restore is wrong. Fix it.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2015-07-01 15:28:14 +02:00
Omar Sandoval f802f572b1 btrfs-progs: alias btrfs device delete to btrfs device remove
There's an awkward asymmetry between btrfs device add and btrfs device
delete. Resolve this by aliasing delete to remove.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-26 16:33:39 +02:00
David Sterba b681e2536e btrfs-progs: doc: update defrag page
- update wording for -t
- add optional argument to -c

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-26 16:23:00 +02:00
Adam Borowski ce63aed165 btrfs-progs: doc: mkfs.btrfs: document -O^
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-25 19:28:49 +02:00
Qu Wenruo 81225f11d9 btrfs-progs: docs: new size options for fi show
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-22 16:45:06 +02:00
David Sterba c55415e4cb btrfs-progs: send: add option to for the no-data mode
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-12 16:44:47 +02:00
David Sterba c9f885ec89 btrfs-progs: subvol: let sync check only current deletions
So far the subvol sync command takes a shortcut and looks if there are
any deleted subvols at all. It does not print the deleted subvolumes as
they get cleaned. Arguably this is what the user would like to see and
has to do

 $ btrfs subvol sync /path $(btrfs subvol list -d /path | "extract the ids")

to see the progress.

Make it look for all currently deleted subvolumes automatically and
print the progress as if the ids were listed manually.

This is a slight change in the semantics of the command. Previously, any
new subvol deletion would prevent subvol sync to return. To simulate the
old behaviour, run 'subvol sync' in a loop until it returns 0.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-09 18:18:19 +02:00
David Sterba d34f9faf60 btrfs-progs: mkfs: add option to make it quiet
Add option to silecne mkfs and print only errors, warnings or info on
user request like features or help.

Based on patch from Goffredo Baroncelli <kreijack@inwind.it>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-06 01:00:18 +02:00
David Sterba 4f43aaf4aa btrfs-progs: doc: update btrfs-rescue page and drop btrfs-zero-log
- fix page title
- update zero-log text
- delete btrfs-zero-log.asciidoc as page is not shipped anymore

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-04 15:56:23 +02:00
David Sterba 0721c08dff btrfs-progs: doc: update btrfstune manpage
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-03 12:52:56 +02:00
David Sterba 6a4a3acbc2 btrfs-progs: btrfstune: add option to enable NO_HOLES
New option -n to enable the NO_HOLES feature.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-03 12:52:56 +02:00
Josef Bacik 420afa3edc btrfs-progs: specify mountpoint for recieve
In a chroot environment we may not have /proc mounted, which makes btrfs receive
freak out since it wants to know the base directory where are are mounted for
things like clone and such.  Give an option to specify where the mountpoint is
in these cases so you can still do a btrfs receive in a chroot.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
[added manpage documentation]
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-02 17:35:43 +02:00
Qu Wenruo 99ad3805be btrfs-progs: Documentation: uuid change
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
[updated wodring]
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-05-26 17:21:47 +02:00
David Sterba bea9ba0acb btrfs-progs: restore: add more long option variants
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-05-14 15:41:06 +02:00
Dan Merillat bd91f80725 btrfs-progs: optionally restore symlinks.
Restore symlinks, optionally with owner/times.

Signed-off-by: Dan Merillat <dan.merillat@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-05-14 15:41:02 +02:00
David Sterba 582e156baf btrfs-progs: fix typos in restore help/doc
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-24 17:28:37 +02:00
Dan Merillat ce72ae32d2 btrfs-progs: restore: document metadata restore.
This was lost in the cleanup of 71a559

Signed-off-by: Dan Merillat <dan.merillat@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-24 17:07:34 +02:00
Lauri Võsandi 9a86668071 btrfs-progs: optionally enforce chroot for btrfs receive
This patch forces btrfs receive to issue chroot before
parsing the btrfs stream using command-line flag -C
to confine the process and minimize damage that could
be done via malicious btrfs stream.

Signed-off-by: Lauri Võsandi <lauri.vosandi@gmail.com>
[added long option variant, added docs]
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-24 15:42:05 +02:00
Anand Jain 2890c41504 btrfs-progs: fix typo in btrfs-device.txt
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-24 15:42:04 +02:00
David Sterba 49eab99172 btrfs-progs: add zero-log to rescue command
Copy the functionality of standalone btrfs-zero-log to the main tool.
Delete man page for btrfs-zero-log and copy the relevant parts into
btrfs-rescue(8).  The standalone utility will be removed later.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-22 18:21:48 +02:00
David Sterba e57dc6c753 btrfs-progs: fi resize: accept only directories as paths
Resize of a filesystem image does not work as expected. This has been
confusing and can have bad consequences as people have reported,
resizing the wrong filesystem.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-22 18:21:47 +02:00
David Sterba 7ffccaf0c3 btrfs-progs: Documentaion: rename to .asciidoc
A few minor benefits:

* editors set highliting according to the extensions
* web access to the git repository (github) renders the .asciidoc
  files:
  * we can link to them from the wiki
  * the files are editable via browser and such editations can be
    submitted for merge easily

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-14 17:41:27 +02:00
Qu Wenruo 96563f961c btrfs-progs: Doc: Add warning and note on btrfs-convert.
Although btrfs-convert can rollback converted btrfs, it still has some
limitation to ensure rollback.

Add a warning on the limitations.

Also add a note for users who decides to go on with btrfs and don't need
the rollback ability.

Reported-by: Vytautas D <vytdau@gmail.com>
Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-07 17:44:05 +02:00