Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@inwind.it>
To: Roman Mamedov <rm@romanrm.ru>
Cc: helmut@hullen.de, linux-btrfs@vger.kernel.org
Subject: Re: Resize command syntax wrong?
Date: Wed, 30 Nov 2011 21:48:37 +0100	[thread overview]
Message-ID: <2642474.I5uc41HKUa@venice> (raw)
In-Reply-To: <20111201020730.33980a5e@natsu>

On Thursday, 01 December, 2011 02:07:30 you wrote:
[...]
> Resizing in both 'directions' seems to work very well on single-device BTRFS
> filesystems, and also it's very useful that BTRFS is almost the only modern
> FS (besides ext4) that can be shrinked. But with multi-device filesystems,
> don't you agree it's non-obvious how (or is not even possible) to resize
> the areas that BTRFS occupies on individual devices?

I agree that it is not so an obviously syntax, however it is definitely 
possible to shrink/grow a single disk in a multi disk scenario.

The full syntax is the following ([1])
-----------

filesystem resize [<devid>:][+/-]<size>[gkm]|max <path> 

Resize a filesystem identified by <path>. The <size> parameter specifies the new 
size of the filesystem. If the prefix + or - is present the size is increased or 
decreased by the quantity <size>. If no units are specified, the unit of the 
<size> parameter defaults to bytes. Optionally, the size parameter may be 
suffixed by one of the following the units designators: 'K', 'M', or 'G', 
kilobytes, megabytes, or gigabytes, respectively. 
If 'max' is passed, the filesystem will occupy all available space on the 
volume(s). 
The resize command does not manipulate the size of underlying partition. If 
you wish to enlarge/reduce a filesystem, you must make sure you can expand the 
partition before enlarging the filesystem and shrink the partition after 
reducing the size of the filesystem. 
<devid> is the id of the device which was grow or shrink, as show by the 
command btrfs filesystem show. If nothing is passed, the device devid=1 is 
used.
----------------------


IIRC I sent in the past a patch which added these further info in the man 
page, but I think that this patch was lost... I have to resubmit another time

BR
G.Baroncelli

[1] http://btrfs.ipv5.de/index.php?title=Btrfs(command)

-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack@inwind.it>
Key fingerprint = 4769 7E51 5293 D36C 814E  C054 BF04 F161 3DC5 0512

  reply	other threads:[~2011-11-30 20:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30 18:47 Resize command syntax wrong? Phillip Susi
2011-11-30 18:59 ` Helmut Hullen
2011-11-30 19:15   ` Roman Mamedov
2011-11-30 19:37     ` Goffredo Baroncelli
2011-11-30 19:43     ` Helmut Hullen
2011-11-30 20:07       ` Roman Mamedov
2011-11-30 20:48         ` Goffredo Baroncelli [this message]
2011-11-30 20:55         ` Helmut Hullen
2011-12-01  0:01   ` Phillip Susi
2011-12-01  6:46     ` Helmut Hullen
2011-12-01 15:57       ` Phillip Susi
2011-12-01 16:19         ` Helmut Hullen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2642474.I5uc41HKUa@venice \
    --to=kreijack@inwind.it \
    --cc=helmut@hullen.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=rm@romanrm.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox