Trying to format 4tb drive to ext4

Hi,

New drive which I have attempted to format 3 times now using mke2fs. It seems to take ages 15 hours or so on creatin journal and then after says it has issues wriiting out superblocks and the disk is unusable. From what I have read, this process should take only approx. 30 mins.

This is putty log from my 3rd attempt (on going)

Device Start End Sectors Size Type
/dev/sdd1 2048 7813967871 7813965824 3.7T Microsoft basic data
osmc@htpc:~$ mkfs.ext4 -L Elements /dev/sdd
mke2fs 1.43.4 (31-Jan-2017)
Found a gpt partition table in /dev/sdd
Proceed anyway? (y,N) y
Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.
Creating filesystem with 976746240 4k blocks and 244187136 inodes
Filesystem UUID: 01ac6987-5012-4aff-aa25-990c4a88c0c3
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks):

Hello first of all.

Ways too few information, you should offer also

  • What OSMC device? Vero, Pi ā€¦
  • Is HDD self-powered, connected with a powered hub or directly attached to the OSMC device?
  • Is there any data already on this disk?
  • What brand+model is the disk/enclosure?
  • What are the current S.M.A.R.T values of this disk?
    ā€“ install smartmontools, locate the device name of the disk and paste here the output of smartctl -A /dev/<your hdd device name>

Hi,

Sorry, itā€™s a WD Elements 4tb powered drive., attached to powered hub. Other drives I formatted like this worked fine. This is on vero4k+

Cant get smart status at the mo as its still trying to create journal and Iā€™d rather not interrupt it.

The journal size is always the same independent from the disk size; on a test HDD here with 232GB it takes only 10 or 20 seconds. There is something odd with this device.
Could you invoke a dmesg -w or journalctl -fin another ssh session to see what the OS/kernel is logging while this journal creation?

Getting pages back from those comands. Excerpt:

[10626.725187] sd 5:0:0:0: [sdd]
[10626.725191] Sense Key : 0xb [current]
[10626.725199] sd 5:0:0:0: [sdd]
[10626.725203] ASC=0x47 ASCQ=0x3
[10626.725208] sd 5:0:0:0: [sdd] CDB:
[10626.725212] cdb[0]=0x8a: 8a 00 00 00 00 00 e8 c9 d4 70 00 00 00 38 00 00
[10626.725231] end_request: I/O error, dev sdd, sector 3905541232
[10631.158673] sd 5:0:0:0: [sdd]
[10631.158690] Result: hostbyte=0x00 driverbyte=0x08
[10631.158695] sd 5:0:0:0: [sdd]
[10631.158699] Sense Key : 0xb [current]
[10631.158708] sd 5:0:0:0: [sdd]
[10631.158711] ASC=0x47 ASCQ=0x3
[10631.158716] sd 5:0:0:0: [sdd] CDB:
[10631.158720] cdb[0]=0x8a: 8a 00 00 00 00 00 e8 cb 6f f8 00 00 00 58 00 00
[10631.158741] end_request: I/O error, dev sdd, sector 3905646584
[10631.158749] quiet_error: 27 callbacks suppressed
[10631.158753] Buffer I/O error on device sdd, logical block 488205823
[10631.158757] lost page write due to I/O error on sdd
[10631.158779] Buffer I/O error on device sdd, logical block 488205824
[10631.158783] lost page write due to I/O error on sdd
[10631.158791] Buffer I/O error on device sdd, logical block 488205825
[10631.158795] lost page write due to I/O error on sdd
[10631.158801] Buffer I/O error on device sdd, logical block 488205826
[10631.158804] lost page write due to I/O error on sdd
[10631.158811] Buffer I/O error on device sdd, logical block 488205827
[10631.158814] lost page write due to I/O error on sdd
[10631.158822] Buffer I/O error on device sdd, logical block 488205828
[10631.158825] lost page write due to I/O error on sdd
[10631.158831] Buffer I/O error on device sdd, logical block 488205829
[10631.158835] lost page write due to I/O error on sdd
[10631.158840] Buffer I/O error on device sdd, logical block 488205830
[10631.158844] lost page write due to I/O error on sdd
[10631.158850] Buffer I/O error on device sdd, logical block 488205831
[10631.158853] lost page write due to I/O error on sdd
[10631.158859] Buffer I/O error on device sdd, logical block 488205832
[10631.158863] lost page write due to I/O error on sdd
[10635.591367] sd 5:0:0:0: [sdd]
[10635.591380] Result: hostbyte=0x00 driverbyte=0x08
[10635.591386] sd 5:0:0:0: [sdd]
[10635.591389] Sense Key : 0xb [current]
[10635.591397] sd 5:0:0:0: [sdd]
[10635.591400] ASC=0x47 ASCQ=0x3
[10635.591406] sd 5:0:0:0: [sdd] CDB:
[10635.591410] cdb[0]=0x8a: 8a 00 00 00 00 00 e8 c9 d6 60 00 00 00 30 00 00
[10635.591429] end_request: I/O error, dev sdd, sector 3905541728
[10640.037675] sd 5:0:0:0: [sdd]
[10640.037691] Result: hostbyte=0x00 driverbyte=0x08
[10640.037697] sd 5:0:0:0: [sdd]
[10640.037701] Sense Key : 0xb [current]
[10640.037709] sd 5:0:0:0: [sdd]
[10640.037713] ASC=0x47 ASCQ=0x3
[10640.037718] sd 5:0:0:0: [sdd] CDB:
[10640.037722] cdb[0]=0x8a: 8a 00 00 00 00 00 e8 cb 76 90 00 00 00 e0 00 00
[10640.037741] end_request: I/O error, dev sdd, sector 3905648272
[10640.037748] quiet_error: 7 callbacks suppressed
[10640.037753] Buffer I/O error on device sdd, logical block 488206034
[10640.037757] lost page write due to I/O error on sdd
[10640.037779] Buffer I/O error on device sdd, logical block 488206035
[10640.037782] lost page write due to I/O error on sdd
[10640.037789] Buffer I/O error on device sdd, logical block 488206036
[10640.037793] lost page write due to I/O error on sdd
[10640.037800] Buffer I/O error on device sdd, logical block 488206037
[10640.037803] lost page write due to I/O error on sdd
[10640.037809] Buffer I/O error on device sdd, logical block 488206038
[10640.037813] lost page write due to I/O error on sdd
[10640.037820] Buffer I/O error on device sdd, logical block 488206039
[10640.037823] lost page write due to I/O error on sdd
[10640.037830] Buffer I/O error on device sdd, logical block 488206040
[10640.037833] lost page write due to I/O error on sdd
[10640.037840] Buffer I/O error on device sdd, logical block 488206041
[10640.037843] lost page write due to I/O error on sdd
[10640.037850] Buffer I/O error on device sdd, logical block 488206042
[10640.037853] lost page write due to I/O error on sdd
[10640.037859] Buffer I/O error on device sdd, logical block 488206043
[10640.037863] lost page write due to I/O error on sdd
[10644.468632] sd 5:0:0:0: [sdd]
[10644.468646] Result: hostbyte=0x00 driverbyte=0x08
[10644.468652] sd 5:0:0:0: [sdd]
[10644.468656] Sense Key : 0xb [current]
[10644.468664] sd 5:0:0:0: [sdd]
[10644.468667] ASC=0x47 ASCQ=0x3
[10644.468673] sd 5:0:0:0: [sdd] CDB:
[10644.468677] cdb[0]=0x8a: 8a 00 00 00 00 00 e8 ca c1 68 00 00 00 28 00 00
[10644.468696] end_request: I/O error, dev sdd, sector 3905601896
[10648.902917] sd 5:0:0:0: [sdd]
[10648.902930] Result: hostbyte=0x00 driverbyte=0x08
[10648.902935] sd 5:0:0:0: [sdd]
[10648.902939] Sense Key : 0xb [current]
[10648.902947] sd 5:0:0:0: [sdd]
[10648.902950] ASC=0x47 ASCQ=0x3
[10648.902956] sd 5:0:0:0: [sdd] CDB:
[10648.902959] cdb[0]=0x8a: 8a 00 00 00 00 00 e8 cb 77 70 00 00 00 a0 00 00
[10648.902979] end_request: I/O error, dev sdd, sector 3905648496
[10648.902985] quiet_error: 23 callbacks suppressed
[10648.902990] Buffer I/O error on device sdd, logical block 488206062
[10648.902993] lost page write due to I/O error on sdd
[10648.903008] Buffer I/O error on device sdd, logical block 488206063
[10648.903012] lost page write due to I/O error on sdd
[10648.903019] Buffer I/O error on device sdd, logical block 488206064
[10648.903022] lost page write due to I/O error on sdd
[10648.903029] Buffer I/O error on device sdd, logical block 488206065
[10648.903032] lost page write due to I/O error on sdd
[10648.903038] Buffer I/O error on device sdd, logical block 488206066
[10648.903041] lost page write due to I/O error on sdd
[10648.903048] Buffer I/O error on device sdd, logical block 488206067
[10648.903051] lost page write due to I/O error on sdd
[10648.903058] Buffer I/O error on device sdd, logical block 488206068
[10648.903061] lost page write due to I/O error on sdd
[10648.903067] Buffer I/O error on device sdd, logical block 488206069
[10648.903070] lost page write due to I/O error on sdd
[10648.903077] Buffer I/O error on device sdd, logical block 488206070
[10648.903080] lost page write due to I/O error on sdd
[10648.903087] Buffer I/O error on device sdd, logical block 488206071
[10648.903090] lost page write due to I/O error on sdd
[10653.346829] sd 5:0:0:0: [sdd]
[10653.346842] Result: hostbyte=0x00 driverbyte=0x08
[10653.346847] sd 5:0:0:0: [sdd]
[10653.346852] Sense Key : 0xb [current]
[10653.346860] sd 5:0:0:0: [sdd]
[10653.346863] ASC=0x47 ASCQ=0x3
[10653.346868] sd 5:0:0:0: [sdd] CDB:
[10653.346872] cdb[0]=0x8a: 8a 00 00 00 00 00 e8 ca e6 18 00 00 00 70 00 00
[10653.346891] end_request: I/O error, dev sdd, sector 3905611288
^C
osmc@htpc:~$ journalctl -f
ā€“ Logs begin at Thu 2016-11-03 17:16:42 GMT. ā€“
Sep 27 11:33:55 htpc kernel: lost page write due to I/O error on sdd
Sep 27 11:33:59 htpc kernel: sd 5:0:0:0: [sdd]
Sep 27 11:33:59 htpc kernel: Result: hostbyte=0x00 driverbyte=0x08
Sep 27 11:33:59 htpc kernel: sd 5:0:0:0: [sdd]
Sep 27 11:33:59 htpc kernel: Sense Key : 0xb [current]
Sep 27 11:33:59 htpc kernel: sd 5:0:0:0: [sdd]
Sep 27 11:33:59 htpc kernel: ASC=0x47 ASCQ=0x3
Sep 27 11:33:59 htpc kernel: sd 5:0:0:0: [sdd] CDB:
Sep 27 11:33:59 htpc kernel: cdb[0]=0x8a: 8a 00 00 00 00 00 e8 ca e6 18 00 00 00 70 00 00
Sep 27 11:33:59 htpc kernel: end_request: I/O error, dev sdd, sector 3905611288
Sep 27 11:34:08 htpc kernel: sd 5:0:0:0: [sdd]
Sep 27 11:34:08 htpc kernel: Result: hostbyte=0x00 driverbyte=0x08
Sep 27 11:34:08 htpc kernel: sd 5:0:0:0: [sdd]
Sep 27 11:34:08 htpc kernel: Sense Key : 0xb [current]
Sep 27 11:34:08 htpc kernel: sd 5:0:0:0: [sdd]
Sep 27 11:34:08 htpc kernel: ASC=0x47 ASCQ=0x3
Sep 27 11:34:08 htpc kernel: sd 5:0:0:0: [sdd] CDB:
Sep 27 11:34:08 htpc kernel: cdb[0]=0x8a: 8a 00 00 00 00 00 e8 cb 08 a8 00 00 00 f0 00 00
Sep 27 11:34:08 htpc kernel: end_request: I/O error, dev sdd, sector 3905620136
Sep 27 11:34:08 htpc kernel: quiet_error: 24 callbacks suppressed
Sep 27 11:34:08 htpc kernel: Buffer I/O error on device sdd, logical block 488202517
Sep 27 11:34:08 htpc kernel: lost page write due to I/O error on sdd
Sep 27 11:34:08 htpc kernel: Buffer I/O error on device sdd, logical block 488202518
Sep 27 11:34:08 htpc kernel: lost page write due to I/O error on sdd
Sep 27 11:34:08 htpc kernel: Buffer I/O error on device sdd, logical block 488202519
Sep 27 11:34:08 htpc kernel: lost page write due to I/O error on sdd
Sep 27 11:34:08 htpc kernel: Buffer I/O error on device sdd, logical block 488202520
Sep 27 11:34:08 htpc kernel: lost page write due to I/O error on sdd
Sep 27 11:34:08 htpc kernel: Buffer I/O error on device sdd, logical block 488202521
Sep 27 11:34:08 htpc kernel: lost page write due to I/O error on sdd
Sep 27 11:34:08 htpc kernel: Buffer I/O error on device sdd, logical block 488202522
Sep 27 11:34:08 htpc kernel: lost page write due to I/O error on sdd
Sep 27 11:34:08 htpc kernel: Buffer I/O error on device sdd, logical block 488202523
Sep 27 11:34:08 htpc kernel: lost page write due to I/O error on sdd
Sep 27 11:34:08 htpc kernel: Buffer I/O error on device sdd, logical block 488202524
Sep 27 11:34:08 htpc kernel: lost page write due to I/O error on sdd
Sep 27 11:34:08 htpc kernel: Buffer I/O error on device sdd, logical block 488202525
Sep 27 11:34:08 htpc kernel: lost page write due to I/O error on sdd
Sep 27 11:34:08 htpc kernel: Buffer I/O error on device sdd, logical block 488202526
Sep 27 11:34:08 htpc kernel: lost page write due to I/O error on sdd

Check the USB cable.
Does the drive work when connected to PC?

ā€¦ and the output of smartctl as suggested, please.

Addition: If you see reallocated sectors or even pending sectors, I wouldnā€™t invest any longer in this disk and see it as dead-on-arrival.

For WD disks look here Software and Firmware Downloads | WD Support to find a diagnostic program (Datalife Guard) from the vendor.

Getting this:

Disk /dev/sdd: 3.7 TiB, 4000752599040 bytes, 7813969920 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
osmc@htpc:~$ smartctl -A /dev/sdd
smartctl 6.6 2016-05-31 r4324 [aarch64-linux-3.14.29-152-osmc] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/sdd: Unknown USB bridge [0x1058:0x25a3 (0x1021)]
Please specify device type with the -d option.

Use smartctl -h to get a usage summary

try one of the following:

smartctl -d sat -Aā€¦
or
smartctl -d ata -Aā€¦
or
smartctl -d scsi -Aā€¦

Well, that last one worked but only outputted:

osmc@htpc:~$ smartctl -d scsi -A /dev/sdd
smartctl 6.6 2016-05-31 r4324 [aarch64-linux-3.14.29-152-osmc] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===

with -H

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK
Current Drive Temperature: 0 C
Drive Trip Temperature: 0 C

last idea is

smartctl -d sat,12 -A ā€¦

\\\\nope

osmc@htpc:~$ smartctl -d sat,12 -A /dev/sdd
smartctl 6.6 2016-05-31 r4324 [aarch64-linux-3.14.29-152-osmc] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: Operation not permitted

A mandatory SMART command failed: exiting. To continue, add one or more ā€˜-T permissiveā€™ options.
osmc@htpc:~$

look at the column ā€œsmartctl optionā€ here https://www.smartmontools.org/wiki/USB and try any of the given -d entries. If neither of them work, I donā€™t have any more ideas ā†’ continue with the WD Datalife Guard branch.

Under windows, Iā€™ve just fromatted it back to ntfs and am going to give it another try now under the vero to ext4.

Thanks

That wonā€™t help! The logs you posted clearly indicate that the are ranges of sectors which cannot be accessed/written/read.

Have you tested all -d options given in the table of the link posted?
https://www.smartmontools.org/wiki/Supported_USB-Devices states for the WD 4tb Elements -d satis the right option. Also the USB vendor id parms match your given USB bridge information.

Why not give the WD Datalife Guard on Windows a chance?

Seems okay now :smiley: God knows why!

mke2fs 1.43.4 (31-Jan-2017)
/dev/sdd2 contains a ntfs file system labelled ā€˜New Volumeā€™
Proceed anyway? (y,N) y
Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.
Creating filesystem with 976741632 4k blocks and 244187136 inodes
Filesystem UUID: 70a8e007-5c4f-421a-b684-4aafd08d5f56
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done

There is also another partition on this drive (sdd2)?

Now try

smartctl -d sat -a /dev/sdd

Perhaps, @fzinken is right and this is a cable issue.

No toher partition, but another drive already called sdd

osmc@htpc:~$ smartctl -d sat -a /dev/sdd2
smartctl 6.6 2016-05-31 r4324 [aarch64-linux-3.14.29-152-osmc] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: Inappropriate ioctl for device

A mandatory SMART command failed: exiting. To continue, add one or more ā€˜-T permissiveā€™ options.
osmc@htpc:~$