[SOLVED] Using BTRFS for NAS storage -- why doesn't VM recognize it

chicagonyc

New Member
Jan 28, 2023
16
4
3
Hi, I'm familiar and very happy with BTRFS on my Linux desktop. I'm totally new to Proxmox, however. I have the newest 7.3 version installed on a Thinkpad T520 with an SSD and a HDD.

I want to put VMs on the SSD, and use the HDD for NAS-style storage. I installed Fedora Server 37 successfully as a VM, and it only sees the 16Gb storage I gave it from the SSD -- that's fine.

I thought I could just follow the instructions from the Proxmox wiki entry on BTRFS to create a new BTRFS filesystem on the HDD at /dev/sda. That worked, including mounting it and adding it via the CLI as storage. I see the full 500Gb drive as storage.

7jhpq3vl5qea1.png


But what I can't get my mind around is how to give some, or all, of that storage space to Fedora Server, or to some other server VM I might install.

When I click Server->Hardware->Add Hard Disk, I'm prompted for how much to give. Ok, I try 32Gb of my 500Gb drive. Seems ok.

3ds2x7qx5qea1.png


Now, when I go to Fedora Server (well, it's the Cockpit web admin portal), it sees /dev/sdb, but calls it unrecognized space, and prompts me to format it (ironically not suggesting BTRFS as a possible format, only XFS, EXT4, NTFS -- so I assume I'd have to create a BTRFS filesystem on the command line).


ls2exvdd6qea1.png


But if I want to use BTRFS features like snapshots and checksums and maybe RAID1 down the line , does that mean I have to install a BTRFS filesystem inside a VM that is accessing storage on a BTRFS filesystem? That sounds ... weird? To have to create one filesystem inside another.

I may be missing something very basic about Proxmox and virtualizaiton, I realize.

BTW I do realize that I could/should create a NAS using a specialized VM. Most examples I see are TrueNAS but I'd want to use BTRFS, so I guess I could do Rockstor. But I thought it would make everything more complicated to add a 2nd VM without understanding how the first one works.

Update: I see the error I made, which was in not passing the drives to a VM as a whole. Once I did so using this guide I was able to add the disks to a NAS VM without any issue. Presumably then I will be able to create network shares.
 
Last edited:
Great! Please mark the thread as solved (edit it, there's a dropdown near the title) so others with the same problem can find it more easily.

As you already noticed, there's a difference between the FS on the host, and what the guest sees.
That's a good thing, because it means the guest can use any file system independently from the host.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!