You are not logged in.

#1 2016-08-15 18:21:58

Kurolox
Member
Registered: 2015-09-15
Posts: 36

Can't format HDD to ext4: "Had trouble writting out superblocks"

Hello. I'm trying to wipe one of my external HDD's and format it to ext4, but it seems like I'm unable to do so. I tried with gparted first (wiping all partitions and creating a new one in ext4), but it couldn't finish and threw me an error when creating the ext4 partition.

After that I was left with an "undefined" partition in the HDD. Since I needed a bit more of info to know what was happening I tried to format it manually with mkfs.ext4. Here is the output (Edit: Just to be sure I'm adding the output with -vv):

sudo mkfs.ext4 -vv /dev/sdd1
mke2fs 1.43.1 (08-Jun-2016)
fs_types for mke2fs.conf resolution: 'ext4'
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
19537920 inodes, 78142464 blocks
3907123 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2227175424
2385 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Filesystem UUID: 26e45d5c-1a41-4f1c-b211-ca28cedf9bc4
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:   50/2385
Warning, had trouble writing out superblocks.

After this I went to some IRC and asked for help. The two things that I got out of that were that 1. It might be a hardware problem (I don't know, since I can use other file systems like NTFS without any problem), and that I should ask here to get a better answer. I've run smartctl to give you some info about the state of the disk. Here you have the output.

sudo smartctl -a /dev/sdd
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.7.0-1-ARCH] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Hitachi Travelstar 7K500
Device Model:     Hitachi HTS725032A9A364
Serial Number:    101120PCK304GKH6HBKJ
LU WWN Device Id: 5 000cca 645d10b70
Firmware Version: PC3OCH0A
User Capacity:    320,072,933,376 bytes [320 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    7200 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 6
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:    Mon Aug 15 20:10:55 2016 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		(  645) seconds.
Offline data collection
capabilities: 			 (0x51) SMART execute Offline immediate.
					No Auto Offline data collection support.
					Suspend Offline collection upon new
					command.
					No Offline surface scan supported.
					Self-test supported.
					No Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 (  92) minutes.
SCT capabilities: 	       (0x003d)	SCT Status supported.
					SCT Error Recovery Control supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   093   091   062    Pre-fail  Always       -       1245199
  2 Throughput_Performance  0x0025   100   100   040    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0023   181   100   033    Pre-fail  Always       -       1
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       873
  5 Reallocated_Sector_Ct   0x0033   083   083   005    Pre-fail  Always       -       1317 (0 1182)
  7 Seek_Error_Rate         0x002f   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0025   100   100   040    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0032   099   099   000    Old_age   Always       -       541
 10 Spin_Retry_Count        0x0033   100   100   060    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       869
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0033   100   100   097    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   089   100   000    Old_age   Always       -       23914383867974
188 Command_Timeout         0x0032   100   099   000    Old_age   Always       -       2
190 Airflow_Temperature_Cel 0x0022   057   053   045    Old_age   Always       -       43 (Min/Max 43/44)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       7
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       5308497
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       2535
196 Reallocated_Event_Count 0x0032   079   079   000    Old_age   Always       -       1357
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       27
198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0036   100   100   000    Old_age   Always       -       0
223 Load_Retry_Count        0x002a   100   100   000    Old_age   Always       -       0

SMART Error Log Version: 1
ATA Error Count: 1913 (device log contains only the most recent five errors)
	CR = Command Register [HEX]
	FR = Features Register [HEX]
	SC = Sector Count Register [HEX]
	SN = Sector Number Register [HEX]
	CL = Cylinder Low Register [HEX]
	CH = Cylinder High Register [HEX]
	DH = Device/Head Register [HEX]
	DC = Device Command Register [HEX]
	ER = Error register [HEX]
	ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 1913 occurred at disk power-on lifetime: 541 hours (22 days + 13 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 06 02 08 f4 e1  Error: UNC 6 sectors at LBA = 0x01f40802 = 32770050

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 08 00 08 f4 e0 00      00:02:25.500  READ DMA EXT
  35 00 f0 f0 8f c0 e0 00      00:02:25.500  WRITE DMA EXT
  35 00 f0 00 8f c0 e0 00      00:02:25.500  WRITE DMA EXT
  35 00 f0 10 8e c0 e0 00      00:02:25.500  WRITE DMA EXT
  35 00 f0 20 8d c0 e0 00      00:02:25.500  WRITE DMA EXT

Error 1912 occurred at disk power-on lifetime: 541 hours (22 days + 13 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 07 01 08 f4 e1  Error: UNC 7 sectors at LBA = 0x01f40801 = 32770049

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 08 00 08 f4 e0 00      00:02:22.200  READ DMA EXT
  25 00 08 00 08 44 e0 00      00:02:22.200  READ DMA EXT
  25 00 08 00 08 c4 e0 00      00:02:21.700  READ DMA EXT
  35 00 f0 40 4f c0 e0 00      00:02:21.700  WRITE DMA EXT
  35 00 f0 50 4e c0 e0 00      00:02:21.700  WRITE DMA EXT

Error 1911 occurred at disk power-on lifetime: 541 hours (22 days + 13 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 07 01 08 f4 e1  Error: UNC 7 sectors at LBA = 0x01f40801 = 32770049

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 08 00 08 f4 e0 00      00:07:56.100  READ DMA EXT
  35 00 f0 50 4e 00 e0 00      00:07:56.100  WRITE DMA EXT
  35 00 f0 60 4d 00 e0 00      00:07:56.100  WRITE DMA EXT
  35 00 f0 70 4c 00 e0 00      00:07:56.100  WRITE DMA EXT
  35 00 f0 80 4b 00 e0 00      00:07:56.100  WRITE DMA EXT

Error 1910 occurred at disk power-on lifetime: 541 hours (22 days + 13 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 07 01 08 f4 e1  Error: UNC 7 sectors at LBA = 0x01f40801 = 32770049

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 08 00 08 f4 e0 00      00:07:49.500  READ DMA EXT
  25 00 08 00 08 44 e0 00      00:07:49.400  READ DMA EXT
  25 00 08 00 08 c4 e0 00      00:07:49.000  READ DMA EXT
  35 00 f0 a0 0d 00 e0 00      00:07:49.000  WRITE DMA EXT
  35 00 f0 b0 0c 00 e0 00      00:07:49.000  WRITE DMA EXT

Error 1909 occurred at disk power-on lifetime: 541 hours (22 days + 13 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  10 51 60 e0 28 80 ef  Error: IDNF 96 sectors at LBA = 0x0f8028e0 = 260057312

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  35 00 f0 e0 28 80 e0 00      00:03:26.600  WRITE DMA EXT
  35 00 f0 f0 27 80 e0 00      00:03:26.600  WRITE DMA EXT
  35 00 f0 00 27 80 e0 00      00:03:26.600  WRITE DMA EXT
  35 00 f0 10 26 80 e0 00      00:03:26.600  WRITE DMA EXT
  35 00 f0 20 25 80 e0 00      00:03:26.600  WRITE DMA EXT

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed: read failure       80%       539         80238
# 2  Short offline       Completed: read failure       80%       539         80238
# 3  Short offline       Aborted by host               90%       539         -
# 4  Short offline       Completed without error       00%         2         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

So, it is a hardware problem? Is something else that can be done?

Last edited by Kurolox (2016-08-15 18:35:58)

Offline

#2 2016-08-15 19:09:43

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Can't format HDD to ext4: "Had trouble writting out superblocks"

You've got bad sectors

  5 Reallocated_Sector_Ct   0x0033   083   083   005    Pre-fail  Always       -       1317 (0 1182)
196 Reallocated_Event_Count 0x0032   079   079   000    Old_age   Always       -       1357
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       27

Many errors have occurred

ATA Error Count: 1913

And the drive failed a short test

# 1  Short offline       Completed: read failure       80%       539         80238

If the drive is under warranty, have it replaced. If not, you should probably dispose of it. If you are feeling ambitious, you could put the drive through the gauntlet with several write-read badblocks passes and then a full test. But what will probably happen is more and more errors until you run out of replacement sectors or some other sort of outright failure.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2019-08-25 15:43:42

onurcanbektas
Member
Registered: 2019-08-25
Posts: 2

Re: Can't format HDD to ext4: "Had trouble writting out superblocks"

@alphaniner From which information did you figure out the disk had back locks ?

Last edited by onurcanbektas (2019-08-25 15:44:05)

Offline

#4 2019-08-25 15:44:27

onurcanbektas
Member
Registered: 2019-08-25
Posts: 2

Re: Can't format HDD to ext4: "Had trouble writting out superblocks"

alphaniner wrote:

You've got bad sectors

  5 Reallocated_Sector_Ct   0x0033   083   083   005    Pre-fail  Always       -       1317 (0 1182)
196 Reallocated_Event_Count 0x0032   079   079   000    Old_age   Always       -       1357
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       27

Many errors have occurred

ATA Error Count: 1913

And the drive failed a short test

# 1  Short offline       Completed: read failure       80%       539         80238

If the drive is under warranty, have it replaced. If not, you should probably dispose of it. If you are feeling ambitious, you could put the drive through the gauntlet with several write-read badblocks passes and then a full test. But what will probably happen is more and more errors until you run out of replacement sectors or some other sort of outright failure.


From which information did you figure out the disk had back locks ?

Offline

#5 2019-08-25 16:06:11

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Can't format HDD to ext4: "Had trouble writting out superblocks"


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB