LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Speeding up internal Hard drive mount (https://www.linuxquestions.org/questions/linux-hardware-18/speeding-up-internal-hard-drive-mount-4175549459/)

DJOtaku 07-31-2015 07:31 AM

Speeding up internal Hard drive mount
 
Over on this thread http://www.linuxquestions.org/questi...es-4175549373/ I was helped to see what was causing slow boot. Right now I'm just under 3 minutes to boot. One of the biggest culprits is my /home hard drive which takes 37 seconds to mount.

The hard drive is btrfs, SATA III, and 3TB. What could be making it take so long? What could I do to improve it?

Thanks!

Keruskerfuerst 07-31-2015 09:38 AM

Hardwareinfo?

Ihatewindows522 07-31-2015 10:58 AM

How long does the drive take to spin up? That could be a big problem right there.

DJOtaku 07-31-2015 11:13 AM

Quote:

Originally Posted by Ihatewindows522 (Post 5398951)
How long does the drive take to spin up? That could be a big problem right there.

Would that be deeper into the systemd-analyze critical-path? How would I find out?

Ihatewindows522 07-31-2015 11:27 AM

1 Attachment(s)
It should be in the SMART data of the drive. gnome-disks can tell you that.

EDIT: Added a screenshot of my old 1TB drive's SMART data. If the assessment of the spinup time is not OK, then you should probably look into getting a new drive.

DJOtaku 07-31-2015 01:50 PM

Quote:

Originally Posted by Ihatewindows522 (Post 5398961)
It should be in the SMART data of the drive. gnome-disks can tell you that.

EDIT: Added a screenshot of my old 1TB drive's SMART data. If the assessment of the spinup time is not OK, then you should probably look into getting a new drive.

My gnome-disks doesn't look like that. But here's the commandline output:

Code:


# smartctl -a /dev/sdb
smartctl 6.4 2015-06-04 r4109 [x86_64-linux-4.0.8-300.fc22.x86_64] (local build)
Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:    Western Digital AV-GP (AF)
Device Model:    WDC WD30EURS-73TLHY0
Serial Number:    WD-WMC4N0272254
LU WWN Device Id: 5 0014ee 603ae630b
Firmware Version: 80.00A80
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:    512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:  ACS-2 (minor revision not indicated)
SATA Version is:  SATA 3.0, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Fri Jul 31 14:53:13 2015 EDT
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:                (39720) seconds.
Offline data collection
capabilities:                    (0x7b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        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:        ( 399) minutes.
Conveyance self-test routine
recommended polling time:        (  5) minutes.
SCT capabilities:              (0x7035) SCT Status 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  200  200  051    Pre-fail  Always      -      0
  3 Spin_Up_Time            0x0027  183  179  021    Pre-fail  Always      -      5850
  4 Start_Stop_Count        0x0032  100  100  000    Old_age  Always      -      287
  5 Reallocated_Sector_Ct  0x0033  200  200  140    Pre-fail  Always      -      0
  7 Seek_Error_Rate        0x002e  200  200  000    Old_age  Always      -      0
  9 Power_On_Hours          0x0032  090  090  000    Old_age  Always      -      7841
 10 Spin_Retry_Count        0x0032  100  100  000    Old_age  Always      -      0
 11 Calibration_Retry_Count 0x0032  100  100  000    Old_age  Always      -      0
 12 Power_Cycle_Count      0x0032  100  100  000    Old_age  Always      -      287
192 Power-Off_Retract_Count 0x0032  200  200  000    Old_age  Always      -      29
193 Load_Cycle_Count        0x0032  200  200  000    Old_age  Always      -      257
194 Temperature_Celsius    0x0022  109  105  000    Old_age  Always      -      41
196 Reallocated_Event_Count 0x0032  200  200  000    Old_age  Always      -      0
197 Current_Pending_Sector  0x0032  200  200  000    Old_age  Always      -      0
198 Offline_Uncorrectable  0x0030  100  253  000    Old_age  Offline      -      0
199 UDMA_CRC_Error_Count    0x0032  200  200  000    Old_age  Always      -      2
200 Multi_Zone_Error_Rate  0x0008  100  253  000    Old_age  Offline      -      0

SMART Error Log Version: 1
No Errors Logged

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.


Ihatewindows522 07-31-2015 03:18 PM

1 Attachment(s)
I'm sorry, I don't think I was clear enough. The SMART data is accessible through the menu in gnome-disks, as in the picture I attached.

Code:

  3 Spin_Up_Time            0x0027  183  179  021    Pre-fail  Always      -      5850
If I'm reading this right, it takes 5.85 seconds to spin up. (1000ms = 1sec) My old hard drive takes about a half second, and I'm able to mount it after about 15 seconds of powering it on. This would most certainly account for at least some of the time it takes for you to mount yours. As the SMART data says, if it is at or exceeds the threshold (which yours is pretty close), it indicates that the drive will fail soon. Personally that's not the drive I'd want my home folder on.

DJOtaku 07-31-2015 05:40 PM

Well, for Pre-Fail, you want to be above the number. But I wouldn't put too much stock into it. Here's another drive that is the same size with btrfs:

Code:

# smartctl -a /dev/sdc
smartctl 6.4 2015-06-04 r4109 [x86_64-linux-4.0.8-300.fc22.x86_64] (local build)
Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:    HGST Deskstar NAS
Device Model:    HGST HDN724030ALE640
Serial Number:    PK2234P9HWA6WY
LU WWN Device Id: 5 000cca 248da83e5
Firmware Version: MJ8OA5E0
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:    512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:  ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Jul 31 18:32:40 2015 EDT
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:  (0x82)        Offline data collection activity
                                        was completed without error.
                                        Auto Offline Data Collection: Enabled.
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:                (  24) 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:          (  1) minutes.
Extended self-test routine
recommended polling time:          ( 441) 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  100  100  016    Pre-fail  Always      -      0
  2 Throughput_Performance  0x0005  136  136  054    Pre-fail  Offline      -      82
  3 Spin_Up_Time            0x0007  100  100  024    Pre-fail  Always      -      0
  4 Start_Stop_Count        0x0012  100  100  000    Old_age  Always      -      3
  5 Reallocated_Sector_Ct  0x0033  100  100  005    Pre-fail  Always      -      0
  7 Seek_Error_Rate        0x000b  100  100  067    Pre-fail  Always      -      0
  8 Seek_Time_Performance  0x0005  124  124  020    Pre-fail  Offline      -      33
  9 Power_On_Hours          0x0012  100  100  000    Old_age  Always      -      317
 10 Spin_Retry_Count        0x0013  100  100  060    Pre-fail  Always      -      0
 12 Power_Cycle_Count      0x0032  100  100  000    Old_age  Always      -      3
192 Power-Off_Retract_Count 0x0032  100  100  000    Old_age  Always      -      16
193 Load_Cycle_Count        0x0012  100  100  000    Old_age  Always      -      16
194 Temperature_Celsius    0x0002  127  127  000    Old_age  Always      -      47 (Min/Max 23/52)
196 Reallocated_Event_Count 0x0032  100  100  000    Old_age  Always      -      0
197 Current_Pending_Sector  0x0022  100  100  000    Old_age  Always      -      0
198 Offline_Uncorrectable  0x0008  100  100  000    Old_age  Offline      -      0
199 UDMA_CRC_Error_Count    0x000a  200  200  000    Old_age  Always      -      0

SMART Error Log Version: 1
No Errors Logged

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.

How can this have a 0 spin-up time?

DJOtaku 07-31-2015 07:47 PM

Hmm, as I look through this - IF the SMART data is accurate ... my home drive is a 5400 RPM drive. Perhaps that's the big culprit? A 5400 RPM drive with nearly 3TB of data.

Keruskerfuerst 07-31-2015 10:11 PM

It is unusual that mounting takes 37s.

Ihatewindows522 08-04-2015 07:40 AM

Quote:

Originally Posted by DJOtaku (Post 5399145)
Hmm, as I look through this - IF the SMART data is accurate ... my home drive is a 5400 RPM drive. Perhaps that's the big culprit? A 5400 RPM drive with nearly 3TB of data.

No...a 3TB drive @ 5400 RPM would be faster than a 1TB drive @ 5400 RPM. It's like the difference between a CD and a DVD, the DVD is faster (even spinning at the same speed) because the data is condensed tighter.

Quote:

Originally Posted by Keruskerfuerst (Post 5399188)
It is unusual that mounting takes 37s.

Welcome to the conversation.

DJOtaku 08-04-2015 10:51 AM

Yeah, I *THINK* it's the type of drive. I think WD has some tuning on it that makes it load up more slowly because it's meant to go into Tivos or something like that

Ihatewindows522 08-04-2015 11:07 AM

That might explain the subpar 5400 RPM, but not the 37 second mount time. I've never really delt with DVRs, but I would imagine that 37 secs is a little long to be waiting even for a DVR.

DJOtaku 08-04-2015 11:24 AM

Yeah, although they're not meant to be turned off. My tablet takes forever to reboot. But most of the time it's instant on.

Ihatewindows522 08-06-2015 01:14 PM

How long has the drive been like this?


All times are GMT -5. The time now is 01:06 PM.