Adding btrfs partition to external hdd

Hey all. I looked around for this particular topic and while I did find topics relating to btrfs partitioning in general, none specifically addressed my question. Basically, I want to add a btrfs partition to my 10TB external HDD so that I can save my Timeshift snapshots externally instead of on my main NVME SSD, where they won't do me a damn bit of good if shit hits the fan. I was able to successfully shrink the main luks partition using Gparted by the desired amount/size but after that, the newly unallocated space isn't showing up. Or rather, it shows up under the disk's info as being unallocated but it's not listed and therefore I can't do anything with it, i.e., create a new btrfs partition out of it. I'm not at home at the moment so I can't include screenshots but if they'll help, I'm happy to do so once I'm able. I have a feeling they'll be helpful since I'm having a hard time describing the problem without visual support but if you know what I'm getting at and can provide any help or insight, I would be very grateful. Thanks!

2 Likes

Easiest to diagnose a system when you're in front of it.

4 Likes

Read

https://wiki.archlinux.de/title/GParted

https://wiki.archlinux.org/index.php/Btrfs

https://wiki.archlinux.org/index.php/partitioning

3 Likes

Yeah nothing there addresses the problem I'm having, thanks though. If Gparted weren't acting up, that info would be helpful but I had already referenced that and found it to not be, which is why I created this topic. I'll see if I can find a Gparted forum, as this appears to be a rare bird since I've searched the web high and low without much mention of it at all.

2 Likes

You'll have to check the timeshift documentation, but you may be out of luck if I recall correctly.

I'm not sure you can store your btrfs snapshots anywhere but on the drive your system is installed on.

3 Likes

I was referring to timeshift auto-snap created snapshots.

4 Likes

Not really sure the exact issue/difficulty. It would help if you described what you have tried or read already and what confuses you.
Nevertheless, I suggest you study also these two, as they may be (much?) relevant to your issue:
https://bbs.archlinux.org/viewtopic.php?id=265669

3 Likes

IIRC, Timeshift will not/can not save snapshots anywhere but on your operating system drive. You can, however, automatically copy those snapshots to a different drive.

Don't know where I read that...and I have too many BTRFS sources to scan through them all.

regards

5 Likes

I believe it is somewhere in the timeshift documentation where it specifies that the system drive must be used for timeshift btrfs snapshots.

2 Likes

I was able to save my snapshots off-disk in the past using rsync but as @tbg alluded to, this may not be possible with btrfs. Though, when navigating through the setup wizard, you are asked where you'd like to store your snapshots after selecting between rsync/btrfs. It seems like it would be possible if it were only formatted as btrfs, which is why I started down this path in the first place.

@petsam - what I've done this far is fairly straightforward; I used Gparted to shrink the luks/ext4 drive by 400gb, which completed successfully however where I start running into problems is that Gparted doesn't list any unallocated space on that disk so I can't format the unallocated space as btrfs. It may be worth noting that I wouldn't be able to format the unallocated space using any other FS either, so it's not necessarily a btrfs specific problem. It may be, but it seems to run deeper than that or the problem stems from elsewhere even if that is the case. I did attempt to shrink the drive and reformat the resulting unallocated space in the same job, thinking that might be a workaround (despite trying not to exceed more than one task at a time when messing with partitions in any meaningful way), however that ended up erroring out during the second half of the job.

Summary

I'm going to edit this post with some supporting visuals/screenshots/Gparted log, etc. to make things more clear so that anyone so inclined can see more specifically what I'm talking about.

I thank you all very much for your insight thus far!

Here (above) we can clearly see that 400GB is unallocated, However (below) illustrates what I meant by saying the unallocated space is not displayed by Gparted, thereby leaving me SOL, in a matter of words.

This screenshot is from the Gparted details log from when I attempted to create the BTRFS partition in the same breath as shrinking the drive (disregard the 1.56GB difference in unallocated space as I've taken several cracks at this and apparently this time around I wasn't concerned with hitting 400GB on the nose):

That's all I can think of supplying visually but if you're still with me and can think of anything else that I can provide that would be relevant, please don't hesitate to let me know. In the meantime, I'm going to look into precisely whether or not BTRFS snapshots can be saved externally (not allowing this seems counter-intuitive but I'm certain that if it were the case, it would not be a matter of someone's judgement call but rather a system/FS limitation)as well as the link that you/@petsam provided and if they yield nothing and no one's chimed in with anything super enlightening, I'll also go back over the links that you/@tbg provided.

One last edit to provide screenshot of the Timeshift wizard where it seems to allude to the possibility of saving snapshots to any location, so long as it's formatted BTRFS but I will get some definitive answers on this subject regardless:

Thanks again everyone!

Edit/update - I'm still educating myself on the topic but from what I gather, it is possible to copy your snapshots from the system disk/drive externally, as long as it's formatted BTRFS but you can't do so without also occupying the same amount of space on the main drive, which I believe @c00ter may have mentioned earlier. So, I'm more informed now then I was before but essentially in the same pickle.

Off to do some more digging...

1 Like

I tried this when I replaced my SWAP partition with BTRFS. Unfortunately I can't recall whether it worked or not, because I had to reinstall the system because of some EFI troubles.

However, if you don't mind waiting extra 10 seconds for a snapshot, then use the rsync option. Works great. Saved my system in 2 ways: a) I can properly restore my system now after reinstall b) I don't need to reinstall because my root partition never fills up now that the snapshots are saved on another drive. :smiley:

2 Likes

Yeah, as far as my OS' filesystem is concerned, I'm more than sold on BTRFS (thanks Garuda) but educating myself on all the pros and cons of rsync vs BTRFS snapshots in light of the fact my system utilizes BTRFS is on the short list (not really that short anymore but I'll stick with preferred nomenclature) of pc-related things I need to do. I'm pretty well versed on rsync vs BTRFS in general but less so as it specifically relates to taking snapshots of a btrfs system.

@His_Turdness - what exactly do you mean by

1 Like

Have you read or know about encryption type resizing?

I am not aware of (G)parted is capable of resizing encrypted partitions.
You should check about it.

2 Likes