Ask Your Question
1

btrfs adding 2 new hard drives with luks

asked 2016-08-24 18:45:01 -0500

centinel20 gravatar image

I have a rig with 4 1TB HD on a software raid6 ( I know I l know experimental). I am about to add 2 new 1TB disks and want to add them to the btrfs array. My 4 disk array is encrypted with luks. What are the steps I should follow to do this? Thak you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-09-15 17:30:14 -0500

cmurf gravatar image
cryptsetup luksformat the two drives.
cryptsetup open the two drives.
btrfs dev add /dev/mapper/new1 /mnt/btrfs
btrfs dev add /dev/mapper/new2 /mnt/btrfs
btrfs balance start --full-balance /mnt/btrfs

There is no strict requirement to balance right away. Existing block groups continue to be on the original 4 drives, new block groups will be a 6 way stripe. Eventually though if the first 4 get full, you'll end up with no space left prematurely, there is no way to do raid6 across only two drives. So eventually you'll have to do a full balance. It is possible to get those first four drives so full that you won't be able to do a full balance across 6, without converting to some other profile first (like raid 5 or single).

Keep frequent backups on something other than btrfs raid56.

edit flag offensive delete link more

Comments

sounds like this could work. As soon as I do It and confirm that it works I will mark it as correct. Is mnt/btrfs the right place to mount the partitions? right now nothing is mounted there the particions are mounted elsewhere like /home or will the system fuse everything together in the / home directory? also should I encrypt with the same key as the others if so at the start of the server will it still ask me just once for the key or will it ask me for the 2 new drives separately? thank you for all the help.

centinel20 gravatar imagecentinel20 ( 2016-10-08 12:47:52 -0500 )edit
1

All drives need the same passphrase to have single passphrase entry at boot time. Also configure /etc/crypttab with entries for each cryptoluks device. You can get the crypoluks uuid using the blkid command. I suggest in fstab using the mount option nofail for this Btrfs array so that if for whatever reason it isn't discovered, you don't get a boot failure while systemd waits for it to appear.

cmurf gravatar imagecmurf ( 2016-10-08 14:54:31 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-24 18:45:01 -0500

Seen: 181 times

Last updated: Sep 15 '16