From: "Szalma László" <dblaci@dblaci.hu>
To: Roman Mamedov <rm@romanrm.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: BTRFS over LVM remounts read-only
Date: Sat, 11 Jan 2014 20:24:38 +0100 [thread overview]
Message-ID: <52D19A76.80701@dblaci.hu> (raw)
In-Reply-To: <20140112011608.220a2ae3@natsu>
Yeah, I used to do the way you wrote before, but in fact, G means
gigabyte (1024^3), and works the same with both tools. On smaller units
You have to watch for the rounding to extent size (4M by default).
Moreover, some could use:
btrfs fi re -2G /mount (well, I just noticed, I accidentally
wrote the device last time, but btrfs resize should be used on mount point.)
lvresize -L -2G /device
:)
DBLaci
And of course, this is what should be done to prevent data loss. This
method won't fix the original problem of course...
Thanks for your comment!
2014-01-11 20:16 keltezéssel, Roman Mamedov írta:
> On Sat, 11 Jan 2014 19:48:55 +0100
> Szalma László <dblaci@dblaci.hu> wrote:
>
>> 2014-01-11 18:10 keltezéssel, MegaBrutal írta:
>>> How can I shrink the FS to the correct size right now, ensuring that I
>>> really shrink it to the exact LV size?
>> btrfs fi re 10G /dev/mapper/vg-lv
>> lvresize -L 10G vg/lv
> That's setting yourself up for a failure if these tools happen to disagree on
> what "G" means (GB vs GiB). Maybe that's what happened here with the thread
> starter's FS?
>
> To be completely safe, I would recommend to resize the FS in two steps, leaving
> some safety margin to the partition resize first:
>
> btrfs fi re 8G /dev/mapper/vg-lv
> lvresize -L 10G vg/lv
> btrfs fi re max /dev/mapper/vg-lv
>
next prev parent reply other threads:[~2014-01-11 19:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-11 14:32 BTRFS over LVM remounts read-only MegaBrutal
2014-01-11 15:04 ` Hugo Mills
2014-01-11 17:10 ` MegaBrutal
2014-01-11 17:28 ` Hugo Mills
2014-01-11 18:03 ` Chris Murphy
2014-01-11 18:48 ` Szalma László
2014-01-11 19:16 ` Roman Mamedov
2014-01-11 19:24 ` Szalma László [this message]
2014-01-11 23:08 ` Chris Murphy
2014-01-11 23:03 ` Chris Murphy
2014-01-12 4:44 ` Duncan
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=52D19A76.80701@dblaci.hu \
--to=dblaci@dblaci.hu \
--cc=linux-btrfs@vger.kernel.org \
--cc=rm@romanrm.net \
/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