On Thu, Aug 5, 2021 at 4:50 AM José María Terry Jiménez <jtj@xxxxxxxxxxxxx> wrote: > > El 5/8/21 a las 12:35, François Patte escribió: > > > Bonjour, > > I have a raid-1 array of 2 disks (1 Tb) and I want to replace these disks by 2 2Tb disks. Just as a point of translation/familiarization/comparison of the same task with btrfs... btrfs replace start 1 /dev/sdc /mnt btrfs replace start 2 /dev/sdd /mnt btrfs filesystem resize 1:max /mnt btrfs filesystem resize 2:max /mnt * btrfs uses a concept of "devid" to keep track of devices; devices also each have a device item uuid that's totally unambiguous among all other btrfs file systems, but the devid is unambiguous within a specific btrfs, unlike /dev/ node which isn't always the same between reboots. * use 'btrfs filesystem show' to see devid's * replace requires the replacement drive is equal to or bigger than the size of the device being replaced; replace is so much better than "btrfs device add" followed by "btrfs device remove" (which does file system resizes automatically) that you're best off shrinking the source a bit in order to be allowed to use "btrfs replace". * file system resize is per device, specified by devid; if you don't specify devid, then devid 1 is assumed * btrfs replace is derived from the btrfs scrub kernel code, in effect it makes a virtual and temporary "mirror" between the to-be-replaced device and replacement device, and does a scrub to quickly replicate in-use blocks from source to destination. * btrfs replace works with non-raid profiles, including live migration from a single drive to a new drive * you can use 'btrfs replace' even if the drive is missing, even if you're mounted degraded * writes go to both the replacee and replacement devices * following crash/power fail the replace will resume * reminder that there's a built-in shortcut for all btrfs commands, you don't need to configure it or set it up; as long as you enter an unambiguous command, it'll be accepted, if you enter something ambiguous, it'll make suggestions: $ sudo btrfs rep sta btrfs replace: ambiguous token 'sta' Did you mean one of these ? start status 'btrfs rep star' is unambiguous for 'btrfs replace start' - just make up your own short hand... -- Chris Murphy _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure