Mount BTRFS drive to WSL

Mar 14, 2023

Had to mount a BTRFS drive to windows recently, while winbtrfs does work for some basic operations, I wouldn’t really trust it for funky things. In this case I had to consolidate multiple drives into a single one.

// windows
// get the drive ID
GET-CimInstance -query "SELECT * from Win32_DiskDrive"
// needs administrator—mount the drive
wsl --mount \\.\PHYSICALDRIVE1 --bare

// wsl | ubuntu 
sudo apt install btrfs-progs
sudo mount /dev/sdd3 /mnt/$btrfs_mount
sudo btrfs device scan

// windows
wsl --unmount \\.\PHYSICALDRIVE1