From: Hugo Mills <hugo@carfax.org.uk>
To: MegaBrutal <megabrutal@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: BTRFS over LVM remounts read-only
Date: Sat, 11 Jan 2014 17:28:41 +0000 [thread overview]
Message-ID: <20140111172841.GW15634@carfax.org.uk> (raw)
In-Reply-To: <CAE8gLhnd8mjRZoJCCj8ns4W6OJJXFGUiO8Ni78aYbyY2MA_Luw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2399 bytes --]
On Sat, Jan 11, 2014 at 06:10:35PM +0100, MegaBrutal wrote:
> 2014/1/11 Hugo Mills <hugo@carfax.org.uk>:
> >
> > [60631.481913] attempt to access beyond end of device
> > [60631.481935] dm-1: rw=1073, want=42917896, limit=42917888
> > [60631.481941] btrfs_dev_stat_print_on_error: 34 callbacks suppressed
> > [60631.481949] btrfs: bdev /dev/mapper/vmhost--vg-vmhost--rootfs errs: wr 311347, rd 0, flush 0, corrupt 0, gen 0
> >
> > This is the problem.
> >
> > It looks like you've shrunk the LV without first shrinking the
> > filesystem. Depending on how much you shrunk it by, the odds are
> > fairly good that significant chunks of the FS are now toast.
> >
> > Hugo.
> >
>
> Thank you very much! Strange, I indeed shrinked the LV, but only by a
> few megabytes to make space for /boot (as turned out, GRUB2 can't boot
> from LVM), and I think I did shrink the FS too... But maybe not. As it
> started out as a test system, I intentionally wanted to test some
> obscure situations here. Thankfully I don't have considerable data
> loss and I don't think any valuable data was on the space that was cut
> off. Strange that the system was running like this for a month with
> this problem being undetected.
>
> How can I shrink the FS to the correct size right now, ensuring that I
> really shrink it to the exact LV size?
In the current state, I'm not sure that you can -- the FS metadata
still thinks that there's some data stored at an address that's off
the end of the LV, and it'll try to read it if you attempt to shrink
the FS.
You may be able to enlarge the LV up to the size it was before, and
then shrink, but you'll probably get EIO from the filesystem because
the checksums for the (un)dead area don't match any more (assuming
that the data in question has been overwritten by something else in
the mean time).
I suspect that we need some kind of "yes, I know the data's
buggered, but carry on regardless" option for a lot of commands, like
resize(shrink), device delete, device replace. This would help in the
case where a lo-fi recovery is acceptable.
Hugo.
--
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- "Your problem is that you have a negative personality." ---
"No, I don't!"
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2014-01-11 17:28 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 [this message]
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ó
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=20140111172841.GW15634@carfax.org.uk \
--to=hugo@carfax.org.uk \
--cc=linux-btrfs@vger.kernel.org \
--cc=megabrutal@gmail.com \
/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