TrueNAS External HDD problems
TrueNAS External HDD problems
Hey guys,
New to VB over the last 6mths. I'm not a chef, but I think I'm a good cook, and trying to follow recipes to add TrueNAS on a VB VM running on a recycled 2010 MacBook Pro with High Sierra MacOS. I'm struggling to solve what I hope is a simple answer. I have a 14Tb USB physical drive that is partitioned (expecting to use for 2 separate VM's). I'm running TrueNAS on a FreeBSD (whatever that is) instance and it's working great so far. I just don't have any storage capability, because it can't see the drive. Turned on USB and added the SeaGate Disk in VB settings. I tried the Vboxmanage command to prepare the .vmdk pointer to the disk partition, but I get VERR_ACCESS_DENIED when I add it as a disk in my VM storage settings. Some have suggested I run my VB instance as root, but that doesn't feel right. I have been reading/reading/reading, but I'm not finding anything that is helpful.
Apologies if this is a rookie question, but I don't know where to go and I have to go somewhere to learn. Thanks in advance.
New to VB over the last 6mths. I'm not a chef, but I think I'm a good cook, and trying to follow recipes to add TrueNAS on a VB VM running on a recycled 2010 MacBook Pro with High Sierra MacOS. I'm struggling to solve what I hope is a simple answer. I have a 14Tb USB physical drive that is partitioned (expecting to use for 2 separate VM's). I'm running TrueNAS on a FreeBSD (whatever that is) instance and it's working great so far. I just don't have any storage capability, because it can't see the drive. Turned on USB and added the SeaGate Disk in VB settings. I tried the Vboxmanage command to prepare the .vmdk pointer to the disk partition, but I get VERR_ACCESS_DENIED when I add it as a disk in my VM storage settings. Some have suggested I run my VB instance as root, but that doesn't feel right. I have been reading/reading/reading, but I'm not finding anything that is helpful.
Apologies if this is a rookie question, but I don't know where to go and I have to go somewhere to learn. Thanks in advance.
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: TrueNAS External HDD problems
This quite likely means that you are trying Raw Disk Access, which is definitely not a "rookie" process. There are lots of possibilities to damage good data if you make the pointer file wrong or the host computer decides to re-enumerate the disks one day and the pointer file points to a different disk.Solarczar wrote: I tried the Vboxmanage command to prepare the .vmdk pointer to the disk partition,
On Windows hosts every step of Raw Disk Access must be Run As Administrator. Possibly Mac requires similar, meaning running as 'root' would probably be required.Solarczar wrote:I get VERR_ACCESS_DENIED
Another possibility could be to make a VDI virtual disk file on the USB drive partition, and forget about raw disk access. Per viewtopic.php?f=8&t=29626#p131954:
The Vboxmanage command to make a VDI is found at https://www.virtualbox.org/manual/ch08. ... eatemediumaeichner wrote:You can create hard disks with up to 2TB with the GUI. If you need a bigger disk use VBoxManage.
Re: TrueNAS External HDD problems
Okkkkk, I'm no expert, but would this work?...
sudo VBoxManage createmedium --filename "/Volume/TrueNAS 12Tb Partition/TrueNAS 12Tb.vdi" --size 12288 --format VDI --variant Fixed
My thoughts...
1) I hope this would place a big file volume partition to be seen by all users (my family) on TrueNAS, and as Admin, I would create space for them. Is this best practice or would it make more sense to create a separate VDI for each TrueNAS user and add each to the VM session?
2) Should it be "Fixed" or "Standard", as I think Fixed would make it faster?
Thanks
sudo VBoxManage createmedium --filename "/Volume/TrueNAS 12Tb Partition/TrueNAS 12Tb.vdi" --size 12288 --format VDI --variant Fixed
My thoughts...
1) I hope this would place a big file volume partition to be seen by all users (my family) on TrueNAS, and as Admin, I would create space for them. Is this best practice or would it make more sense to create a separate VDI for each TrueNAS user and add each to the VM session?
2) Should it be "Fixed" or "Standard", as I think Fixed would make it faster?
Thanks
Re: TrueNAS External HDD problems
Correction, as the size is in MB...and 12288 is 12Gb and I need 12Tbsudo VBoxManage createmedium --filename "/Volume/TrueNAS 12Tb Partition/TrueNAS 12Tb.vdi" --size 12288 --format VDI --variant Fixed
sudo VBoxManage createmedium --filename "/Volume/TrueNAS 12Tb Partition/TrueNAS 12Tb.vdi" --size 12288000 --format VDI --variant Fixed
The more I think about it from potential file corruption, I should probably give each user say 1Tb VDI . Thoughts?
Re: TrueNAS External HDD problems
So I struggle with path addressing on a Mac, so not sure I got it right, but just tried this and got these errors...
SolarCzarHA:~ MB2$ sudo VBoxManage createmedium --filename "/Volume/TrueNAS 12Tb Partition/TrueNAS 1Tbv1.vdi" --size 1048576 --format VDI --variant Fixed
Password:
0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Failed to create medium
VBoxManage: error: Could not create the medium storage unit '/Volume/TrueNAS 12Tb Partition/TrueNAS 1Tbv1.vdi'.
VBoxManage: error: VDI: disk would overflow creating image '/Volume/TrueNAS 12Tb Partition/TrueNAS 1Tbv1.vdi' (VERR_DISK_FULL).
VBoxManage: error: VDI: setting image size failed for '/Volume/TrueNAS 12Tb Partition/TrueNAS 1Tbv1.vdi' (VERR_DISK_FULL)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium
VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg *)" at line 510 of file VBoxManageDisk.cpp
SolarCzarHA:~ MB2$ sudo VBoxManage createmedium --filename "/Volume/TrueNAS 12Tb Partition/TrueNAS 1Tbv1.vdi" --size 1048576 --format VDI --variant Fixed
Password:
0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Failed to create medium
VBoxManage: error: Could not create the medium storage unit '/Volume/TrueNAS 12Tb Partition/TrueNAS 1Tbv1.vdi'.
VBoxManage: error: VDI: disk would overflow creating image '/Volume/TrueNAS 12Tb Partition/TrueNAS 1Tbv1.vdi' (VERR_DISK_FULL).
VBoxManage: error: VDI: setting image size failed for '/Volume/TrueNAS 12Tb Partition/TrueNAS 1Tbv1.vdi' (VERR_DISK_FULL)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium
VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg *)" at line 510 of file VBoxManageDisk.cpp
Re: TrueNAS External HDD problems
So while I wait for an expert reply, I am trying to add a VDI through the VB GUI and limit it to 1Tb to test whether it will work.
Right now, it's telling me that it will take 7hrs to build a 1Tb Fixed VDI on my external HDD. Oh my! I have to do this 12 times = ~84hrs to create the files? Surely there is a faster way?
Right now, it's telling me that it will take 7hrs to build a 1Tb Fixed VDI on my external HDD. Oh my! I have to do this 12 times = ~84hrs to create the files? Surely there is a faster way?
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: TrueNAS External HDD problems
Why did you make it fixed?
Re: TrueNAS External HDD problems
edit 1:05pm CST...
took a screenshot of VB
Last edited by Solarczar on 10. Mar 2021, 21:12, edited 1 time in total.
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: TrueNAS External HDD problems
Is your USB drive connected via USB2? 1TB of data at 25MB/s (the speed I've seen before, also see https://www.google.com/search?q=USB+2+h ... e&ie=UTF-8) takes about 11-1/2 hours. Fixed writes the entire disk structure, that's a whole 1TB of data to write.
Dynamic works well in normal disks. It might not give NAS trouble. But then again it might, I haven't tested it.
Try a USB 3 port & drive, or connect the drive to a SATA cable temporarily. A VDI written by a different computer will work on your Mac.
Dynamic works well in normal disks. It might not give NAS trouble. But then again it might, I haven't tested it.
Try a USB 3 port & drive, or connect the drive to a SATA cable temporarily. A VDI written by a different computer will work on your Mac.
Re: TrueNAS External HDD problems
Well, I stopped the process and restarted to add as Dynamic and now it won't allow me to assign more than 150Gb to the file size. I reformatted the drive to be safe. I restarted Mac & VB, with no joy. Now What?
Re: TrueNAS External HDD problems
So I've loaded VB 6.1 on another MacBook with USB 3.0 and created a 1Tb Dynamic and 1 Tb Fixed (Says 1hr 10min). Thanks for the perspective. I'll create these two drives and see if they can be addressed by TrueNAS. More to come, but thanks Scottgus1.
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: TrueNAS External HDD problems
I ask again, why did you use fixed?
Re: TrueNAS External HDD problems
Because on the VB disk creation screen that I pasted in up above in this thread, it clearly shows that Fixed is faster. This is a remote TrueNAS application, with an additional NextCloud plugin, running virtually, on an old 2010 MacBook, so anything I can do to improve performance seemed appropriate.mpack wrote:I ask again, why did you use fixed?
I created the vdi drives last night onto the external drive and they are recognized now, so thanks @Scottgus1. Step one checked. Now I'm going to learn how to setup TrueNAS
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: TrueNAS External HDD problems
Good answer. But the dialog is quoting an old section of the manual, written by some guy making the same assumptions you did. I don't know who wrote it, but that passage has been a thorn in my side for more than 10 years.Solarczar wrote: Because on the VB disk creation screen that I pasted in up above in this thread, it clearly shows that Fixed is faster.
Fixed is not faster. Fixed and Dynamic VDI use the exact same file structure. The only difference is whether blocks get allocated up front, or only on demand. There are arguments about latency (irrelevant for SSD and USB flash drives) but it is unclear that either variant gets a clear advantage for seek times. What is known about the practical effects of using fixed are (a) users tend to worry about the size so make them too small, leading to congestion and poor performance, (b) they are harder to back up with all that wasted space inside, so disk errors can be fatal.
People have tested this and nobody has ever found a real external speed difference: how could they when the file structures are identical. So the only thing you're left with are the downsides of fixed.
In your case you are creating fixed size VDI on relatively slow drives, blocks get allocated up front and so that's a lot of writes to a slow drive before you can start.
Re: TrueNAS External HDD problems
Hmmm, something to remember, but I too was skeptical and will test as well. Now I'm going through setting up all these 2TB vdi files to fake out VB, and it's a PITA. This is just a 14Tb external usb drive and I've got 8 separate vdi files getting built as different stripe variations within TrueNAS. I built a 6Tb (3x 2Tb) Dynamic, and a 6Tb (3x Tb) Fixed, so I could compare performance. I worry about all those separate 2TB files and data corruption. Time will tell