Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I have a Debian NAS with Nextcloud. I use an internal HDD to make daily backups with rsnapshot and when I remember i clone the backup to an external USB HDD.
To clone the backup usually I use
Code:
rsync rsync -aAxH --delete /source /destination
Some times ago I recived an error during the clone (sadly I didn't remember exaclty what it said, but I have saved dmesg) https://pastebin.com/vYwLGLqd
It worked, but rsync failed again. Then I recreated the file systemd and everything seemed to be fine.
From smartctrl I didn't find anything, selftest long never ended in 3 days. I continued using the divece, but today, afer the backup (that finisced ok) while I was shutting down my device with udisksctl I can't fine my device. Showing with fdisk I found the device changed name /dev/sdd => /dev/sde and has been remounted.
This is what smartmontool say
Code:
sudo smartctl -a /dev/sdd
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.0-11-amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: WDC WD40NDZW-11MR8S1
Serial Number: WD-WX51DC93ZD60
LU WWN Device Id: 5 0014ee 2bcfc551c
Firmware Version: 02.01A02
User Capacity: 4.000.753.475.584 bytes [4,00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Form Factor: 2.5 inches
TRIM Command: Available, deterministic
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-3 (minor revision not indicated)
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Fri Feb 4 10:52:44 2022 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: (13620) seconds.
Offline data collection
capabilities: (0x1b) 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.
No 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: ( 642) minutes.
SCT capabilities: (0x30b5) 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 253 253 021 Pre-fail Always - 4725
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 247
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 099 099 000 Old_age Always - 1223
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 70
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 16
193 Load_Cycle_Count 0x0032 197 197 000 Old_age Always - 11737
194 Temperature_Celsius 0x0022 112 095 000 Old_age Always - 40
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 - 0
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
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Aborted by host 80% 1153 -
# 2 Short offline Aborted by host 90% 1037 -
# 3 Short offline Completed without error 00% 981 -
# 4 Extended offline Aborted by host 90% 905 -
# 5 Extended offline Aborted by host 10% 905 -
# 6 Extended offline Interrupted (host reset) 40% 793 -
Selective Self-tests/Logging not supported
Technically it could die at any time in spite of a good reading, but so could a brand new one.
I admit I don't understand SMART data all that well but your RAW_VALUE's are well below most of my drives and they are doing just fine so I'm thinking the drive is likely fine from that perspective.
If your fstab is configured to mount the file system using UUID instead of drive name it will prevent the change of name from sdd to sde interfering with the mount.
I have seen similar issues with driver letter changes when using usb devices that I unplug then immediately plug back in before udev has had a chance to remove the old device name.
You may want to dismount the drive again and rerun fsck with the '-f' (force) option to be sure everything has been cleaned up.
There were a lot of errors in the run you posted, with that large a discrepancy in the free inode and block count. I wonder if there was an issue with power to the device while rsync was running that caused both the rsync error and file system corruption. A momentary blip in power could also account for the device letter change.
Last edited by computersavvy; 02-04-2022 at 10:19 AM.
Thanks for all answers. So do you think (obviously nobody can be sure 100%) it is ok? For power blinking may be, but the system is under an APC UPS and the PSU is a bit over-sized, so I think power is stable.
A fast disconnect and reconnect may be, but it is an headless unit in a room that is not easily accessible so nobody should have touched the device, but...
Should I run a badblock?
Any other checks I could do? I don't trust very much these WD Passport, I had a previous one that broken randomly (but I had reading blocks problems).
What could have caused the errors in dmesg 1 (the pastebin one) from line 220 to end?
This is a short summary
Code:
Buffer I/O error on device sdd1, logical block 774930462
[5617213.337241] Buffer I/O error on device sdd1, logical block 774930463
[5617213.337279] EXT4-fs warning (device sdd1): htree_dirblock_to_tree:1003: inode #89916796: lblock 0: comm rsync: error -5 reading directory block
[5617213.337398] blk_update_request: I/O error, dev sdd, sector 6199445760 op 0x1:(WRITE) flags 0x4000 phys_seg 251 prio class 0
[5617213.337545] blk_update_request: I/O error, dev sdd, sector 6199447808 op 0x1:(WRITE) flags 0x0 phys_seg 6 prio class 0
[5617213.337550] EXT4-fs warning (device sdd1): ext4_end_bio:345: I/O error 10 writing to inode 193726588 starting block 774930982)
[5617213.337565] blk_update_request: I/O error, dev sdd, sector 6199447856 op 0x1:(WRITE) flags 0x4000 phys_seg 255 prio class 0
[5617213.337646] blk_update_request: I/O error, dev sdd, sector 6199449904 op 0x1:(WRITE) flags 0x0 phys_seg 30 prio class 0
[5617213.337652] EXT4-fs warning (device sdd1): ext4_end_bio:345: I/O error 10 writing to inode 193726588 starting block 774931239)
[5617213.337654] EXT4-fs warning (device sdd1): ext4_end_bio:345: I/O error 10 writing to inode 193726588 starting block 774931268)
[5617213.337667] Buffer I/O error on device sdd1, logical block 774930983
[5617213.337672] Buffer I/O error on device sdd1, logical block 774930984
[5617213.337675] Buffer I/O error on device sdd1, logical block 774930985
[5617213.337677] Buffer I/O error on device sdd1, logical block 774930986
[5617213.338623] blk_update_request: I/O error, dev sdd, sector 6199445552 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 0
[5617213.338632] EXT4-fs warning (device sdd1): ext4_end_bio:345: I/O error 10 writing to inode 193727557 starting block 774930695)
[5617213.338722] blk_update_request: I/O error, dev sdd, sector 2712 op 0x1:(WRITE) flags 0x3000 phys_seg 1 prio class 0
[5617213.338729] Buffer I/O error on dev sdd1, logical block 83, lost async page write
[5617213.338739] blk_update_request: I/O error, dev sdd, sector 3136 op 0x1:(WRITE) flags 0x3000 phys_seg 1 prio class 0
[5617213.338743] Buffer I/O error on dev sdd1, logical block 136, lost async page write
[5617213.338760] blk_update_request: I/O error, dev sdd, sector 3160 op 0x1:(WRITE) flags 0x3000 phys_seg 1 prio class 0
[5617213.338765] Buffer I/O error on dev sdd1, logical block 139, lost async page write
[5617213.338772] Buffer I/O error on dev sdd1, logical block 267, lost async page write
[5617213.338791] Buffer I/O error on dev sdd1, logical block 368, lost async page write
[5617213.338796] Buffer I/O error on dev sdd1, logical block 369, lost async page write
[5617213.338802] Buffer I/O error on dev sdd1, logical block 371, lost async page write
[5617213.338818] Buffer I/O error on dev sdd1, logical block 420, lost async page write
[5617213.338826] Buffer I/O error on dev sdd1, logical block 94371970, lost async page write
[5617213.338844] Buffer I/O error on dev sdd1, logical block 94896244, lost async page write
[5617213.339069] Aborting journal on device sdd1-8.
[5617213.339098] JBD2: Error -5 detected when updating journal superblock for sdd1-8.
[5617213.339906] EXT4-fs error (device sdd1): __ext4_find_entry:1534: inode #89916796: comm rsync: reading directory lblock 0
[5617213.339961] EXT4-fs (sdd1): I/O error while writing superblock
I used this search "is it safe to use badblocks on a disk in use" and found several links saying yes. Earlier suggestions as to what you should do are spot on and I concur.
Don't hesitate, DO!
Using the command without writing is one method to test. Then if it shows bad blocks you should repeat it and write the data to tell the disk to avoid those blocks.
I didn't answered yet because I don't have the response. It is still running (it's a 4TB drive). Until now everything is ok
Code:
badblocks -nsv /dev/sdd
Checking for bad blocks in non-destructive read-write mode
From block 0 to 3906984959
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: 92.45% done, 69:15:41 elapsed. (0/0/0 errors)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.