maharmstone / btrfs

WinBtrfs - an open-source btrfs driver for Windows
GNU Lesser General Public License v3.0
5.8k stars 222 forks source link

[Question] How auto-mount work and can I block-list my Linux root FS? #626

Closed Mart-Bogdan closed 7 months ago

Mart-Bogdan commented 8 months ago

I have read in readme about automount and paragon, more specific:

  • The drive doesn't show up and Paragon software has been installed Paragon's filesystem-reading software is known to disable automount. Disable or uninstall Paragon, then re-enable automount by running diskpart and typing automount enable.

Is it not possible to assign drive letter with Disk Management in windows, like how I can change/add drive letters for NTFS/FAT partitions? I could even add directory mount-points there.

To be more specific what I want is to not automount btrfs partitions, but be able to manually mount them on windows. Having sub-volume as mount is a plus. (as I understand it's registry option).

But as I understand without aoutomount I won't be able to use USB drives? (with ntfs/fat). But I guess I could live with it, if I'll have to use MMC or console to mount USB drives.

What I want to do is to create partition that would be used as share between widnows and Linux and also to hold data from windows.

My current work requires me to store huge volumes of data and being abele to use cp --reflink. It's gamedev and it's huge volume, and having multiple copies of different branches require impractical amount of time. Since ReFS is not available anymore, I decided to look in direction of winbtrfs.

But I don't want to risk my root/home partitions, as my whole life is there. I want this driver to be used only with single partition that I can afford to lose.

To sum up my questions:

P.S. I understand that it is not an issue/bug, but wasn't able to find place for discussions in readme, or GH discussions enabled. And I decided it better to be public instead of email, in case it would be useful for others.

Thanks.

Mart-Bogdan commented 7 months ago

Can someone answer here, please?

maharmstone commented 7 months ago

Yes, it's known that Disk Management doesn't play nicely with Btrfs volumes. The shell extension allows you to change drive letters if you need to.

The README tells you how to exclude certain volumes - search for the word "Ignore".

Mart-Bogdan commented 7 months ago

So I need to mount it first to create registry entry?

Or I can create this entry upfront? before installing driver?

registry under HKLM\SYSTEM\CurrentControlSet\Services\btrfs for each mounted filesystem, named after its UUID.

In which format it should be? in curly braces?

Given following output

[winnie@bm-linux-nitro517 ~]$ sudo btrfs fi show /
Label: 'root'  uuid: 2e943f95-2258-42c4-93cb-1cef939d524e
        Total devices 2 FS bytes used 858.71GiB
        devid    1 size 606.03GiB used 603.03GiB path /dev/nvme0n1p1
        devid    2 size 334.05GiB used 334.05GiB path /dev/nvme1n1p1

I can create registry Key HKLM\SYSTEM\CurrentControlSet\Services\btrfs{2e943f95-2258-42c4-93cb-1cef939d524e}

And put value: Ignore=1 under it and assume it would be safe and it won't be mounted after driver installation?

Like following REG file

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\btrfs\{2e943f95-2258-42c4-93cb-1cef939d524e}]
"Ignore"=dword:00000001

Still would be nice to have option to ignore by default and then selectively enable stuff.