You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Huaicheng Li [email protected]
# Run FEMU as Zoned-Namespace (ZNS) SSDs
# Image directory
IMGDIR=/home/qiaojiyang/images
# Virtual machine disk image
OSIMGF=$IMGDIR/femu.qcow2
if [[ ! -e "$OSIMGF" ]]; then
echo ""
echo "VM disk image couldn't be found ..."
echo "Please prepare a usable VM image and place it as $OSIMGF"
echo "Once VM disk image is ready, please rerun this script again"
echo ""
exit
fi
SSD_SIZE_MB=4096
NUM_CHANNELS=8
NUM_CHIPS_PER_CHANNEL=4
NUM_PLANES_PER_CHIP=2
NUM_BLOCKS_PER_CHIP=32
# SLC:1 MLC:2 TLC:3 QLC:4
# MLC is not allowed
FLASH_TYPE=4
=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: FAILED!
available spare has fallen below threshold
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x01
Temperature: 50 Celsius
Available Spare: 0%
Available Spare Threshold: 20%
Percentage Used: 0%
Data Units Read: 0
Data Units Written: 0
Host Read Commands: 0
Host Write Commands: 0
Controller Busy Time: 0
Power Cycles: 0
Power On Hours: 0
Unsafe Shutdowns: 0
Media and Data Integrity Errors: 0
Error Information Log Entries: 0
Error Information (NVMe Log 0x01, 4 of 4 entries)
No Errors Logged
The results were the same whether I used the official image or made my own
The text was updated successfully, but these errors were encountered:
The run_zns.sh is:
#!/bin/bash
# Huaicheng Li [email protected]
# Run FEMU as Zoned-Namespace (ZNS) SSDs
# Image directory
IMGDIR=/home/qiaojiyang/images
# Virtual machine disk image
OSIMGF=$IMGDIR/femu.qcow2
if [[ ! -e "$OSIMGF" ]]; then
echo ""
echo "VM disk image couldn't be found ..."
echo "Please prepare a usable VM image and place it as $OSIMGF"
echo "Once VM disk image is ready, please rerun this script again"
echo ""
exit
fi
SSD_SIZE_MB=4096
NUM_CHANNELS=8
NUM_CHIPS_PER_CHANNEL=4
NUM_PLANES_PER_CHIP=2
NUM_BLOCKS_PER_CHIP=32
# SLC:1 MLC:2 TLC:3 QLC:4
# MLC is not allowed
FLASH_TYPE=4
FEMU_OPTIONS="-device femu"
FEMU_OPTIONS=${FEMU_OPTIONS}",devsz_mb=${SSD_SIZE_MB}"
FEMU_OPTIONS=${FEMU_OPTIONS}",namespaces=1"
FEMU_OPTIONS=${FEMU_OPTIONS}",zns_num_ch=${NUM_CHANNELS}"
FEMU_OPTIONS=${FEMU_OPTIONS}",zns_num_lun=${NUM_CHIPS_PER_CHANNEL}"
FEMU_OPTIONS=${FEMU_OPTIONS}",zns_num_plane=${NUM_PLANES_PER_CHIP}"
FEMU_OPTIONS=${FEMU_OPTIONS}",zns_num_blk=${NUM_BLOCKS_PER_CHIP}"
FEMU_OPTIONS=${FEMU_OPTIONS}",zns_flash_type=${FLASH_TYPE}"
FEMU_OPTIONS=${FEMU_OPTIONS}",femu_mode=3"
sudo ./qemu-system-x86_64
-name "FEMU-ZNSSD-VM"
-enable-kvm
-cpu host
-smp 4
-m 4G
-device virtio-scsi-pci,id=scsi0
-device scsi-hd,drive=hd0
-drive file=$OSIMGF,if=none,aio=native,cache=none,format=qcow2,id=hd0
${FEMU_OPTIONS}
-net user,hostfwd=tcp::8081-:22
-net nic,model=virtio
-nographic
-qmp unix:./qmp-sock,server,nowait 2>&1 | tee log
when I start VM, use:
sudo nvme list
I get:
Node SN Model Namespace Usage Format FW Rev
/dev/nvme0n1 vZNSSD0 FEMU ZMS-SSD Controller [by Misao] 1 4.29 GB / 4.29 GB 512 B + 0 B 1.0
When I use smartctl -a /dev/nvme0n1, I get:
=== START OF INFORMATION SECTION ===
Model Number: FEMU ZMS-SSD Controller [by Misao]
Serial Number: vZNSSD0
Firmware Version: 1.0
PCI Vendor ID: 0x1d1d
PCI Vendor Subsystem ID: 0x1af4
IEEE OUI Identifier: 0xb30200
Controller ID: 0
NVMe Version: 1.3
Number of Namespaces: 1
Namespace 1 Size/Capacity: 4,294,967,296 [4.29 GB]
Namespace 1 Formatted LBA Size: 512
Local Time is: Fri Nov 8 08:52:42 2024 UTC
Firmware Updates (0x0f): 7 Slots, Slot 1 R/O
Optional Admin Commands (0x0102): Format Drbl_Bf_Cfg
Optional NVM Commands (0x0004): DS_Mngmt
Log Page Attributes (0x07): S/H_per_NS Cmd_Eff_Lg Ext_Get_Lg
Maximum Data Transfer Size: 1024 Pages
Namespace 1 Features (0x14): Dea/Unw_Error NP_Fields
Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 25.00W - - 0 0 0 0 16 4
Supported LBA Sizes (NSID 0x1)
Id Fmt Data Metadt Rel_Perf
0 + 512 0 0
1 - 1024 0 0
2 - 2048 0 0
3 - 4096 0 0
4 - 8192 0 0
=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: FAILED!
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x01
Temperature: 50 Celsius
Available Spare: 0%
Available Spare Threshold: 20%
Percentage Used: 0%
Data Units Read: 0
Data Units Written: 0
Host Read Commands: 0
Host Write Commands: 0
Controller Busy Time: 0
Power Cycles: 0
Power On Hours: 0
Unsafe Shutdowns: 0
Media and Data Integrity Errors: 0
Error Information Log Entries: 0
Error Information (NVMe Log 0x01, 4 of 4 entries)
No Errors Logged
The results were the same whether I used the official image or made my own
The text was updated successfully, but these errors were encountered: