Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESXi : LSI SAS6g MPT2SAS card passtrough : it's not a SATA disk, ignoring #19

Open
OrpheeGT opened this issue Sep 15, 2021 · 7 comments
Labels
awaiting-feedback enhancement New feature or request

Comments

@OrpheeGT
Copy link

Hello,

I tried again to passtrough LSI SAS2 card to ESXi.

I edited rd.gz from loader to add a new file in /usr/lib/modules-load.d/

70-disk-0000-lsi-mpt2sas.conf

put in it just : mpt2sas

as a reminder, mpt2sas module is already part of default DS3615xs loader.

It works as this, mpt2sas module is loaded correctly at boot.

I still have the same issue, disk is not considered as SATA disk :

:: Loading module mpt2sas[ 2.033193] mpt2sas version 20.00.00.00 loaded
[ 2.033607] scsi34 : Fusion MPT SAS Host
[ 2.034189] I/O scheduler elevator not found
[ 2.035640] mpt2sas0: 64 BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (4022256 kB)
[ 2.108088] mpt2sas0: MSI-X vectors supported: 1, no of cores: 2, max_msix_vectors: -1
[ 2.109085] mpt2sas 0000:0b:00.0: irq 74 for MSI/MSI-X
[ 2.110071] mpt2sas0-msix0: PCI-MSI-X enabled: IRQ 74
[ 2.110091] mpt2sas0: iomem(0x00000000fd3fc000), mapped(0xffffc90000018000), size(16384)
[ 2.111067] mpt2sas0: ioport(0x0000000000005000), size(256)
[ 2.225979] mpt2sas0: Allocated physical memory: size(7445 kB)
[ 2.226000] mpt2sas0: Current Controller Queue Depth(3305), Max Controller Queue Depth(3432)
[ 2.226972] mpt2sas0: Scatter Gather Elements per IO(128)
[ 2.286584] mpt2sas0: LSISAS2008: FWVersion(20.00.07.00), ChipRevision(0x03), BiosVersion(07.39.02.00)
[ 2.286922] mpt2sas0: Protocol=(Initiator,Target), Capabilities=(TLR,EEDP,Snapshot Buffer,Diag Trace Buffer,Task Set Full,NCQ)
[ 2.289072] mpt2sas0: sending port enable !!
[ 2.293066] mpt2sas0: host_add: handle(0x0001), sas_addr(0x5003005703dbf193), phys(8)
[ 2.299931] mpt2sas0: port enable: SUCCESS
[ 2.300423] I/O scheduler elevator not found
[ 2.301076] I/O scheduler elevator not found
[ 2.302799] scsi 34:0:0:0: Direct-Access Samsung SSD 850 EVO 250GB 1B6Q PQ: 0 ANSI: 6
[ 2.303198] scsi 34:0:0:0: SATA: handle(0x0009), sas_addr(0x4433221103000000), phy(3), device_name(0x5002538d4026c106)
[ 2.303902] scsi 34:0:0:0: SATA: enclosure_logical_id(0x5003005703dbf193), slot(0)
[ 2.304037] scsi 34:0:0:0: atapi(n), ncq(y), asyn_notify(n), smart(y), fua(y), sw_preserve(y)
[ 2.305024] scsi 34:0:0:0: serial_number(S21PNXBXXXXXXX )
[ 2.305910] scsi 34:0:0:0: qdepth(32), tagged(1), simple(0), ordered(0), scsi_level(7), cmd_que(1)
[ 2.307034] <redpill/scsi_notifier.c:65> Probing SCSI device using sd_probe_shim
[ 2.307566] <redpill/scsi_notifier.c:77> Triggering SCSI_EVT_DEV_PROBING notifications
[ 2.307970] <redpill/native_sata_boot_shim.c:153> Found new SCSI disk vendor="Samsung SSD 850 1B6QS21PNXBGXXXXXX " model="SSD 850 EVO 250GB ": checking boot shim viability
[ 2.308909] <redpill/boot_shim_base.c:29> scsi_is_boot_dev_target: it's not a SATA disk, ignoring
[ 2.309493] <redpill/scsi_notifier.c:87> Calling original sd_probe()
[ 2.310003] <redpill/scsi_notifier.c:91> Triggering SCSI_EVT_DEV_PROBED notifications - sd_probe() exit=0
[ 2.311104] sd 34:0:0:0: [sas0] 488397168 512-byte logical blocks: (250 GB/232 GiB)
[ 2.312916] sd 34:0:0:0: [sas0] Write Protect is off
[ 2.313276] sd 34:0:0:0: [sas0] Mode Sense: 7f 00 10 08
[ 2.314101] sd 34:0:0:0: [sas0] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 2.316281] sas0: p1
[ 2.318016] sd 34:0:0:0: [sas0] Attached SCSI disk

fdisk -l

Disk /dev/synoboot: 128 MiB, 134217728 bytes, 262144 sectors
Disk model: TYPE D 3SE
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf110ee87

Device Boot Start End Sectors Size Id Type
/dev/synoboot1 2048 100351 98304 48M 83 Linux
/dev/synoboot2 100352 253951 153600 75M 83 Linux
/dev/synoboot3 253952 262143 8192 4M 83 Linux

Disk /dev/sda: 16 GiB, 17179869184 bytes, 33554432 sectors
Disk model: Virtual
SATA Hard Drive
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x2d4890c5

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 4982527 4980480 2.4G fd Linux raid autodetect
/dev/sda2 4982528 9176831 4194304 2G fd Linux raid autodetect
/dev/sda3 9437184 33349631 23912448 11.4G fd Linux raid autodetect

Disk /dev/sas0: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Disk model: SSD 850 EVO 250GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x49e15208

Device Boot Start End Sectors Size Id Type
/dev/sas0p1 2048 488394751 488392704 232.9G 7 HPFS/NTFS/exFAT

Disk /dev/md0: 2.4 GiB, 2549940224 bytes, 4980352 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/zram0: 1.2 GiB, 1236271104 bytes, 301824 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/zram1: 1.2 GiB, 1236271104 bytes, 301824 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/md1: 2 GiB, 2147418112 bytes, 4194176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/md2: 11.4 GiB, 12242124800 bytes, 23910400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/vg1-syno_vg_reserved_area: 12 MiB, 12582912 bytes, 24576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/vg1-volume_1: 11 GiB, 11811160064 bytes, 23068672 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/cachedev_0: 11 GiB, 11811160064 bytes, 23068672 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Serial console output in attachment.

My disk is a SATA disk plugged on SAS controller.
It works fine on Jun's loader.
and SMART is working with passtrough LSI card on it.

7.0.1_21.log

@OrpheeGT
Copy link
Author

OrpheeGT commented Sep 15, 2021

Here is a dmesg result from jun's 6.2.3 loader on the same configuration (but with my 4 SATA PROD disk instead of my SATA SSD test disk)

[ 1.551691] megasas: 06.506.00.00-rc1 Sat. Feb. 9 17:00:00 PDT 2013
[ 1.555517] mpt2sas version 20.00.00.00 loaded
[ 1.555763] scsi31 : Fusion MPT SAS Host
[ 1.557472] mpt2sas0: 64 BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (4055204 kB)
[ 1.560466] tsc: Refined TSC clocksource calibration: 3492.059 MHz
[ 1.560469] Switching to clocksource tsc
[ 1.629395] mpt2sas0: MSI-X vectors supported: 1, no of cores: 2, max_msix_vectors: -1
[ 1.629408] mpt2sas 0000:0b:00.0: irq 77 for MSI/MSI-X
[ 1.630378] mpt2sas0-msix0: PCI-MSI-X enabled: IRQ 77
[ 1.630381] mpt2sas0: iomem(0x00000000fd3fc000), mapped(0xffffc90008240000), size(16384)
[ 1.630382] mpt2sas0: ioport(0x0000000000005000), size(256)
[ 1.744283] mpt2sas0: Allocated physical memory: size(7445 kB)
[ 1.744286] mpt2sas0: Current Controller Queue Depth(3305), Max Controller Queue Depth(3432)
[ 1.744288] mpt2sas0: Scatter Gather Elements per IO(128)
[ 1.802664] mpt2sas0: LSISAS2008: FWVersion(20.00.07.00), ChipRevision(0x03), BiosVersion(07.39.02.00)
[ 1.802667] mpt2sas0: Protocol=(Initiator,Target), Capabilities=(TLR,EEDP,Snapshot Buffer,Diag Trace Buffer,Task Set Full,NCQ)
[ 1.802767] mpt2sas0: sending port enable !!
[ 1.807104] mpt2sas0: host_add: handle(0x0001), sas_addr(0x5003005703dbf193), phys(8)
[ 1.813246] mpt2sas0: port enable: SUCCESS
[ 1.832294] scsi 31:0:0:0: Direct-Access ATA ST4000VN008-2DR166 SC60 PQ: 0 ANSI: 6
[ 1.832364] scsi 31:0:0:0: SATA: handle(0x000c), sas_addr(0x4433221103000000), phy(3), device_name(0x5000c500c805168f)
[ 1.832375] scsi 31:0:0:0: SATA: enclosure_logical_id(0x5003005703dbf193), slot(0)
[ 1.832481] scsi 31:0:0:0: atapi(n), ncq(y), asyn_notify(n), smart(y), fua(y), sw_preserve(y)
[ 1.832532] scsi 31:0:0:0: serial_number( XXXXXX)
[ 1.832537] scsi 31:0:0:0: qdepth(32), tagged(1), simple(0), ordered(0), scsi_level(7), cmd_que(1)
[ 1.837745] sd 31:0:0:0: [sdd] 7814037168 512-byte logical blocks: (4.00 TB/3.63 TiB)
[ 1.837748] sd 31:0:0:0: [sdd] 4096-byte physical blocks
[ 1.840877] scsi 31:0:1:0: Direct-Access ATA ST4000VN008-2DR166 SC60 PQ: 0 ANSI: 6
[ 1.844345] scsi 31:0:1:0: SATA: handle(0x0009), sas_addr(0x4433221100000000), phy(0), device_name(0x5000c500c65a564e)
[ 1.844350] scsi 31:0:1:0: SATA: enclosure_logical_id(0x5003005703dbf193), slot(3)
[ 1.844449] scsi 31:0:1:0: atapi(n), ncq(y), asyn_notify(n), smart(y), fua(y), sw_preserve(y)
[ 1.848294] scsi 31:0:1:0: serial_number( XXXXXX)
[ 1.848299] scsi 31:0:1:0: qdepth(32), tagged(1), simple(0), ordered(0), scsi_level(7), cmd_que(1)
[ 1.853477] sd 31:0:1:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.63 TiB)
[ 1.853479] sd 31:0:1:0: [sda] 4096-byte physical blocks
[ 1.856872] scsi 31:0:2:0: Direct-Access ATA ST4000VN008-2DR166 SC60 PQ: 0 ANSI: 6
[ 1.860301] scsi 31:0:2:0: SATA: handle(0x000a), sas_addr(0x4433221101000000), phy(1), device_name(0x5000c500c65aabd7)
[ 1.860306] scsi 31:0:2:0: SATA: enclosure_logical_id(0x5003005703dbf193), slot(2)
[ 1.860426] scsi 31:0:2:0: atapi(n), ncq(y), asyn_notify(n), smart(y), fua(y), sw_preserve(y)
[ 1.864283] scsi 31:0:2:0: serial_number( XXXXXX)
[ 1.864289] scsi 31:0:2:0: qdepth(32), tagged(1), simple(0), ordered(0), scsi_level(7), cmd_que(1)
[ 1.869506] sd 31:0:2:0: [sdb] 7814037168 512-byte logical blocks: (4.00 TB/3.63 TiB)
[ 1.869509] sd 31:0:2:0: [sdb] 4096-byte physical blocks
[ 1.873288] scsi 31:0:3:0: Direct-Access ATA ST4000VN008-2DR166 SC60 PQ: 0 ANSI: 6
[ 1.876276] scsi 31:0:3:0: SATA: handle(0x000b), sas_addr(0x4433221102000000), phy(2), device_name(0x5000c500c8051b77)
[ 1.876281] scsi 31:0:3:0: SATA: enclosure_logical_id(0x5003005703dbf193), slot(1)
[ 1.876380] scsi 31:0:3:0: atapi(n), ncq(y), asyn_notify(n), smart(y), fua(y), sw_preserve(y)
[ 1.880234] scsi 31:0:3:0: serial_number( XXXXXX)
[ 1.880239] scsi 31:0:3:0: qdepth(32), tagged(1), simple(0), ordered(0), scsi_level(7), cmd_que(1)
[ 1.884304] sd 31:0:3:0: [sdc] 7814037168 512-byte logical blocks: (4.00 TB/3.63 TiB)
[ 1.884307] sd 31:0:3:0: [sdc] 4096-byte physical blocks
[ 1.896369] sd 31:0:0:0: [sdd] Write Protect is off
[ 1.896372] sd 31:0:0:0: [sdd] Mode Sense: 7f 00 10 08
[ 1.896495] sd 31:0:0:0: [sdd] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 1.917972] sd 31:0:1:0: [sda] Write Protect is off
[ 1.917978] sd 31:0:1:0: [sda] Mode Sense: 7f 00 10 08
[ 1.918102] sd 31:0:1:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 1.931454] sdd: sdd1 sdd2 sdd3
[ 1.944369] sd 31:0:2:0: [sdb] Write Protect is off
[ 1.944372] sd 31:0:2:0: [sdb] Mode Sense: 7f 00 10 08
[ 1.945662] sd 31:0:2:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 1.963212] sd 31:0:3:0: [sdc] Write Protect is off
[ 1.963218] sd 31:0:3:0: [sdc] Mode Sense: 7f 00 10 08
[ 1.963373] sd 31:0:3:0: [sdc] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 1.964937] sd 31:0:0:0: [sdd] Attached SCSI disk
[ 1.965012] sda: sda1 sda2 sda3
[ 1.992472] sdb: sdb1 sdb2 sdb3
[ 1.996764] sd 31:0:1:0: [sda] Attached SCSI disk
[ 2.012447] sdc: sdc1 sdc2 sdc3
[ 2.025381] sd 31:0:2:0: [sdb] Attached SCSI disk
[ 2.040419] sd 31:0:3:0: [sdc] Attached SCSI disk
[ 2.042694] mpt3sas version 01.100.01.00 loaded
[ 2.049635] bromolow_synobios: module license 'Synology Inc.' taints kernel.
[ 2.049638] Disabling lock debugging due to kernel taint
[ 2.050149] 2021-9-15 12:49:50 UTC
[ 2.050152] synobios: load, major number 201
[ 2.050154] Brand: Synology
[ 2.050156] Model: DS-3615xs
[ 2.050157] set group disks wakeup number to 4, spinup time deno 7
[ 2.050161] synobios cpu_arch proc entry initialized
[ 2.050162] synobios crypto_hw proc entry initialized
[ 2.050164] synobios syno_platform proc entry initialized
[ 2.050169] synobios open /dev/ttyS1 success
[ 2.052484] synobios: unload
[ 2.056500] md: Autodetecting RAID arrays.
[ 2.080101] md: invalid raid superblock magic on sda3
[ 2.080124] md: sda3 does not have a valid v0.90 superblock, not importing!
[ 2.095163] md: invalid raid superblock magic on sdb3
[ 2.095187] md: sdb3 does not have a valid v0.90 superblock, not importing!
[ 2.111055] md: invalid raid superblock magic on sdc3
[ 2.111079] md: sdc3 does not have a valid v0.90 superblock, not importing!
[ 2.127190] md: invalid raid superblock magic on sdd3
[ 2.127214] md: sdd3 does not have a valid v0.90 superblock, not importing!
[ 2.127220] md: Scanned 12 and added 8 devices.
[ 2.127221] md: autorun ...
[ 2.127222] md: considering sda1 ...
[ 2.127225] md: adding sda1 ...
[ 2.127227] md: sda2 has different UUID to sda1
[ 2.127229] md: adding sdb1 ...
[ 2.127231] md: sdb2 has different UUID to sda1
[ 2.127233] md: adding sdc1 ...
[ 2.127234] md: sdc2 has different UUID to sda1
[ 2.127236] md: adding sdd1 ...
[ 2.127238] md: sdd2 has different UUID to sda1
[ 2.127243] md: created md0
[ 2.127244] md: bind
[ 2.127253] md: bind
[ 2.127257] md: bind
[ 2.127261] md: bind
[ 2.127264] md: running:
[ 2.127420] md/raid1:md0: active with 4 out of 12 mirrors
[ 2.143200] md0: detected capacity change from 0 to 2549940224
[ 2.143320] md: considering sda2 ...
[ 2.143324] md: adding sda2 ...
[ 2.143326] md: adding sdb2 ...
[ 2.143328] md: adding sdc2 ...
[ 2.143329] md: adding sdd2 ...
[ 2.143681] md: created md1
[ 2.143683] md: bind
[ 2.143688] md: bind
[ 2.143692] md: bind
[ 2.143696] md: bind
[ 2.143699] md: running:
[ 2.144771] md/raid1:md1: active with 4 out of 12 mirrors
[ 2.164317] md1: detected capacity change from 0 to 2147418112
[ 2.164382] md: ... autorun DONE.
[ 2.193465] md0: unknown partition table
[ 2.561493] EXT4-fs (md0): barriers disabled
[ 2.568792] EXT4-fs (md0): mounted filesystem with ordered data mode. Opts:
[ 2.834468] usb 1-1: new full-speed USB device number 2 using xhci_hcd
[ 2.845656] Got empty serial number. Generate serial number from product.
[ 3.969545] usb 1-2: new full-speed USB device number 3 using xhci_hcd
[ 3.984291] Got empty serial number. Generate serial number from product.
[ 5.108641] usb 1-3: new full-speed USB device number 4 using xhci_hcd
[ 5.119815] Got empty serial number. Generate serial number from product.
[ 5.120029] usb 1-3: ep 0x81 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[ 5.120226] hub 1-3:1.0: USB hub found
[ 5.120265] hub 1-3:1.0: 7 ports detected
[ 6.243701] usb 1-4: new high-speed USB device number 5 using xhci_hcd
[ 6.254911] Got empty serial number. Generate serial number from product.
[ 6.254917] drivers/usb/core/hub.c (2696) Same device found. Change serial to ffffffd6ffffffa3ffffffebffffffc0
[ 6.255284] hub 1-4:1.0: USB hub found
[ 6.255314] hub 1-4:1.0: 7 ports detected
[ 7.338813] usb 1-3.1: new full-speed USB device number 6 using xhci_hcd
[ 8.185497] EXT4-fs (md0): mounted filesystem with ordered data mode. Opts: barrier=1
[ 9.133200] EXT4-fs (md0): re-mounted. Opts: (null)
[ 21.673408] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 21.673489] sd 31:0:0:0: Attached scsi generic sg1 type 0
[ 21.673565] sd 31:0:1:0: Attached scsi generic sg2 type 0
[ 21.673645] sd 31:0:2:0: Attached scsi generic sg3 type 0
[ 21.673720] sd 31:0:3:0: Attached scsi generic sg4 type 0
[ 22.214302] md1: unknown partition table
[ 22.416365] Adding 2097084k swap on /dev/md1. Priority:-1 extents:1 across:2097084k

image

Edit :
A winmerge between Redpill (left) and Jun's loader (right)
image

@OrpheeGT OrpheeGT changed the title LSI SAS6g MPT2SAS card passtrough : it's not a SATA disk, ignoring ESXi : LSI SAS6g MPT2SAS card passtrough : it's not a SATA disk, ignoring Sep 15, 2021
@OrpheeGT
Copy link
Author

Hello !!

Big news !

https://xpenology.com/forum/topic/45795-redpill-the-new-loader-for-624-discussion/?do=findComment&comment=217912

@pocopico compiled his own mpt2sas.ko driver and I replaced the original one with the one he built.

And disk is available in DSM7 !

@ttg-public
Copy link
Member

Try with https://github.com/RedPill-TTG/redpill-sas-activator now - it essentially auto-activates builtin LSI driver and commits ccc7acb and 0df1ec8 will mask SAS ports as if they were SATA ones.

@ttg-public ttg-public added awaiting-feedback enhancement New feature or request labels Oct 3, 2021
@r0bb10
Copy link

r0bb10 commented Oct 3, 2021

hi, as written here https://xpenology.com/forum/topic/45795-redpill-the-new-loader-for-624-discussion/?do=findComment&comment=218498 and here https://xpenology.com/forum/topic/45795-redpill-the-new-loader-for-624-discussion/?do=findComment&comment=218499 something isnt quite right yet.

the new sas-activator extension works great (on 7.0-41222 and 7.0.1-42218) and it's loaded correctly on boot, and the patch let the disks show up as /dev/sd* and not as /dev/sas*.. problems:

  1. even loading the stock mpt2sas.ko with the new extension the first disk on the hba shows up as /dev/sdb.. on ESXi redpill is loaded on sata0:0, is like it reserves /dev/sda for himself even if it shows up as /dev/synoboot.

  2. the difference between the stock v20.0 mpt2sas.ko and @pocopico v14.1 mpt2sas.ko is that the stock il slower to boot and after every disk detected it sparms in terminal "want_idx 1 index 2. delay and reget".. with v14.1 or even with the v20.0 on 6.2.3 with jun's loader it doesnt do that.

  3. disks bigger than >2tb wont show up in fdisk as usable (no matter if stock v20.0 or compiled v14.1), so partitions on them cant be seen and no uprade possible.. they show up correctly on v20.0 with juns loader on 6.2.3.. tested trying to increase the memory on the vm (that has to be reserver to being able to passthough the lsi) and from 2gb to >4gb (i guess, tested with 6gb) the mpt2sas shows up as 64bit "mpt2sas0: 64 BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (6084520 kB)" instead of 32bit "mpt2sas0: 32 BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (2022888 kB)" but no changes.

  4. if redpill on the VM is set on LSI Logic SAS scsi0:0 instead of sata0:0 it will load fine the kernel giving the ability to install DSM, but it will fail on some %.. fdisk does not show /dev/synoboot and the first HBA disks is loaded as /dev/sda and not as /dev/sdb like point 1.. the problems on DSM seems to be only on fresh install/upgrade, does not seem to be a problem having redpill on scsi0:0 for normal use if DSM is already installed.

will add infos if i find something else.

edit: i found out that with the added patch sata_port_shim the sas-activator extension isnt really needed anymore, just by using "supportsas": "yes" it's enough to make mpt2sas load at boot as it should.. is it possible that sata_port_shim breaks something on the hba card disk load "want_idx 1 index 2. delay and reget"? it seems to me that it does.. still cant figure out why the >2tb disks are not ok.

@OrpheeGT
Copy link
Author

OrpheeGT commented Oct 3, 2021

I won't be able to test >2Tb issue, my 4Tb disks are my production disks. I won't risk it...

@r0bb10
Copy link

r0bb10 commented Oct 3, 2021

I won't be able to test >2Tb issue, my 4Tb disks are my production disks. I won't risk it...

since i'm testing from remote location i actually have the whole production disks on the hba, so swapping the controller around vm is risky i know but i did it multiple times now and in the past and data is not touched my redpill nor dsm, they dont write without confirmation.
if you have shr you could try only one disk, the worste it can happen is tha you have to rebuild but i think it will not happen.. disks dont even powercycling when switching from vm to vm, just rebooted, i guess it's fine but i feel your fears :D
i didnt notice this before because i have a wd 2tb test disk i was playing around with 7.0.1 official and everything was fine with that.

@OrpheeGT
Copy link
Author

OrpheeGT commented Oct 7, 2021

So I played a bit with DiskIdxMap / SataPortMap / SasIdxMap values.

No matter what I try with DiskIdxMap and SasIdxMap, the first controller is ALWAYS SATA0 / redpill loader.
I'm not able to move its position inside DSM, it always start with disk 1.

If I set SataPortMap=1x I'm able to have LSI card first disk at position 2, but then /dev/synoboot disapear.
In this case, not possible to Install DSM from fresh, error at 5x%

If I set SataPortMap=2x (or 3x / 4x) then /dev/synoboot is there with fdisk :

fdisk -l

Disk /dev/synoboot: 128 MiB, 134217728 bytes, 262144 sectors
Disk model: TYPE D 3SE
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf110ee87

Device Boot Start End Sectors Size Id Type
/dev/synoboot1 2048 100351 98304 48M 83 Linux
/dev/synoboot2 100352 253951 153600 75M 83 Linux
/dev/synoboot3 253952 262143 8192 4M 83 Linux

Disk /dev/sdc: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Disk model: SSD 850 EVO 250GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9bcfbffa

Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 4982527 4980480 2.4G fd Linux raid autodetect
/dev/sdc2 4982528 9176831 4194304 2G fd Linux raid autodetect
/dev/sdc3 9437184 488192351 478755168 228.3G fd Linux raid autodetect

I can remove DiskIdxMap and SasIdxMap it makes no difference.

If I remove also SataPortMap, then the LSI card is pushed far away in disk position :

Disk /dev/sdae: 233 GB, 250059350016 bytes, 488397168 sectors
30401 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/sdae1 0,32,33 310,37,47 2048 4982527 4980480 2431M fd Linux raid autodetect
/dev/sdae2 310,37,48 571,58,63 4982528 9176831 4194304 2048M fd Linux raid autodetect
/dev/sdae3 587,111,37 1023,254,63 9437184 488192351 478755168 228G fd Linux raid autodetect

and DSM does not detect disk (fresh install shown)

This behavior only happens with HBA passthrough card.

If I set :

  • Virtual SATA0 > bootloader IMG at SATA0:1
  • Virtual SATA1 > HDD 16Gb virtualdisk SATA1:0
  • DiskIdxMap=1000
  • SataPortMap=4

It works and Virtual 16Gb HDD is shown as disc 1.

Edit :
Ok I catched why SataPortMap=1 did not work

Actually I'm dumb...

When you create a new VM

By default the first disk is set as SCSI disk

When you switch it to SATA, it automaticalty set it to SATA0:1
image

and of course if you set SataPortMap=1 with SATA0:1 value, disk is not detected...

Setting it back to SATA0:0 make it works again.

But is still does not fix the disk position. DiskIdxMap is ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-feedback enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants