First, a big thanks for setting up these scripts to automate things as much as possible. Unfortunately, I had already filled up 2/3rds of a 1tb SD card before discovering this. In lieu of starting from scratch, I decided to experiment and (on a separate computer) do a brtfs-convert operation on my existing steam deck SD card. Here's the command I ran and the output:
sudo btrfs-convert --uuid copy -p -l primary /dev/sdb1 ๎ฒ 1 โ
btrfs-convert from btrfs-progs v5.17
WARNING: non-unique UUID (copy): bc13434a-ad7d-45ee-8076-b2c6df5bfa29
Source filesystem:
Type: ext2
Label:
Blocksize: 4096
UUID: bc13434a-ad7d-45ee-8076-b2c6df5bfa29
Target filesystem:
Label: primary
Blocksize: 4096
Nodesize: 16384
UUID: bc13434a-ad7d-45ee-8076-b2c6df5bfa29
Checksum: crc32c
Features: extref, skinny-metadata, no-holes (default)
Data csum: yes
Inline data: yes
Copy xattr: yes
Reported stats:
Total space: 1023869452288
Free space: 270688247808 (26.44%)
Inode count: 62496768
Free inodes: 62326062
Block count: 249968128
Create initial btrfs filesystem
Create ext2 image file
Create btrfs metadata
Copy inodes [O] [ 309269/ 170706]
Set label to 'primary'
Conversion complete
I then mounted and defragged the card (on the same computer)
sudo btrfs filesystem defragment -r -czstd /home/crono141/cdrom ๎ฒ โ
ERROR: defrag failed on /home/crono141/cdrom/steamapps/common/20XX/BabelStoneHan.ttf: Input/output error
ERROR: defrag failed on /home/crono141/cdrom/steamapps/common/DARK SOULS III/Game/Data5.bdt: Input/output error
total 2 failures
I'm not sure if compression happened or not during the defrag. Here's the btrfs df before and after.
sudo btrfs filesystem df /home/crono141/cdrom ๎ฒ 1 โ ๎ฒ 4s ๏
Data, single: total=701.45GiB, used=626.68GiB
System, single: total=4.00MiB, used=144.00KiB
Metadata, single: total=920.00MiB, used=910.08MiB
GlobalReserve, single: total=512.00MiB, used=0.00B
After:
sudo btrfs filesystem df /home/crono141/cdrom ๎ฒ 1 โ ๎ฒ 1h 8m 49s ๏
[sudo] password for crono141:
Data, single: total=701.45GiB, used=649.88GiB
System, single: total=4.00MiB, used=144.00KiB
Metadata, single: total=1.90GiB, used=956.97MiB
GlobalReserve, single: total=512.00MiB, used=0.00B
Anyway, I removed the SD card from my computer and put it into the steam deck. At first I though something had gone wrong, as the "Format SD Card" icon showed up in game mode. However, I went to the storage part of the game mode settings, and my library shows up, no problem, and says its the default install location (which is desired).
So it seems everything has worked, except the SD card icon is still present, and if I go into the general settings it shows the format SD card button. So I am wondering what about the format process occurs which tells game mode not to show the sdcard icon. Thought I would ask here as an issue to potentially expand our understanding and functionality (like for example, a "convert ext4 to btrfs script).
Any thoughts?
EDIT: Actually, the steam OS storage page shows the SD card, but doesn't show any of the games on it. However, I can launch any of the games I know are installed on the SD card no problem, even though game mode doesn't see them as installed. So maybe its an issue of registering the card with game mode somehow?
EDIT Again: Steam Desktop mode shows all the games on the SD Card no problem.