U.2 drive, superblocks, etc

After Wendell tipped us all off about the used enterprise U.2 drives entering the market recently, I decided to try my hand with one of the 3.7TB Huawei Dorado drives. I’ve connected it to the system with a PCIe adapter but I’m having a lot of trouble getting anything onto it. It looks like the previous owner /dev/zero 'd the whole thing or it’s mostly dead, but I can’t work out which. I thought I’d make a thread to chronicle my struggles since I can’t find much about this kind of stuff on-line. Any help from someone smarter or more experienced than I am would also be appreciated. And so, what I’ve tried so far:

The device shows up with lsblk, but not fdisk -l. All superblocks appear to be missing. I’m not entirely sure what a superblock is.

mkfs /dev/nvme0n1 failed to create a filesystem, I’m now thinking there are some bad blocks on the disk.

I’m running badblocks /dev/nvme0n1 right now, I’ll report back with results when it’s finished.

1 Like

(You can quit without writing), try cfdisk /dev/NVMe

1 Like

cfdisk /dev/nvme0
cannot open /dev/nvme0: Illegal seek

cfdisk /dev/nvme0n1
cannot open /dev/nvme0n1: Input/Output error

Looks like there’s no partition table :smile:

1 Like

Should be the drive, not the partition.
I presume you were root?

1 Like

There’s nothing in /dev called nvme, there’s a block device called nvme0n1 and a character device called nvme0. I’m running the commands as root.

Okay, well, I guess I wasn’t much help :slight_smile: I guess if badblocks is working, then that’s something?
Maybe see if gparted gives a popup with advice, if it sees it? I’ve always found it to be pretty verbose for a gui app

1 Like

I’m not sure whether badblocks is actually helping :sweat_smile: the man page says I have to specify the right block size and I have no idea what that would be.

1 Like

From the failed fdisk… oh wait…

1 Like

Ah, fdisk is using 4k blocks

I can’t use gparted unfortunately, no internet on the pc in question. Gnome disks can see the size of the disk, the model and nothing else :woman_shrugging:

1 Like

you mean no internet to download gparted? maybe parted is installed?
I’m afraid I haven’t had to do anything low level except the occasional secure erase.

Wendell did a thread about changing the sector size on enterprise drives, maybe a few steps in that might help you out? like the first few bits?

1 Like

It’s not installed unfortunately, I’m using a fedora live-os.

Thanks for the tip about the enterprise drive thread, I don’t really know enough to get what’s going on.

1 Like

I guess if you try to install fedora, it just does not list the drive as available?

Maybe check hdparm and see the status? like
hdparm -I /dev/nvmen01whatever

(that is a capital I for india after the dash)
see if the security section says not, or does not say not to anything?

1 Like

Apart from that, maybe check dmesg or journalctl -b to see if there were anyy reported errors on initialising / activating the drive?

maybe see if the bios can see it?

maybe check out the interface adapter/board used to connect it to the motherbard?

not really sure

1 Like

Oh! dmesg has some really interesting error messages

blk_update_request: protection error, dev nvme0c0n1, sector 534123, op 0x0: (READ) flags 0x2000000 phys_seg 1 prio class 0

There’s thousands of these.

I guess badblocks isn’t doing much of anything :expressionless:

So it seems to be a drive write protection thing?

how many patterns did it get through?

1 Like

It’s still going… just throwing an error every time it tries to access the drive

1 Like

like, not even one pass?
I’d stop it, shutdown, check cables etc, and start again?

Is it the only drive apart from the fedora USB?

like, I would be surprised a U.2 takes half an hour to fully write out?