Exteral M.2 Trouble

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=14
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘applied’

  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN

  • Kernel version | bookworm 0

  • Architecture | arm64

  • SBC model | RPi 4 Model B (aarch64)
    or (EG: RPi3)

  • Power supply used | official Pi 5.1v = 3a and every other one I could try lol

  • SD card used | Samsung usb drive

Additional Information (if applicable)

  • Software title | dietpi-drive_manager
  • Can this issue be replicated on a fresh installation of DietPi? Yes

Steps to reproduce

1.plug in NVME in and try to partition through the dietpi_drive_manager

Expected behaviour

-the drive should format and mount

Actual behaviour

it pops up as /tmp/sda and when I click format it errors. here is the logs

dd: error writing '/dev/sda': No space left on device 1+0 records in 0+0 records out 0 bytes copied, 0.000277371 s, 0.0 kB/s

Extra details

I saw somewhere else that someone had the same issue and it was a pd issue so I checked how much power the drive was pulling and it was only 1W when transferring files on windows.
I have tried many cables and have updated the firmware of the exteral enclosure. the m.2 drive im using in the enclosure is a teamgroup A440.
here are some commands I ran

‘journalctl -k | grep -i scsi
Jul 17 23:17:01 DietPi-Travel-4G kernel: SCSI subsystem initialized
Jul 17 23:17:01 DietPi-Travel-4G kernel: Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
Jul 17 23:17:01 DietPi-Travel-4G kernel: Loading iSCSI transport class v2.0-870.
Jul 18 01:20:47 DietPi-Travel-4G kernel: scsi host0: usb-storage 1-1.1:1.0
Jul 18 01:20:48 DietPi-Travel-4G kernel: scsi 0:0:0:0: Direct-Access Sabrent 1.00 PQ: 0 ANSI: 6
Jul 18 01:20:48 DietPi-Travel-4G kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
Jul 18 01:20:48 DietPi-Travel-4G kernel: sd 0:0:0:0: [sda] Attached SCSI disk
Jul 18 01:48:53 DietPi-Travel-4G kernel: scsi host0: usb-storage 1-1.1:1.0
Jul 18 01:48:54 DietPi-Travel-4G kernel: scsi 0:0:0:0: Direct-Access Sabrent 1.00 PQ: 0 ANSI: 6
Jul 18 01:48:54 DietPi-Travel-4G kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
Jul 18 01:48:54 DietPi-Travel-4G kernel: sd 0:0:0:0: [sda] Attached SCSI disk’

This is what dmesg -w showed me

‘[ 1670.719537] usb 1-1.1: USB disconnect, device number 4
[ 1732.680674] usb 1-1.1: new high-speed USB device number 5 using xhci_hcd
[ 1732.775724] usb 1-1.1: New USB device found, idVendor=0bda, idProduct=9210, bcdDevice=20.01
[ 1732.775741] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1732.775747] usb 1-1.1: Product: Sabrent
[ 1732.775753] usb 1-1.1: Manufacturer: Sabrent
[ 1732.775758] usb 1-1.1: SerialNumber: 631345678941
[ 1732.779918] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[ 1732.780422] scsi host0: usb-storage 1-1.1:1.0
[ 1733.815200] scsi 0:0:0:0: Direct-Access Sabrent 1.00 PQ: 0 ANSI: 6
[ 1733.815763] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1733.825765] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=0x00 driverbyte=DRIVER_OK
[ 1733.825793] sd 0:0:0:0: [sda] ASC=0x20 ASCQ=0x0
[ 1733.827646] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)
[ 1733.827653] sd 0:0:0:0: [sda] 0-byte physical blocks
[ 1733.829554] sd 0:0:0:0: [sda] Test WP failed, assume Write Enabled
[ 1733.831446] sd 0:0:0:0: [sda] Asking for cache data failed
[ 1733.831464] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1733.832189] sd 0:0:0:0: [sda] Attached SCSI disk’

Thanks for reading if you have any suggestions let me know! Thanks!!!

Hello,
the drive is recognized with a size of 0 byte. So either the NVME drive is broken, the adapter is incompatible or you do not use the correct firmware / driver.

Is the drive working correctly on other (Linux) systems?

Can you try the following:

apt install smartmontools
smartctl -a /dev/sda

and

fdisk /dev/sda

Also it’s a known issue, that realtek chipsets have more troubles on RPi than JMicron and/or e.g. ASMedia, maybe it’s this kind of issue.

1 Like

thanks for such a fast reply! here is what that command gave me. “/dev/sda: Unknown USB bridge [0x090c:0x1000 (0x1100)]” also i have not tried on any other Linux systems I tried last night and my OptiPlex that i used to run linux on died so ill have to install on my main system when I get the time .

I just checked my controller for the NVME and i think it is a Phison PS5018-E18 so i bet my issue is the enclosure

also here is the config for the external drive don’t know if any of these settings stand out to you.
;Configure Start
;=================FW Configure=================
U2PHY = 02 f4 9b e0 e1
U3PHY = 02 d4 09 00 d5 00 80

VID = 0xbda
PID = 0x9210

MANUFACTURE = “Sabrent”
SCSI_VENDOR = “Sabrent”
PRODUCT = “Sabrent”
SCSI_PRODUCT = " "

;“0123” for Dec, “0x0123” for Hex, max 12 digits
SERIAL = “631345678941”

DISK_HOTPLUG = 0x0
LED = 0x1
PINMUX1 = 0x0
PINMUX2 = 0x0
U2_MAXPWR = 0xfa
U3_MAXPWR = 0x70
ASPMDIS = 0x0

;10 minutes of idle time will disable disk power
DISK_IPS_THRES = 0

;EN_UPS = 0x0
;PD = 0x0

;CUSTOMIZED_LED is 15 bytes
CUSTOMIZED_LED = 0a 01
;SUSPEND_LED_OFF = 0x0
;FAN = 0x0

DIS_SHOW_EMPTY_DISK = 0x1
;FORCE_SATA_NORMAL_DMA = 0x0
UART_DBG_PIN = 5
;FINGER_PRINT_EN = n

;=================Tool Configure=================
;DISCONN_FORCE_USB2 = n
FORMAT_DISK = y
;INC_SERIAL = y

;PARTITION: GPT, MBR
PARTITION = “GPT”
;FORMAT: NTFS, exFAT
FORMAT = “NTFS”
;LABEL max allowed - characters
LABEL = “My USB”
"

just tried it on Linux mint and it mounted no problem

Same hardware used to run Linux?

nope that was on my main pc that is x86

Well, since it’s different hardware (x86 vs. arm), the kernel, firmware, and drivers are different. So you can’t really compare them like that. Best would be to check with RPI OS as you are running a RPI SBC.

1 Like

Is there a list of recommended enclosures? Or a way to find out if an enclosure is going to cause an issue before buying it?

I was thinking of buying an enclosure for an m2 ssd I have and use it as a boot disk on a rpi4. With a potential switch to rpi5 and pcie at some point.