#Advice/suggestions wanted on migrating to btrfs

31 messages · Page 1 of 1 (latest)

pine monolith
#

hi all. i have a truly cursed partition scheme at the moment for reasons i have no recollection of anymore. here's a glimpse, judge for yourself:

~ ❯ lsblk -o NAME,MOUNTPOINTS
NAME        MOUNTPOINTS
nvme0n1     
├─nvme0n1p1 /efi
├─nvme0n1p2              # MS reserved
├─nvme0n1p3 /mnt/windows # windows C:
├─nvme0n1p4              # some windows bs
├─nvme0n1p5 /
└─nvme0n1p6 /boot
nvme1n1     
├─nvme1n1p1                         # MS reserved
├─nvme1n1p2 /mnt/4TB                # windows D:
└─nvme1n1p3 /home/airkoala/Videos   # a generic media partition
            /home/airkoala/Pictures # these are bind mounted
            /home/airkoala/Media
            /home/airkoala/Games
            /home/airkoala/Documents
            /home/airkoala/Audio
            /mnt/Media

as you can see, its a dual boot system but i want to get rid of the windows partitions entirely and have a single btrfs volume spanning both of my drives. i am currently using ext4. i'd like to avoid reinstalling if i can because im lazy. here's what my plan is so far:

  1. wipe all partitions except /dev/nvme0n1p5 (root) and /dev/nvme1n1p3 (media)
  2. create new btrfs partitions in the empty spaces of both drives and a new btrfs volume with the partitions
  3. copy everything from old ext4 root to new root and copy everything from old media partition to the home directory in the new volume with rsync -a
  4. delete the last 2 partitions and add those to the volume

i dont have any experience with btrfs except for what i could gather from reading the docs and archwiki and so would appreciate any thoughts or suggestions on how i can make the migration smoother.

not sure if this sort of post is allowed here but i dont know where else to ask.

cheers

brazen anchor
#

Forget about rsync

#

BTRFS uses subvolumes not partitions

pine monolith
brazen anchor
#

Then use raid or something for another drive

pine monolith
# naive hatch how big is each partition?
NAME        FSUSED   SIZE FSUSE% MOUNTPOINTS
nvme1n1            931.5G
├─nvme1n1p1  25.5M   100M    27% /efi
├─nvme1n1p2           16M
├─nvme1n1p3 388.5G 418.9G    93% /mnt/windows
├─nvme1n1p4          530M
├─nvme1n1p5 376.6G   510G    75% /
└─nvme1n1p6 527.2M     2G    26% /boot
nvme0n1              3.7T
├─nvme0n1p1           16M
├─nvme0n1p2   1.4T   1.9T    74% /mnt/4TB
└─nvme0n1p3   1.6T   1.9T    88% /home/airkoala/Videos
                                 /home/airkoala/Pictures
                                 /home/airkoala/Media
                                 /home/airkoala/Documents
                                 /home/airkoala/Games
                                 /home/airkoala/Audio
                                 /mnt/Media
naive hatch
#

your /boot is in a separate partition

#

along with /efi

pine monolith
#

my original esp was from the windows install so I have a separate extended boot partition for arch

#

since the original is kinda small

#

I'll probably wipe both and reinstall the bootloader

naive hatch
#

right fair enough

#

so i think your original plan works

pine monolith
#

I hope so

#

tested out the steps in a vm

#

I'm just worried about how long it might take

naive hatch
#

however i would use tar + compression instead of rsync

#

just in case if there isnt enough space

#

actually nvm there is enouh space it looks like

#

so yeah i think your plan works

#

just remmeber to leave space for efi

pine monolith
#

fingers crossed

#

this type of stuff is always scary

#

thanks for the reassurance

naive hatch
#

oh yeah you should make backups

#

just in case if something goes wrong you dont lose anything

pine monolith
#

yeah of course everything important is already backed up