Which kernel are you using?
Linux 6.14.5-100.fc40.x86_64
Which BIOS version are you using?
03.05
Which Framework Laptop 16 model are you using?
AMD Ryzen™ 7040 Series
Hi everyone,
I purchased a 1TB storage expansion card because my laptop has basically zero space left on it (i.e the root/home directories are full). I intended to add space to my current OS and wanted to find documentation/guides/information about this process. However, I couldn’t find anything about utilizing these cards to extend the current partition, as it appeared most people were using them to load a separate OS for Dual Booting. Does anyone have any experience with this use case, and if so, could you please share the procedures and/or tools you used?
You need to provide more info on what type of existing filesystems and partitions you have set up.
For example, if you installed on straight partitions with a filesystem such as ext4, then you can not extend it to the new drive. What you will have to do is create a new mount on the new drive and then mount it into your existing filesystem, like /media/games for example.
If you instead opted for a setup using lvm or btrfs, then you can indeed add that new drive to your existing volume groups to add to the space.
I think your words mean something very specific, which is not something I would do because it puts your data at risk.
The rest of my words here are going to handle the looser, general case that you add USB storage – here’s nothing magical about Framework expansion cards that means you can’t think about them as being anything other than ‘extra USB storage’. Think about it like it’s a USB thumbdrive and mount the storage somewhere like /mnt/ or /media/. Think about setting it up to be robust with your data.
There are loads of tutorials on adding extra USB storage to Fedora and generic Linux distributions. You should be able to find a guide to formatting the storage, say as ext4 or btrfs, and attaching it to the filesystem tree under /media/device-name, setting the permissions so your user can read and write the files, making it automount by adding the /dev/disk/by-uuid identifier to /etc/fstab (in the right format) and, likely also, adding the storage as the default location for a Steam Library folder.
Plus it sounds like you’re running low on storage in general – spend some time to think about a backup strategy for your accumulated files offline from your Framework device.
Under linux, you mount partitions to form a tree.
What I tend to do, with an extension disc, is to identify a directory that is very large, copy all the files from that directory onto that expansion car, then remove the files in the old directory, and mount the expansion card at the directory’s location.
Now - I also have the expansion disk, and IMHO it gets too hot for constant use. I use it for backups of copying files over from one device to another one.
For expanding my disks, when that is required, I tend to buy a larger NVME SSD, copy the content from the old SSD on it, replace the drives, and boot off a multiboot disk to restore the UEFI entry to boot from the new drive.
Thank you for your prompt response. The current partition my OS is on (/dev/nvme0n1p3 with mount points / and /home) is formatted with btrfs, and the storage card (/dev/sda) currently is lvm2, though since it is empty I could reformat it to something else if needs be.
Thank you for your prompt response. If I’m not mistaken, you’re suggesting something functionally equivalent to a Windows D:\ drive, correct? I suppose that could be a solution, but I also saw something while doing research about using mergerfs to basically combine both the NVME partition of the OS and the sda partition of the expansion card into a single mount point, though I’m not entirely sure if it would be applicable to this scenario. I have fresh backups and restore points, so if data loss does occur I could simply roll back and restore to the previous state.
Thank you for your response. I have also read about some issues with early models of the expansion card, though I got mine fairly recently so I don’t know if they are still applicable. If the issues are apparent, would the high temperatures also cause other problems, such as performance degradation or data corruption?
Since you are using btrfs, it is very easy to another device to “increase your partition” size. Use of the word partition is incorrect here, it is a volume that will include multiple partitions from different disks.
Add the card to your root:
btrfs device add /dev/sda /
Or add the card to your /home:
btrfs device add /dev/sda /home
It is also highly recommended to make sure at least your metadata is raid1 in cases like this (converting / for example):
btrfs balance start -mconvert=raid1 /
Check out the “btrfs-device” man page for examples and really good explanations of how to do these things.
As others have stated, using a usb drive in this manner is not really recommended. I, personally, would not do this, but it should work and would be a good learning experience while indeed, increasing your available space. Make sure the usb modules are in your initial ram so the kernel sees the drive on boot-up.
Also, since you are using btrfs and running out of space. Make sure you are not using any snapshot tools like snapper to create periodic snapshots of your system. If these are not regularly cleaned out, they will use up all your space unnecessarily.
That’s exactly the command I gave…metadata Raid1, and NOT data Raid1. He wants to increase space and most likely has a larger internal drive than that usb drive anyway. Data Raid1 would not work.
I think these other commenters have great answers, esp. if you’re using btrfs for snapshots already. I don’t know what would happend when you unmount and remove a device that was added to btrfs.
Great to hear your data is safe. Long may it stay that way!
Thank you so much! Though if you don’t mind me asking one more (possibly dumb) question: to which mount point should I add the device, considering that I am the only user of it and both / and /home are mounted to nvme0n1p3? Could I add it to both? The only reason I ask is because I worry that if I add it to home that I could potentially be unable to add/install any potential programs or other miscellaneous items with sudo
Oh that’s right, you have multiple subvolumes on one btrfs filesystem. In this case it does not matter which “device add” command you use, the space will be added to the filesystem in either case and both subvolume mounts (/ and /home) will show the newly added space as available.
UPDATE: I added the device to /home (which worked, and I was able to see the new space in / and /home), and tried to balance it using the command provided. I ended up getting a bunch of ENOSPC errors (probably due to the fact that the original hard drive had basically zero space left on it), so I tried again using the flags -dusage=0 and -musage=0. It worked, but didn’t actually transfer any inodes over. I then tried again with both flags set to 5, and got one ENOSPC error. I then, perhaps a bit stupidly, used the btrfs-balance-least-used command from python-btrfs on /. It completed, and everything seemed fine, but then when I tried to reboot I was greeted by a stuck framework loading screen. Looking at this
it appeared something about the command caused the storage expansion card to no longer be able to be read. I’ll have to make a live boot and either investigate further or restore the system to a previous state.