4

I have Freenas running in a VM in XCP-NG. I've followed the guides and I've dedicated a SATA controller to it using PCI-passthrough. Freenas correctly discovers its boot disk, which is virtual, and two physical disks that are connected through the SATA controller. Unfortunately, Freenas identifies both the virtual boot disk and the first physical disk as ada0.

Here's what I get when I run geom disk list

Geom name: ada0
Providers:
1. Name: ada0
   Mediasize: 8589934592 (8.0G)
   Sectorsize: 512
   Mode: r1w1e2
   descr: (null)
   ident: (null)
   rotationrate: unknown
   fwsectors: 0
   fwheads: 0

Geom name: cd0
Providers:
1. Name: cd0
   Mediasize: 0 (0B)
   Sectorsize: 2048
   Mode: r0w0e0
   descr: QEMU QEMU DVD-ROM
   ident: (null)
   rotationrate: unknown
   fwsectors: 0
   fwheads: 0

Geom name: ada0
Providers:
1. Name: ada0
   Mediasize: 4000787030016 (3.6T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e2
   descr: WDC WD40EZRZ-00WN9B0
   lunid: 50014ee20d58de88
   ident: WD-WCC4E5SLVZV7
   rotationrate: 5400
   fwsectors: 63
   fwheads: 16

Geom name: ada1
Providers:
1. Name: ada1
   Mediasize: 4000787030016 (3.6T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e2
   descr: WDC WD40EZRX-22SPEB0
   lunid: 50014ee2b6e06d20
   ident: WD-WCC4E4EN0Y9S
   rotationrate: 5400
   fwsectors: 63
   fwheads: 16

As you can see, ada0 appears twice. This is wreaking all kinds of havoc with ZFS, which core dumps if I run zpool import or make any attempt to load the existing pool on the physical disks.

Some things that I've learned during my research into this.

  1. If I run Linux instead of Freenas, the disks are detected as xvda, sda and sdb.

  2. If I change the position of the boot disk to 2 instead of 0, it becomes ada2 and pool import works but this isn't feasible since I plan to have several more physical disks.

  3. I can't tell XCP-NG to assign the boot disk some high number that won't conflict with any physical disks because then the VM won't boot. It appears that the boot disk needs to be in position 3 or lower.

  4. In a youtube video, someone else who's done this used a SAS controller instead and the physical disks were labelled da0, da1, etc., avoiding the conflict. - https://www.youtube.com/watch?v=yrRLm_iHkRM

Is there any way I can force Freenas to number the disks from the second controller differently? Can I force it to use da0? Can I force it to start at a different offset, like ada1? Can I trick it into giving the virtual disk a different device name? Can I get XCP-NG to boot from a disk at an arbitrary position? Am I just stuck unless I buy a SAS controller?

Colin
  • 141
  • 1
  • FreeNAS 9 consistently named harddrives better when it is dealing with SCSI or SAS over SATA. ScsiEnclosureServices used for JBOD enclosures may help get more data. sesutil – rjt Jun 27 '20 at 00:08

0 Answers0