vdsm / virtual-dsm

Virtual DSM in a Docker container.
MIT License
2.68k stars 360 forks source link

[Bug]: Disk passthrough not working properly #710

Closed BeaverUI closed 6 months ago

BeaverUI commented 6 months ago

Is there an existing issue for this?

Machine specifications

Xeon v3

Operating system

Ubuntu 22.04

Docker version

26.0.2 (API: 1.45)

Description

Docker runs on Ubuntu Server, which is running virtualized through KVM on an Intel Xeon-based host. I configure the docker by following the instructions, and vDSM works fine. However, when passing through a full disk, vDSM just reports the same (main) disk is mounted twice, instead of mounting the desired disk.

Configuration used for disk passthrough: DISK2: "/dev/vdb" "/dev/vdb":"/dev/vdb"

lsblk on the host reports /dev/vsb is 40G, and it does seem to be automatically formatted to contain a Synology-style partition table: vdb 252:16 0 40G 0 disk ├─vdb1 252:17 0 2.4G 0 part ├─vdb2 252:18 0 2G 0 part ├─vdb3 252:19 0 1K 0 part └─vdb5 252:21 0 35.4G 0 part └─md2 9:2 0 35.4G 0 raid1 └─vg1000-lv 253:0 0 35.4G 0 lvm

However, in vDSM I only see the same 16G "main" disk twice: Screenshot 2024-04-27 103458

If I remove the env DISK2, the second "Volume 1" item disappears in vDSM. So, it seems the main disk is mounted twice, instead of the main disk and the passthrough-disk.

Docker compose

See above.

Docker log

` Starting Load Kernel Modules in Kernel Project... [ OK ] Re[ 22.819504] usbcore: registered new interface driver usblp ached target Loc[ 22.832911] systemd[1]: Reached target Local File Systems. al File Systems.[ 22.846394] systemd[1]: Starting Local File Systems. [ 22.866338] usbcore: registered new interface driver usbhid [ 22.875771] usbhid: USB HID core driver [ 22.883195] systemd[1]: Starting Set boot sequence config for temporary use... Starting Set boot sequence confi[ 22.903790] systemd[1]: Starting D-Bus System Message Bus... g for temporary use... Startin[ 22.925376] systemd[1]: Starting udev Coldplug all Devices... g D-Bus System Message Bus... Starting udev Coldplug all Devices... [ 22.954172] systemd[1]: Starting D-Bus Session Message Bus... Starting D-Bus Session Message Bus... [ 22.979561] systemd[1]: Starting Mount usb fs... [ 22.991871] synobios ioctl TCGETS /dev/ttyS1 failed [ 23.005098] synobios unable to set termios of /dev/ttyS1 [ 23.011369] 2024-4-27 8:39:30 UTC [ 23.011371] synobios: load, major number 201 [ 23.011375] Brand: Synology [ 23.011594] Model: VirtualDSM [ 23.011596] set group disks wakeup number to 4, spinup time deno 7 [ 23.011599] synobios cpu_arch proc entry initialized [ 23.011600] synobios crypto_hw proc entry initialized [ 23.011601] synobios syno_platform proc entry initialized Starting Mount usb fs... [ 23.097170] systemd[1]: Starting Mount efivarfs... Starting Mount efivarfs... [ 23.116347] systemd[1]: Mounted Configuration File System. [ OK ] Mounted Configuration File Sys[ 23.134177] systemd[1]: Started Journal Service. tem. [ OK ] Started Journal Service. [ OK ] Started Load Fan Modules in Kernel Project. [ OK ] Started Apply default and user cust...ed sysctl.conf kernel variable.. [FAILED] Failed to start Adjust NIC sequence. See "systemctl status SynoInitEth.service" for details. [ OK ] Started Set boot sequence config for temporary use. [ OK ] Started Mount efivarfs. Starting Apply Kernel Variables... Starting System Logger Daemon... Starting Flush Journal to Persistent Storage... [ OK ] Started Apply Kernel Variables. Starting Adjust kernel parameters -...or, vm.watermark_boost_factor... Starting Apply kernel variable vm.kswapd_threads... Starting Apply kernel variable kernel-shmmni at least 16384... Starting Apply kernel variable kernel.sem at least 1024... [ OK ] Started D-Bus Session Message Bus. [ OK ] Started D-Bus System Message Bus. [ OK ] Started Apply kernel variable vm.kswapd_th[ 23.380932] systemd-journald[6164]: Received request to flush runtime journal from PID 1 reads. [ OK ] Started Flush Journal to Persistent Storage. Starting Create Volatile Files and Directories... Starting Synology Network Daemon... [ OK ] Started udev Coldplug all Devices. [ OK ] Started Apply kernel variable kernel.sem at least 1024. [ OK ] Started Apply kernel variable kernel-shmmni at least 16384. [ OK ] Started Create Volatile Files and Directories. [ 23.506630] AVX2 version of gcm_enc/dec engaged. [ 23.518830] AES CTR mode by8 optimization enabled [ OK ] Started Synology Network Daemon. Starting Wait for synonetd ready... Starting synodsmnotify... [ OK ] Reached target Create SDK locks directory. Starting Check Synology user info consistency... Starting Synology Database Update... [ 23.637412] usbcore: registered new interface driver usb-storage Starting Check /etc/synoinfo.conf... Starting Check Synology group info consistency... [ OK ] Started Load Kernel Modules in Kernel Project. [ OK ] Started Adjust kernel parameters - ...ctor, vm.watermark_boost_factor. [FAILED] Failed to start Mount usb fs. See "systemctl status syno-mount-usbfs.service" for details. [ OK ] Started Wait for synonetd ready. [ OK ] Started synodsmnotify. [ OK ] Started Check Synology user info consistency. [ OK ] Started Synology Database Update. [ OK ] Started Check /etc/synoinfo.conf. [ OK ] Started Check Synology group info consistency. [ OK ] Reached target Synology local user and group ready. Starting Synology Task Scheduler Init... [ OK ] Reached target User and Group Name Lookups. Starting Synology Network Event Daemon... Starting Software Init Led for support led v2 models... Starting DSM Release Rolling Group ID... [ OK ] Started Software Init Led for support led v2 models. [ OK ] Started Synology Network Event Daemon. [ OK ] Started DSM Release Rolling Group ID. [ OK ] Started Synology Task Scheduler Init. [ OK ] Started System Logger Daemon. Starting Synology Log bootup start... Starting synodrnode... [DEPEND] Dependency failed for rebuild local user and group db. [ OK ] Reached target Synology root filesystem (rw) ready. Starting Clean UPS config... Starting Set Eunit Sequence... Starting DSM Boot Health Check... Starting Load AppArmor profiles... Starting Umount initrd... Starting syno-cgi-keygen.service... Starting Set arp ignore... Starting DSM Installation ID... Starting Synology check locale... [ OK ] Reached target Network (Pre). Starting Synology Default TLS Profile... [ OK ] Reached target Synology Task Schedu...brary functions and tasks ready. [ OK ] Started Synology Log bootup start. [ OK ] Started synodrnode. [ OK ] Started Clean UPS config. [ OK ] Started Set Eunit Sequence. [ OK ] Started DSM Boot Health Check. [ OK ] Started Umount initrd. [ OK ] Started Set arp ignore. [ OK ] Started DSM Installation ID. [ OK ] Started Synology check locale. [ OK ] Started Synology Default TLS Profile. Starting rc.network... Starting udev Kernel Device Manager... [ OK ] Started Load AppArmor profiles. [ OK ] Started syno-cgi-keygen.service. [ OK ] Started udev Kernel Device Manager. [ OK ] Reached target System Initialization. [ OK ] Started Synology token manager. Starting Synology token manager... [ OK ] Started Synology task manager. Starting Synology task manager... Starting bootup upgrade sha package... [ OK ] Started Serial Getty on ttyS0. Starting Serial Getty on ttyS0... [ OK ] Reached target Login Prompts. [ OK ] Started bootup upgrade sha package. [ OK ] Found device /dev/synoboot2. [ OK ] Reached target Synology synoboot2 done. [ OK ] Reached target Basic System. Starting always preprocess jobs before any package is started... Starting Synology Schedule Daemon... Starting Samba Environment Setup Unit... Starting System Profile Tuning... Starting Hibernation debug check... Starting Login Service... [ OK ] Started Synology log accounting service. Starting Synology log accounting service... Starting synocontentextract gen INFO file for synoindex... Starting synoconfd daemon... Starting Control RC power... Starting Synology firmware DLMC... Starting WD idle3 timer... [ OK ] Started synobackup daemon. Starting synobackup daemon... Starting Synology guest command handle daemon... Starting synology volume encryption get machine key service... Starting Log Rotate Daemon... Starting Synology filesytem check on bootup... Starting Prepare notification cache data... Starting Service for irq balance... Starting Synology guest service daemon... Starting Synology log notification service... [ OK ] Started Synology Schedule Daemon. [ OK ] Started System Profile Tuning. [ OK ] Started Hibernation debug check. [ OK ] Started synocontentextract gen INFO file for synoindex. [ OK ] Started synoconfd daemon. [ OK ] Started Synology firmware DLMC. [ OK ] Started WD idle3 timer. [ OK ] Started synology volume encryption get machine key service. [ OK ] Started Log Rotate Daemon. [ OK ] Started Synology filesytem check on bootup. [ OK ] Started Service for irq balance. [ OK ] Started Synology guest service daemon. [ 26.011718] exdisplay_handler not implemented [ OK ] Started Control RC power. [ OK ] Started Login Service. Starting Synology guest communication daemon... Starting Synology space service... Starting synoindex check if there a...ny synoindex-related packages... [ OK ] Started Synology guest command handle daemon. [ OK ] Started Synology guest communication daemon. [ OK ] Stopped Synology Task Scheduler Vmtouch. [ OK ] Started Synology Task Scheduler Vmtouch. Starting Synology Task Scheduler Vmtouch... [ OK ] Started synoindex check if there are any synoindex-related packages. Starting synoindex mediad... [ OK ] Started Samba Environment Setup Unit. [ OK ] Started always preprocess jobs before any package is started. [ OK ] Reached target Hook on root ready. Starting SecureSignIn's service unit... Starting Python2's service unit... Starting QuickConnect's service unit... Starting SMBService's service unit... [ OK ] Started synoindex mediad. [ OK ] Started Prepare notification cache data. [ OK ] Started Synology space service. [ OK ] Started Python2's service unit. Starting Synology virtual space service... [ OK ] Started Synology virtual space service. Starting Synology virtual space service phase2... [ OK ] Started Synology virtual space service phase2. [ OK ] Started Synology log notification service. [ OK ] Reached target Synology storage pool. Starting Synology space table update for Storage Manager... Starting StorageManager's service unit... Starting Synology filesystem check service... Starting Check Synology HotSpare Config... Starting Synology Building Tasks Restore for Storage Manager... Stopping Synology Task Scheduler Vmtouch... [ OK ] Stopped Synology Task Scheduler Vmtouch. [ OK ] Started Check Synology HotSpare Config. [ OK ] Started Synology Task Scheduler Vmtouch. Starting Synology Task Scheduler Vmtouch... [ OK ] Started Synology filesystem check service. Starting Synology volume service... [ OK ] Started SMBService's service unit. [ OK ] Created slice SecureSignin.slice. Starting Login Invoke Daemon... [ 27.582049] raid6: sse2x1 gen() 9835 MB/s [ OK ] Started Login Invoke Daemon. [ 27.611037] raid6: sse2x1 xor() 5394 MB/s [ 27.639034] raid6: sse2x2 gen() 12648 MB/s [ 27.666046] raid6: sse2x2 xor() 7666 MB/s [ 27.694030] raid6: sse2x4 gen() 14445 MB/s [ OK ] Started SecureSignIn's service unit.[ 27.724790] raid6: sse2x4 xor() 8351 MB/s [ 27.751034] raid6: avx2x1 gen() 18781 MB/s [ 27.777813] 8021q: 802.1Q VLAN Support v1.8 [ 27.786807] raid6: avx2x1 xor() 13798 MB/s [ 27.797497] 8021q: adding VLAN 0 to HW filter on device eth0 [ 27.823270] raid6: avx2x2 gen() 13500 MB/s [ 27.867328] raid6: avx2x2 xor() 7318 MB/s [ 27.907251] raid6: avx2x4 gen() 20296 MB/s [ 27.927030] raid6: avx2x4 xor() 17115 MB/s [ 27.930892] raid6: using algorithm avx2x4 gen() 20296 MB/s [ 27.935923] raid6: .... xor() 17115 MB/s, rmw enabled [ 27.941106] raid6: using avx2x2 recovery algorithm [ 27.947951] xor: automatically using best checksumming function: [ 27.962034] avx : 32820.000 MB/sec [ 28.019264] Btrfs loaded, crc32c=crc32c-intel [ OK ] Started StorageManager's service unit. [ OK ] Started Synology Building Tasks Restore for Storage Manager. [ OK ] Started Synology space table update for Storage Manager. Starting DHCP client init... [ OK ] Created slice system-dhclient.slice. [ OK ] Started DHCP client init. Starting eth0 DHCP Client... [ OK ] Started eth0 DHCP Client. Stopping Synology Task Scheduler Vmtouch... [ OK ] Stopped Synology Task Scheduler Vmtouch. [ OK ] Started Synology Task Scheduler Vmtouch. Starting Synology Task Scheduler Vmtouch... [ OK ] Started rc.network. [ OK ] Reached target Network. Starting PPPoE... Starting OpenBSD Secure Shell server... Starting Synology SCGI SocketIO... Starting findhost daemon... Starting Redis data structure server for webapi... Starting Check if network is ready... [ OK ] Started PPPoE. [ 28.617879] BTRFS: device label 2024.04.11-14:25:45 v69057 devid 1 transid 42961 /dev/sdb1 [ OK ] Started findhost daemon. [ 28.640544] BTRFS info (device sdb1): enabling auto syno reclaim space [ 28.650146] BTRFS info (device sdb1): use ssd allocation scheme [ 28.665591] BTRFS info (device sdb1): turning on discard [ 28.674304] BTRFS info (device sdb1): using free space tree [ 28.686546] BTRFS info (device sdb1): using free block group cache tree [ 28.696729] BTRFS info (device sdb1): has skinny extents [ OK ] Started Redis data structure server for webapi. [ OK ] Started Synology SCGI. Starting Synology SCGI... [ 28.837075] BTRFS info (device sdb1): BTRFS: root of syno feature tree is null [ OK ] Started OpenBSD Secure Shell server. [ OK ] Started Check if network is ready. [ OK ] Reached target Network is Online. Starting Traffic Control... Starting Entry for WS-Transfer and WS-Discovery Server... Starting VPN Client... Starting broadcast synorelayd boot state... Starting Avahi daemon... Starting NetBIOS name server... Starting Run sysnotify migration sc... string and network are ready... Starting register ds region by ip... Starting NTP client/server... Starting Issue VDSM ready for intialization before boot-done.... Starting Set Policy Route... [ OK ] Started QuickConnect's service unit. Starting SupportService's service unit... [ OK ] Started VPN Client. [ OK ] Started broadcast synorelayd boot state. [ OK ] Started Entry for WS-Transfer and WS-Discovery Server. Stopping Synology Task Scheduler Vmtouch... [ OK ] Stopped Synology Task Scheduler Vmtouch. [ OK ] Started Synology Task Scheduler Vmtouch. Starting Synology Task Scheduler Vmtouch... [ OK ] Started NTP client/server. [ OK ] Started Synology volume service. [ OK ] Started Run sysnotify migration scr...il string and network are ready. [ OK ] Started Issue VDSM ready for intialization before boot-done.. [ OK ] Started Traffic Control. Starting Synology volume mount post hook... [ OK ] Started Set Policy Route. [ OK ] Started Avahi daemon. [ OK ] Started NetBIOS name server. [ OK ] Started WS-Discovery Server. Starting WS-Discovery Server... [ OK ] Stopped Support Service Remote Action Client. [ OK ] Started Support Service Remote Action Client. Starting Support Service Remote Action Client... [ OK ] Started Support Service Online Updater. Starting Support Service Online Updater... [ OK ] Started SupportService's service unit.

NAS login: [ 31.255317] Synotify use 16384 event queue size [ 31.307121] Synotify use 16384 event queue size [ 31.351362] capability: warning: `nginx' uses 32-bit capabilities (legacy support in use) [ 33.655314] iSCSI:target_core_rodsp_server.c:1025:rodsp_server_init RODSP server started, login_key(549fab2b50a8). [ 33.680242] syno_extent_pool: module license 'Proprietary' taints kernel. [ 33.687043] Disabling lock debugging due to kernel taint [ 33.706446] iSCSI:extent_pool.c:766:ep_init syno_extent_pool successfully initialized [ 33.744273] iSCSI:target_core_device.c:612:se_dev_align_max_sectors Rounding down aligned max_sectors from 4294967295 to 4294967288 [ 33.778371] iSCSI:target_core_configfs.c:5763:target_init_dbroot db_root: cannot open: /etc/target [ 33.803563] iSCSI:target_core_lunbackup.c:366:init_io_buffer_head 2048 buffers allocated, total 8388608 bytes successfully [ 33.852721] iSCSI:target_core_file.c:152:fd_attach_hba RODSP plugin for fileio is enabled. [ 33.860249] iSCSI:target_core_file.c:159:fd_attach_hba ODX Token Manager is enabled. [ 33.868333] iSCSI:target_core_multi_file.c:91:fd_attach_hba RODSP plugin for multifile is enabled. [ 33.876540] iSCSI:target_core_ep.c:795:ep_attach_hba RODSP plugin for epio is enabled. [ 33.883800] iSCSI:target_core_ep.c:802:ep_attach_hba ODX Token Manager is enabled. [ 33.983161] workqueue: max_active 1024 requested for vhost_scsi is out of range, clamping between 1 and 512 [ 35.132101] findhostd uses obsolete (PF_INET,SOCK_PACKET) ❯ ----------------------------------------------------------- ❯ You can now login to DSM at http://192.168.1.15:5000 ❯ -----------------------------------------------------------

Screenshots (optional)

No response

kroese commented 6 months ago

Can you show the full compose file? And start the container with DEBUG: "Y" and post the qemu parameters

kroese commented 6 months ago

Closing because of no response.