Slightly off topic and also hypothetical. Assume the same physical
setup, but what if both were Btrfs?

/dev/sda1        48.8G
/dev/sda2       881.6G

Let's say /dev/sda1 is mounted at /mnt/one
And say /dev/sda2 is mounted at /mnt/two

I'd likely use 'btrfs send/receive' to replicate the subvolumes I want
to keep from "one" to "two", if there's enough room. If not then I
need an intermediary "third" file system, which ideally is also btrfs,
but there is an -f option for send and receive that will use a file
based send stream. The send/receive method of replication includes
everything, no filters. It's all or nothing. Date+time stamps, xattr,
posix ownership and permissions, acls, and so on. Whether I use
send/receive or rsync -a or cp -a, let's just assume I'm done with
/mnt/one. All of what I care about is now on /mnt/two.

Btrfs has the same limitation for resize as ext4 and XFS in that the
resize only happens at the end. But there is a work around, (which
also has an LVM equivalent.)

umount /mnt/one
btrfs device add /dev/sda1 /mnt/two

That's it. It's now a two device btrfs, made from two partitions on
the same drive. An abbreviated mkfs (write super blocks) and
filesystem resize (grow) is implied by the device add command. (In
reality you need to use '--force' because the btrfs device add command
will see the ext4 superblock and fail to touch sda1. Alternatively,
use wipefs on the partition first.)

You can mount either /dev/sda1 or /dev/sda2 or by UUID, and Btrfs
handles it. And there's no need to change /etc/fstab.

There is a bit of a goofy UI/UX issue in most desktops, in which they
show each device node making up this file system, rather than one file
system icon. That needs to be cleaned up but it's a cosmetic bug that
confuses the user, it's not confusing Btrfs or data on the file
system.
https://gitlab.gnome.org/GNOME/gvfs/-/issues/519


--
Chris Murphy
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to