Re: bhyve NVMe 1.4 support

From: Mario Marietto <marietto2008_at_gmail.com>
Date: Sun, 20 Mar 2022 17:13:36 UTC
How can I mount the whole disk ?

like this ? (on freebsd) :

bhyve -S -c sockets=2,cores=2,threads=2 -m 8G -w -H -A \
-s 0,hostbridge \
-s 1,virtio-blk,/mnt/$vmdisk'p2'/bhyve/os/Linux/impish-cuda-11-5-nvidia-495.img
\
-s 2,nvme,/dev/nvd0 \
-s 3,passthru,5/0/0 \
-s 4,passthru,1/0/0 \
-s 8,virtio-net,tap0 \
-s 9,virtio-9p,sharename=/ \
-s 29,fbuf,tcp=0.0.0.0:5900,w=1440,h=900 \
-s 30,xhci,tablet \
-s 31,lpc \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
vm0 < /dev/null & sleep 2 && vncviewer 0:0

On Linux :

mario@marietto-BHYVE:/home/marietto# mount -t auto /dev/nvme0n1 /mnt/nvme0n1

mount: /mnt/nvme0n1: wrong fs type, bad option, bad superblock on
/dev/nvme0n1, missing codepage or helper program, or other error.


does not work. I don't see which partitions there are inside the disk,I'm
not able to understand which kind of file system should I mount.

Il giorno dom 20 mar 2022 alle ore 16:12 Mario Marietto <
marietto2008@gmail.com> ha scritto:

> ----> Help me understand what "not recognized" means. The device nvme0n1 :
>
> I don't see the partitions that are stored inside the disk nvme. And I'm
> not able to mount the NTFS partition that's mapped as nvd0p2 under FreeBSD.
>
> For example :
>
> bhyve -S -c sockets=2,cores=2,threads=2 -m 8G -w -H -A \
> -s 0,hostbridge \
> -s 1,virtio-blk,/mnt/$vmdisk'p2'/bhyve/os/Linux/impish-cuda-11-5-nvidia-495.img \
> -s 2,nvme,/dev/nvd0p2 \
> -s 3,passthru,5/0/0 \
> -s 4,passthru,1/0/0 \
> -s 8,virtio-net,tap0 \
> -s 9,virtio-9p,sharename=/ \
> -s 29,fbuf,tcp=0.0.0.0:5900,w=1440,h=900 \
> -s 30,xhci,tablet \
> -s 31,lpc \
> -l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
> vm0 < /dev/null & sleep 2 && vncviewer 0:0
>
> root@marietto-BHYVE:/home/marietto# ntfs-3g /dev/nvme0n1 /mnt/nvme
>
> ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0
>  usa_count: 0: Argomento not valid
> Record 0 has no FILE magic (0x0)
> Failed to load $MFT: Errore di input/output
> Failed to mount '/dev/nvme0n1': Errore di input/output
> NTFS is either inconsistent, or there is a hardware fault, or it's a
> SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
> then reboot into Windows twice. The usage of the /f parameter is very
> important! If the device is a SoftRAID/FakeRAID then first activate
> it and mount a different device under the /dev/mapper/ directory, (e.g.
> /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
> for more details.
>
> Il giorno dom 20 mar 2022 alle ore 15:30 Chuck Tuffli <chuck@tuffli.net>
> ha scritto:
>
>> On Sun, Mar 20, 2022 at 3:44 AM Mario Marietto <marietto2008@gmail.com>
>> wrote:
>> ...
>> > on the Ubuntu 21.10 guest os :
>> >
>> > mario@marietto-BHYVE:/home/marietto# fdisk -l
>> >
>> > Disk /dev/nvme0n1: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
>> > Disk model: bhyve-NVMe
>> > Units: sectors of 1 * 512 = 512 bytes
>> > Sector size (logical/physical): 512 bytes / 512 bytes
>> > I/O size (minimum/optimal): 512 bytes / 512 bytes
>> >
>> >
>> > The nvme disk is not recognized.
>>
>> Help me understand what "not recognized" means. The device nvme0n1
>> existing in the guest means that the Linux PCI driver found the
>> emulated device and the Linux NVMe driver claimed it. The "n1" at the
>> end of the device name implies the Linux NVMe driver successfully sent
>> a number of Admin commands to the emulated device and discovered the
>> Namespace. And the capacity looks correct.
>>
>> --chuck
>>
>
>
> --
> Mario.
>


-- 
Mario.