Re: BTRFS over LVM remounts read-only

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

 



On Jan 11, 2014, at 12:16 PM, Roman Mamedov <rm@xxxxxxxxxxx> wrote:

> On Sat, 11 Jan 2014 19:48:55 +0100
> Szalma László <dblaci@xxxxxxxxx> 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?

Yes. I've suggested a feature enhancement for Btrfs resize to report its new logical end (relative to fs start which would be 0). That can be used to deduce the resize needed for either partitions or LVs. If this is an fs shrink, it could just do the shrink without a warn. For an fs grow, if the partition isn't the right size, it fails and also states the new logical end value needed for the previously failed command to work.


> 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

That's also a reasonable.


Chris Murphy--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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