Resizing a btrfs managed partition
Hi,
Let me know if this is the wrong place to ask...
I'm using Fedora 12 x86_64, mostly with the newer 21.6.32 kernel, and
have a single btrfs filesystem within a 120Gb partition.
I'd like to extend the space btrfs can use. One option is presumably
add a new device to btrfs, but I was hoping to simple resize the existing partition to say 160Gb.
With ext4 I might do this with gparted , although mostly I'd use LVM,
with seperate LVs for /opt /home / etc and that's been the way I've done it for many years.
With btrfs I'm unsure as to the safe steps and decided to skip on use
of LVM giving the enhanced capabilities of btrfs itself.
Is it ok to resize the partition with gparted?
How do I make btrfs use the new partition size?
Or are there other btrfs specific tools that can manage partitions
Would I be better off still using lvm in conjunction with btrfs?
Are there good pointers to useful user material on btrfs on these issues?
Is creating new subvolumes to manage /home (say I want to limit that
space, and create snapshots independently) appropriate, and if so what's the easiest way to do that -- I had trouble with getting the subvolume ops to work
Mostly rather than NEED btrfs per se, I'm using a clean laptop environment as a way to experiment with the new filesystem & understand how to manage it.
Thanks
Nigel.
[email protected]
Quoted 1 line · On Wednesday 24 February 2010, planetf1 wrote:
Hi,
Hi
Quoted 9 lines
Let me know if this is the wrong place to ask...
I'm using Fedora 12
x86_64, mostly with the newer 21.6.32 kernel, and
have a single btrfs filesystem within a 120Gb partition.I'd like to extend the space btrfs can use. One option is presumably
add a new device to btrfs, but I was hoping to simple resize the existing partition to say 160Gb.
Quoted 8 lines
With ext4 I might do this with gparted , although mostly I'd use LVM,
with seperate LVs for /opt /home / etc and that's been the way I've done it for many years.With btrfs I'm unsure as to the safe steps and decided to skip on use
of LVM giving the enhanced capabilities of btrfs itself.Is it ok to resize the partition with gparted?
IIRC gparted want to resize both partition and filesystem. So if gparted doesn't support btrfs, it will not be usable
Quoted 1 line
How do I make btrfs use the new partition size?
I am never tried, but it should be sufficient to
a) resize the underling partition (with fdisk)
b) resize the filesystem (with btrfsctl -r <size> <path-to-filesystem>).
If you want to grow the filesystem, the step are a) then b). Otherwise if you want to shrink the filesystem the step are b) then a)
Pay attention to:
- btrfs support online filesystem
- if you resize a partition it may be required to reboot the system, otherwise the kernel may not be able to read the new size of the partition
- if you pass 'max' as size of the btrfsctl utility, the filesystem grows up to fill all available space.
I suggest you to test the resizing on a loop device before tring a real filesystem.
Quoted 1 line
Or are there other btrfs specific tools that can manage partitions
Not in my knowledge
Quoted 1 line
Would I be better off still using lvm in conjunction with btrfs?
In theory btrfs has the capability to add/remove device and resize a filesystem. But it is a young filesystem, so the results may be not the one expected.
Quoted 1 line
Are there good pointers to useful user material on btrfs on these issues?
http://btrfs.wiki.kernel.org/index.php
http://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices
Quoted 4 lines
Is creating new subvolumes to manage /home (say I want to limit that
space, and create snapshots independently) appropriate, and if so what's the easiest way to do that -- I had trouble with getting the subvolume ops to work
If you don't use snapshot creating a subvolume is not useful. If you had problem, post the command which you had used.
Quoted 8 lines
Mostly rather than NEED btrfs per se, I'm using a clean laptop environment as a way to experiment with the new filesystem & understand how to manage it.
Thanks
Nigel.
[email protected]
BR
Goffredo
Quoted 6 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijackATinwind.it> Key fingerprint = 4769 7E51 5293 D36C 814E C054 BF04 F161 3DC5 0512
Quoted 2 lines · Goffredo Baroncelli
a) resize the underling partition (with fdisk)
b) resize the filesystem (with btrfsctl -r<size> <path-to-filesystem>).
Thanks for the reply. These steps worked fine :-) Just got used to using gparted for many years rather than carefully writing down cylinder start/end numbers ....