Re: BTRFS over LVM remounts read-only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 11, 2014 at 06:10:35PM +0100, MegaBrutal wrote:
> 2014/1/11 Hugo Mills <hugo@xxxxxxxxxxxxx>:
> >
> > [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: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux