Re: how to resize (grow) device partition of a multi-device BTRFS filesystem?

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

 



On Jan 11, 2013, at 7:28 PM, Hugo Mills <hugo@xxxxxxxxxxxxx> wrote:

> On Sat, Jan 12, 2013 at 02:18:44AM +0000, Rick Liu wrote:
>>> 
>>>   You'll need to use something like fdisk or cfdisk to resize the
>>> partition first. With (c)fdisk, that involves deleting and recreating
>>> the partition with the same starting point. (fdisk gives you more
>>> control here). As with most low-level FS-resizing tools, btrfs fi
>>> resize doesn't attempt to change the size of the underlying device.
>>> 
>>>   Hugo.
>> [Rick Liu] 
>> I see.
>> So that means unlike ext4 filesystem,
>> which I can use resize2fs on line to grow partition without losing data,
>> BTRFS must re-create partition table (fdisk) and loss data.
> 
>   No, with resize2fs, you also need to resize the partition, using
> the same process. Deleting and enlarging a partition doesn't change
> any of the data in it. resize2fs doesn't modify partition tables. (Or
> at least, didn't the last time I really looked at it in detail).

It's does not. To grow you must first change the size of the container: the partition, the LV, or array device. Then you can resize the file system. It's the same with XFS, and NTFS. I'm only aware of Apple's diskutil resizevolume command that resizes the flavors of HFS+ and at the same time sets the new end value for the partition entry.

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