Need help replicating potential bug - Proxmox / SMB / TrueNAS

Joined
Jan 15, 2023
Messages
6
I've spent the past 2 weeks trying to sort this out. I have replaced all kinds of hardware, cables etc., but I can't seem to get this to work. I have also extensively testing many settings and without making this thread too long with everything I've tried, I just want to see if anyone else can replicate this potential bug.

Setup - Proxmox (both V 7.4-3 and 7.3-3) TrueNAS 13.0 U4

1) SMB shares set up on TrueNAS (I've tried with both Mirrored and Z2 datasets)
2) Proxmox connects to the TrueNAS shares in the datacenter and adds it as a storage (permissions is not an issue because I can verify read/write to the disk using Proxmox console and I can see that the disk image is created by Proxmox.)
3) Add a hard disk to the a Windows or Linux guest VM in the hardware tab (I've tried Ubuntu and Windows 10, and 11 Enterprise). How the virtual disk is connected (SATA, VirtIO doesn't seem to matter, nor does the SCSI controller selection). Make sure you choose the storage that was added from the TrueNAS share.
4) Boot the VM and try to initialize the disk.


In Windows I get an I/O error when I initialize the disk. In Ubuntu I also get an I/O error when I format it to Ext4. Gparted ISO gives me an error as well.

However, I have confirmed that can map the same share using the guest OS as a network drive on the guest OS (as opposed to being passed through as a disk through Proxmox). In both cases I can verify that I can read and write to the network folder.

It's unlikely to be a Proxmox issue because if I create an SMB share on a different computer and follow steps 2 - 4 - it works as expected. Only if Proxmox creates the virtual disk on a TrueNAS SMB share do I get the I/O error.

I use the same accounts to log into everything, so I'm fairly certain it's not an ACL issue.

Happy to provide more information, I just didn't want to make this thread too long.

The odd thing is that this used to work before! I had mapped the same SMB shares in Proxmox and created disk images to pass through to guest OS and they were able to initialize the disks and format them without issue.

Then I noticed some file corruption (which is why I replaced HBAs, backplanes, cables (ethernet, SATA, SFF 8088 etc), ethernet cards (10 GbE and 1 Gbe), my switch, etc. Since then it hasn't been working properly. Based on that, I know you're thinking this is probably a hardware issue, but I've basically replaced everything on both the Proxmox server and the TrueNAS server.
 

nKk

Dabbler
Joined
Jan 8, 2018
Messages
42
I can confirm this behavior only if I select to initialize the partition as GPT in Windows and it's sporadic.

TrueNAS 13.0 U4 / SMB share -> Proxmox 7.2.3
Successfully add SMB/CIFS storage to Proxmox and create new virtual HDD. Connect virtual HDD to Windows 10 and try to format it.
If the partition is initialized as GPT most of the time Windows return a error.
If the partition is initialized as MBR Windows format it every time.

I don't use SMB as storage for virtualization and I only make quick tests to try to reproduce this issue.
 
Joined
Jan 15, 2023
Messages
6
@nKk Thank you so much for taking the time to replicate it. At least it validates that there might be a bigger issue here.

On my setup, neither option seems to work. However, I do recall in my earlier troubleshooting that on the Linux VM, I could format with FAT and NTFS, just not Ext4. But, now all formats are giving me the same error.

Given there are three systems involved (Proxmox, TrueNAS, and guest OS), this has been pretty difficult to troubleshoot. But, since everything seems to work properly when TrueNAS is not in the equation (i.e. a network share on a different computer is used), I think the problem might be with TrueNAS.
 

unseen

Contributor
Joined
Aug 25, 2017
Messages
103
Out of curiosity, I just tried this. The only difference on my side is that I share out disk space from my TrueNAS server to my Proxmox cluster via NFS and not SMB.

So anyway, I created a second IDE disk in a Windows 10 Virtual Machine and allocated 32GB of shared storage to it. Fired up Windows, added a GPT partition table and formatted the disk to NTFS as a new simple volume. (Disk 1 in the picture)

Screenshot from 2023-05-30 13-27-35.png


No problem at all. Maybe it's the fact that you are using SMB to attach the shared storage to Proxmox that is key here.
 
Joined
Jan 15, 2023
Messages
6
I think you're right in that the problem is some kind of SMB bug. I haven't tried NFS (only because my pools have space in the name which isn't compatible with NFS), but do you have any SMB shares you could try with?

I put a bug report on this a few days ago.

 

unseen

Contributor
Joined
Aug 25, 2017
Messages
103
I think you're right in that the problem is some kind of SMB bug. I haven't tried NFS (only because my pools have space in the name which isn't compatible with NFS), but do you have any SMB shares you could try with?

No, as I wouldn't use SMB for this kind of thing. However, I'll have some more time at the weekend so I'll create an SMB share and see if it breaks things for me.
 
Top