Truenas tries to assign new hdd as ada0

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
Hi all.

So i am moving over from a synology nas to truenas. My home server is running XCP-NG, the truenas VM has a dedicated NIC and SATA HBA card* passed over to it. Both shows up when i run "pciconf -lv". The drive works perfectly (verified on a different machine) but i cant see it in the GUI. I pulled out the disk then after the disk spun down i pushed back in, and low and behold i see this in the console:
Screenshot from 2020-08-13 19-02-39.png


Google did not help me so i would appriciate any help.

Thanks in advance!




/EDIT
*https://www.amazon.co.uk/gp/product/B07THFN3Q2/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You shouldn't use external sites for pasting screenshots, this forum can take them directly and it's nicer for those who read things here to see without needing to leave the site.

I would suggest you may have a conflict with the way you're assigning the boot drive from XCP... are you also using a virtual SATA adapter for that? (and do you have an alternative or the option to specify the controller or disk IDs?)
 

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
Ok, sorry about that. Its a habit i guess, many forums wont take pics for some reason.

Yes, the drive for the OS is virtual, there is no advanced options for it in XO.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Do you have the option to offer the OS drive as SCSI instead of SATA? That should land it as da0 rather than ada0, so maybe avoid the conflict.
 

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
No, i can only add new virtual disks but i cant set whether it will show as sata or scsi for the guest OS.....

/EDIT
XCP-NG device for storage:
atapci0@pci0:0:1:1: class=0x010180 card=0x00015853 chip=0x70108086 rev=0x00 hdr=0x00
vendor = 'Intel Corporation'
device = '82371SB PIIX3 IDE [Natoma/Triton II]'
class = mass storage
subclass = ATA

xenpci0@pci0:0:3:0: class=0x010000 card=0x00015853 chip=0x00015853 rev=0x01 hdr=0x00
vendor = 'XenSource, Inc.'
device = 'Xen Platform Device'
class = mass storage
subclass = SCSI


Pass-through device:
ahci0@pci0:0:4:0: class=0x010601 card=0x10601b21 chip=0x06251b21 rev=0x01 hdr=0x00
vendor = 'ASMedia Technology Inc.'
class = mass storage
subclass = SATA
 
Last edited:

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,428
It is a problem of Xen block driver, pretending it is regular SATA, but since it is not coming through CAM subsystem it result sin conflict. As one of possible solutions you may force different ada device numbers to SATA ports on passed-through HBA. Look `man 4 cam` for description and examples.
 

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
So if i plug in a cheap-o ssd into the sata expander(amazon search fooled me into thinking it was a hba) that would resolve the issue?
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
That is a SATA HBA, Host Bus Adapter. Just that these add-in SATA HBAs have proven to be less reliable than SAS HBAs. LSI SAS HBAs come recommended for FreeNAS/TrueNAS because they have a proven track record and the drivers are mature.

That said people use SATA HBAs all the time with good results: Those soldered onto the motherboard.
 

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
Yeah i already got educated on that. I gone to ebay and ordered a HP H220 which according to the seller is lsi sas2308 9207-i8 pcie3... IDK when it will arrive. Hopefully by installing truenas onto a drive connected to that will resolve the issue.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
a HP H220

Very neat, and yes that's an LSI SAS2308. You want that on P20 firmware for FreeNAS/TrueNAS to support it perfectly. This forum has an excellent guide about flashing and cross-flashing: https://www.ixsystems.com/community...-lsi-9211-9300-9305-9311-hba-and-variants.54/

And there's a thread about it yonder: https://forums.servethehome.com/index.php?threads/flashing-hp-h220-sas-card-to-latest-fw.13057/

And short version of that same idea here: P14 sas2flash with P20 firmware. https://tifan.net/blog/2019/01/28/hp-h220-lsi-2308-9207-8i-stock-firmware-on-dell-r720/
 
Last edited:

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
Just to test i put in an ssd and hooked it up to the sata card but i still get interrupt storms during install even though the xcp-ng virtual disk is gone.......
(killed VM during install and rebooted the host to make sure its not caused by hot plugging sata, the storm seems to come from irq32)
Screenshot from 2020-08-23 19-46-08.png


/EDIT
QUick and dirty fix, added
Code:
hint.ada.0.at="scbus200"

to /boot/device.hints which fixed the ada0 issue, but i still get storm from irg36...... (one cpu core is pinned at 100% all the time) Cant see the ssd either under disks in the webui. Extracted from bootlog:

Code:
xn0: <Virtual Network Interface> at device/vif/0 on xenbusb_front0
xbd0: 65536MB <Virtual Block Device> at device/vbd/768uhub0:  on xenbusb_front0
xbd0: attaching as ada0
xbd0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
features: write_barrier
xn0: Ethernet address: a0:36:9f:8a:e8:5f
xbd0: synchronize cache commands enabled.
xenbusb_back0: <Xen Backend Devices> on xenstore0
xenballoon0: <Xen Balloon Device> on xenstore0
xn0: backend features: feature-sgxctrl0: <Xen Control Device> feature-gso-tcp4 on xenstore0
xs_dev0:
<Xenstore user-space device> on xenstore0
Trying to mount root from zfs:boot-pool/ROOT/default []...
Root mount waiting for: CAM usbus0
uhub0: 2 ports with 2 removable, self powered
Root mount waiting for: CAM usbus0
ugen0.2: <QEMU 0.10.2 QEMU USB Tablet> at usbus0
(aprobe0:ahcich1:0:0:0): SET_MULTI. ACB: c6 00 00 00 00 40 00 00 00 00 01 00
(aprobe0:ahcich1:0:0:0): CAM status: ATA Status Error
(aprobe0:ahcich1:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT )
(aprobe0:ahcich1:0:0:0): RES: 51 04 00 00 00 00 00 00 00 00 00
(aprobe0:ahcich1:0:0:0): Retrying command, 0 more tries remain
(aprobe0:ahcich1:0:0:0): SET_MULTI. ACB: c6 00 00 00 00 40 00 00 00 00 01 00
(aprobe0:ahcich1:0:0:0): CAM status: ATA Status Error
(aprobe0:ahcich1:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT )
(aprobe0:ahcich1:0:0:0): RES: 51 04 00 00 00 00 00 00 00 00 00
(aprobe0:ahcich1:0:0:0): Error 5, Retries exhausted
ada1 at ahcich0 bus 0 scbus2 target 0 lun 0
ada1: <SATA SSD SBFM61.3> ACS-4 ATA SATA 3.x device
ada1: Serial Number <redacted>
ada1: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 114473MB (234441648 512 byte sectors)
cd0 at ata1 bus 0 scbus1 target 1 lun 0
cd0: <QEMU QEMU DVD-ROM 0.10> Removable CD-ROM SCSI device
cd0: Serial Number QM00004
cd0: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present
Root mount waiting for: CAM


/EDIT2
Flipped on verbose mode and its just spamming:
Code:
ahcichX: SATA connect timeout time=10000us status 00000000
ahcichX: AHCI reset: device not found
ahcichX: DISCONNECT requested
ahcichX: AHCI RESET...


/EDIT3

/EDIT4
It is most likely a driver issue, tried with SCALE and it works just fine with the card.
 
Last edited:
Top