jeudi 17 avril 2025

New removable USB disk on backup server

Hardware install and test

grab a new power outlet, find a free USB port, connect both cables as needed (no reboot, PC was up and running)

fdisk /dev/sdc: leave partition 1 (UEFI) alone, but change the type of partition 2 to Linux.  Then build the initial filesystem:

sudo mkfs.btrfs -L multidata -f /dev/sdc2

Temporary mount

blkid doesn't show /dev/sdc2 but the value was displayed in the output of the mkfs command to tried mounting with a temporary fstab entry:

UUID=3a9c6050-51b2-4d86-b5cd-ea460a5e244e /mnt  btrfs   defaults 0 2

Reorganized fstab to mount the old FS under the mountpoint of the new one:

UUID=3a9c6050-51b2-4d86-b5cd-ea460a5e244e /var/backups  btrfs   defaults 0 2
UUID=a66b6bd2-4450-417b-a9d7-ea38661da852 /var/backups/rsync btrfs defaults 1 2

Empty the "old" volume

Created /var/backups/rsyncnew and moved all /var/backup/rsync/* into /var/backup/rsyncnew in the new disk (that took quite a while).

The intention is to destroy the btrfs on the "old" disk then add the device to the new btrfs

Aucun commentaire: