0

I have created a ZFS test pool with a drive - now I have pulled thet drive out and want to format it to EXT4 and use it outside of ZFS. I think the pool wasn't properly destroyed.

Now when I plug the drive into a different machine running ZFS - the drive is reported by dmesg to be accessible under /dev/sdf, but lsblk won't list it, and trying to access the /dev/sdf node returns an error:

# mkfs.ext4 /dev/sdf                                                                 
mke2fs 1.42.13 (17-May-2015)                                                                                          
Could not open /dev/sdf: No medium found

The node exists:

# file /dev/sdf                                                                      
/dev/sdf: block special (8/80)

lsblk and gparted doesn't list it:

# lsblk | grep sdf
*nothing returned*

Here's dmesg output:

# dmesg | tail                                                                        
[256646.291063] usb 4-5: New USB device found, idVendor=125f, idProduct=a15a                                          
[256646.291064] usb 4-5: New USB device strings: Mfr=2, Product=3, SerialNumber=1                                     │
[256646.291065] usb 4-5: Product: HD710                                                                               
[256646.291065] usb 4-5: Manufacturer: ADATA                                                                          
[256646.291066] usb 4-5: SerialNumber: 02730010002900000022                                                          
[256646.291784] usb-storage 4-5:1.0: USB Mass Storage device detected                                                
[256646.291913] scsi host8: usb-storage 4-5:1.0                                                                      
[256647.350854] scsi 8:0:0:0: Direct-Access     ASMT     2105             0    PQ: 0 ANSI: 5 
[256647.352164] sd 8:0:0:0: Attached scsi generic sg5 type 0                                                          
[256647.353125] sd 8:0:0:0: [sdf] Attached SCSI removable disk

How can I format this drive? Can I do it in a machine using ZFS?

unfa
  • 171
  • 1
  • 8

2 Answers2

0

Although this is old-ish since there is no answer.

I have used the program wipefs from the Debian/Ubuntu package util-linux to wipe not only ZFS used drives no longer in a zpool but any drive I want to reuse so I know the past formatting is gone.

Usage: Assuming the drive in question is /dev/sdd

sudo /sbin/wipefs --all /dev/sdd

I have used this and was able to use the drive elsewhere be it on Linux or Windows systems. See 'man wipefs' for other options.

Jorge
  • 31
  • 3
0

It's a USB controller problem

The drive is a portable USB 3.0 1TB ADATA disk. While trying to use the disk I had 4 USB flash drives connected to the same PC. These flash drives have caused electrical problems before (up to shutting off the whole machine when plugging them in/out). I'm pretty sure they cause trouble in my USB controller, making it unable to properly detect the drive.

I have formatted my 1TB the drive to EXT4 on a different machine (that has ZFS installed). And the drive is still not listed by lsblk.

I'm pretty sure if I disconected my flaky USB flash drives the 1TB drive will detect just fine.

I have initially assumed this is a ZFS-related issue, but now I'm pretty sure it's not.

unfa
  • 171
  • 1
  • 8