Solved Super slow hard drive

Hi,
I have a home server for a years on FreeBSD.
But, after last hardware upgrade ( hdd old 64GB, new 250GB the same rpm and from the same brand ) and software upgrade to FreeBSD 10.2, there is a one big problem with speed of response reading from my HDD. Its extremely slow. I can uploading one big file and the other services like Apache/MySQL are dead...

As I see on this forum, there is a lot of HDD problem after upgrading to FreeBSD 10.X, but I was upgrading hardware too.

Maybe someone could help me?
 
Sure, but we can't see it from here. Exactly which model of hard drive and computer? Is the hard drive connected to a motherboard port?
 
It's a 2.5" Hitachi disc, 7k200 rpm, connected via SATA 2

Diskinfo:
Code:
[root@~]# diskinfo -tv /dev/ada0
/dev/ada0
    512             # sectorsize
    250059350016    # mediasize in bytes (233G)
    488397168       # mediasize in sectors
    0               # stripesize
    0               # stripeoffset
    484521          # Cylinders according to firmware.
    16              # Heads according to firmware.
    63              # Sectors according to firmware.
    101208PBN200CSELW66T    # Disk ident.

Seek times:
    Full stroke:      250 iter in   9.669230 sec =   38.677 msec
    Half stroke:      250 iter in   6.948601 sec =   27.794 msec
    Quarter stroke:      500 iter in  14.340471 sec =   28.681 msec
    Short forward:      400 iter in   6.146594 sec =   15.366 msec
    Short backward:      400 iter in   6.201878 sec =   15.505 msec
    Seq outer:    2048 iter in   0.349727 sec =    0.171 msec
    Seq inner:    2048 iter in   0.316501 sec =    0.155 msec

Transfer rates:
    outside:       102400 kbytes in   7.755499 sec =    13204 kbytes/sec
    middle:        102400 kbytes in   7.778918 sec =    13164 kbytes/sec
    inside:        102400 kbytes in   3.060929 sec =    33454 kbytes/sec

FSTAB:
Code:
[root@~]# cat /etc/fstab
# Device    Mountpoint    FStype    Options    Dump    Pass#
/dev/ada0p2    /        ufs    rw    1    1
/dev/ada0p3    none        swap    sw    0    0
fdesc        /dev/fd        fdescfs    rw    0    0

SMART
Code:
[root@~]# smartctl -a /dev/ada0

smartctl 6.4 2015-06-04 r4109 [FreeBSD 10.2-RELEASE i386] (local build)
Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

Model Family:     Hitachi Travelstar 5K500.B
Device Model:     Hitachi HTS545025B9A300
Serial Number:    101208PBN200CSELW66T
LU WWN Device Id: 5 000cca 62be4c3cb
Firmware Version: PB2OC64G
User Capacity:    250,059,350,016 bytes [250 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    5400 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 Nov  2 19:18:15 2015 CET
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:            (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    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:    (  83) 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     0x000b   083   083   062    Pre-fail  Always       -       24903721
  2 Throughput_Performance  0x0005   100   100   040    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0007   217   217   033    Pre-fail  Always       -       1
  4 Start_Stop_Count        0x0012   094   094   000    Old_age   Always       -       9771
  5 Reallocated_Sector_Ct   0x0033   044   044   005    Pre-fail  Always       -       2823
  7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   100   100   040    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0012   094   094   000    Old_age   Always       -       2908
 10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       2735
191 G-Sense_Error_Rate      0x000a   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       168
193 Load_Cycle_Count        0x0012   095   095   000    Old_age   Always       -       58693
194 Temperature_Celsius     0x0002   177   177   000    Old_age   Always       -       31 (Min/Max 7/41)
196 Reallocated_Event_Count 0x0032   026   026   000    Old_age   Always       -       3742
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       101
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0
223 Load_Retry_Count        0x000a   100   100   000    Old_age   Always       -       0

SMART Error Log Version: 1

ATA Error Count: 16465 (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 16465 occurred at disk power-on lifetime: 2892 hours (120 days + 12 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 04 4e ba 3b ec  Error: UNC 4 sectors at LBA = 0x0c3bba4e = 205240910

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  c8 00 08 4a ba 3b ec 00  21d+06:29:10.000  READ DMA
  c8 00 08 4a ba 3b ec 00  21d+06:29:06.100  READ DMA
  c8 00 08 4a ba 3b ec 00  21d+06:29:02.000  READ DMA
  c8 00 08 4a ba 3b ec 00  21d+06:28:58.000  READ DMA
  c8 00 08 4a ba 3b ec 00  21d+06:28:54.000  READ DMA

Error 16464 occurred at disk power-on lifetime: 2892 hours (120 days + 12 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 04 4e ba 3b ec  Error: UNC 4 sectors at LBA = 0x0c3bba4e = 205240910

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  c8 00 08 4a ba 3b ec 00  21d+06:29:06.100  READ DMA
  c8 00 08 4a ba 3b ec 00  21d+06:29:02.000  READ DMA
  c8 00 08 4a ba 3b ec 00  21d+06:28:58.000  READ DMA
  c8 00 08 4a ba 3b ec 00  21d+06:28:54.000  READ DMA
  ca 00 40 62 7e 4b ee 00  21d+06:28:52.200  WRITE DMA

Error 16463 occurred at disk power-on lifetime: 2892 hours (120 days + 12 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 04 4e ba 3b ec  Error: UNC 4 sectors at LBA = 0x0c3bba4e = 205240910

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------

  c8 00 08 4a ba 3b ec 00  21d+06:29:02.000  READ DMA
  c8 00 08 4a ba 3b ec 00  21d+06:28:58.000  READ DMA
  c8 00 08 4a ba 3b ec 00  21d+06:28:54.000  READ DMA
  ca 00 40 62 7e 4b ee 00  21d+06:28:52.200  WRITE DMA
  ca 00 30 62 e9 5a ee 00  21d+06:28:52.200  WRITE DMA

Error 16462 occurred at disk power-on lifetime: 2892 hours (120 days + 12 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 04 4e ba 3b ec  Error: UNC 4 sectors at LBA = 0x0c3bba4e = 205240910

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------

  c8 00 08 4a ba 3b ec 00  21d+06:28:58.000  READ DMA
  c8 00 08 4a ba 3b ec 00  21d+06:28:54.000  READ DMA
  ca 00 40 62 7e 4b ee 00  21d+06:28:52.200  WRITE DMA
  ca 00 30 62 e9 5a ee 00  21d+06:28:52.200  WRITE DMA
  ca 00 40 62 7c 4b ee 00  21d+06:28:52.200  WRITE DMA

Error 16461 occurred at disk power-on lifetime: 2892 hours (120 days + 12 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 04 4e ba 3b ec  Error: UNC 4 sectors at LBA = 0x0c3bba4e = 205240910

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  c8 00 08 4a ba 3b ec 00  21d+06:28:54.000  READ DMA
  ca 00 40 62 7e 4b ee 00  21d+06:28:52.200  WRITE DMA
  ca 00 30 62 e9 5a ee 00  21d+06:28:52.200  WRITE DMA
  ca 00 40 62 7c 4b ee 00  21d+06:28:52.200  WRITE DMA
  ca 00 01 b0 c2 00 e0 00  21d+06:28:52.200  WRITE DMA

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

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.

I'm sorry its a 5400 rpm, prev. was 7400
 
I understand that it has bad sectors?
Is there any option to automatic leave that sectors?
 
The drive firmware will continue reallocating bad sectors until the drive no longer functions at all. There is nothing you can do about that as the hardware is just failing. The drive really just needs to be replaced unfortunately.
 
Ok, is there any option to clone this hdd to another? I mean, i have a Dell server with SCSI disks, and I want to mirror actual server to new machine.
 
There are several ways to clone a HDD. One way is to place the old drive and a new drive the same size or larger in another system and use dd(). There are also other tools available that run off of a bootable CD/DVD/Flash and clone file systems or from the block level. You can find much information about this with some web searches.
 
Please do not use dd(1). ...
I agree, dd(1) is the tool of last resort. But it does do the job as I have used it in the past to do just what Grzegorz is asking about. ;) I have also used Clonezilla, mentioned in your link, and had varying success with it. It has been a very long time since I last used dump / restore.
 
In this case, the drive is failing, and every access could push it closer to failing completely. dd(1) reads every block, including those that are not in use, usually more than half of the drive. So using dump/ restore can reduce access, hopefully letting the drive live until the copy is complete.
 
Ok, thanks all for help.
I ordered a new drive which should be delivered on Tuesday ( WD SSHD 1TB + 8GB ).

I have a off topic question.
I'm using FreeBSD for a years as home server.
It's running a couple of services:
- Apache + PHP + MySQL + MongoDB ( I'm a web developer ) for personal use,
- Postfix + Dovecot,
- vsFTPd,
- TeamSpeak 3,
- Ventrilo,
- ownCloud,
- Wolfenstein: Enemy Territory ( sometimes ).

A year ego I was thinking about change of FreeBSD to OpenBSD.
I installed on Macbook on Virtual Machine OpenBSD 5.8 and I played a little bit with that system.
What do you think about change FreeBSD to OpenBSD for my requirements ?
Is OpenBSD faster than FreeBSD ?
I never had more problems with FreeBSD, but maybe I want to change something to unexplored :)
Someone know how to hide system process from other then root group users?
In FreeBSD I added to sysctl.conf these two lines:
Code:
security.bsd.see_other_uids=0
security.bsd.see_other_gids=0

But I don't know how to do that in oBSD.

I know it's not a OpenBSD forum, but many of you using both systems.

Cheers
 
Last edited by a moderator:
Ok, thanks all for help.
I ordered a new drive which should be delivered on Tuesday ( WD SSHD 1TB + 8GB ).

I have a off topic question.
I'm using FreeBSD for a years as home server.
It's running a couple of services:
- Apache + PHP + MySQL + MongoDB ( I'm a web developer ) for personal use,
- Postfix + Dovecot,
- vsFTPd,
- TeamSpeak 3,
- Ventrilo,
- ownCloud,
- Wolfenstein: Enemy Territory ( sometimes ).

A year ego I was thinking about change of FreeBSD to OpenBSD.
I installed on Macbook on Virtual Machine OpenBSD 5.8 and I played a little bit with that system.
What do you think about change FreeBSD to OpenBSD for my requirements ?
Is OpenBSD faster than FreeBSD ?
I never had more problems with FreeBSD, but maybe I want to change something to unexplored :)
Someone know how to hide system process from other then root group users?
In FreeBSD I added to sysctl.conf these two lines:
Code:
security.bsd.see_other_uids=0
security.bsd.see_other_gids=0

But I don't know how to do that in oBSD.

I know it's not a OpenBSD forum, but many of you using both systems.

Cheers
Please ask questions specific to other operating systems in their respective forums and/or mailing lists. See rule #7 in Thread 38922.
 
Last edited by a moderator:
Back
Top