2
1
I am observing strange behavior of smartctl
with two WD Red 3TiB drives inserted in a WD My Book Duo drive enclosure and connected to the computer over USB. Namely, running a test on one of the drives also starts a test on the other drive:
$ blkid /dev/sda /dev/sdb
/dev/sda: UUID="7eca647d-ef1b-c354-3ab2-9c9a364a7303" UUID_SUB="5fca7ab9-2343-ca70-5d25-84739858c883" LABEL="wd:0" TYPE="linux_raid_member"
/dev/sdb: UUID="7eca647d-ef1b-c354-3ab2-9c9a364a7303" UUID_SUB="ef3895d7-ff13-0a89-91b9-a3f01a6744dc" LABEL="wd:0" TYPE="linux_raid_member"
# smartctl -d sat -t short /dev/sda
smartctl 6.6 2016-05-31 r4324 [armv6l-linux-4.9.80+] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 2 minutes for test to complete.
Test will complete after Sun May 6 16:12:07 2018
Use smartctl -X to abort test.
# smartctl -d sat -a /dev/sda
smartctl 6.6 2016-05-31 r4324 [armv6l-linux-4.9.80+] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Red
Device Model: WDC WD30EFRX-68N32N0
Serial Number: WD-WCC7K0HLK0TR
LU WWN Device Id: 5 0014ee 2b9c88d08
Firmware Version: 82.00A82
User Capacity: 3,000,592,982,016 bytes [3.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Form Factor: 3.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-3 T13/2161-D revision 5
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun May 6 16:10:16 2018 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
... snip
Self-test execution status: ( 249) Self-test routine in progress...
90% of test remaining.
... snip
# smartctl -d sat -a /dev/sdb
smartctl 6.6 2016-05-31 r4324 [armv6l-linux-4.9.80+] (local build)
... snip
Self-test execution status: ( 249) Self-test routine in progress...
70% of test remaining.
... snip
This leads me to believe that the drive enclosure intercepts the SMART commands and reports aggregate results for both drives simultaneously. Is there any known way to circumvent this other than getting rid of the drive enclosure?
EDIT: Adding the content of /etc/fstab
, /etc/mdadm/mdadm.conf
, and the output of blkid(8)
as requested in the comments:
$ cat /etc/fstab
proc /proc proc defaults 0 0
PARTUUID=5cb553c4-01 /boot vfat defaults 0 2
PARTUUID=5cb553c4-02 / ext4 defaults,noatime 0 1
/dev/md0 /mnt btrfs relatime,compress,autodefrag 0 0
$ cat /etc/mdadm/mdadm.conf
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# This configuration was auto-generated on Sat, 21 Apr 2018 13:55:00 +0200 by mkconf
ARRAY /dev/md0 metadata=1.2 name=inspiron:0 UUID=7eca647d:ef1bc354:3ab29c9a:364a7303
$ blkid
/dev/mmcblk0p1: LABEL="boot" UUID="5DB0-971B" TYPE="vfat" PARTUUID="5cb553c4-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="060b57a8-62bd-4d48-a471-0d28466d1fbb" TYPE="ext4" PARTUUID="5cb553c4-02"
/dev/sda: UUID="7eca647d-ef1b-c354-3ab2-9c9a364a7303" UUID_SUB="5fca7ab9-2343-ca70-5d25-84739858c883" LABEL="inspiron:0" TYPE="linux_raid_member"
/dev/sdb: UUID="7eca647d-ef1b-c354-3ab2-9c9a364a7303" UUID_SUB="ef3895d7-ff13-0a89-91b9-a3f01a6744dc" LABEL="inspiron:0" TYPE="linux_raid_member"
EDIT2: Adding the content of /proc/devices
as requested in the comments of @harrymc's answer:
$ cat /proc/devices
Character devices:
1 mem
4 /dev/vc/0
4 tty
5 /dev/tty
5 /dev/console
5 /dev/ptmx
5 ttyprintk
7 vcs
10 misc
13 input
14 sound
21 sg
29 fb
116 alsa
128 ptm
136 pts
162 raw
180 usb
189 usb_device
204 ttyAMA
244 bcm2835-gpiomem
245 uio
246 vcsm
247 vchiq
248 hidraw
249 vcio
250 vc-mem
251 bsg
252 watchdog
253 rtc
254 gpiochip
Block devices:
1 ramdisk
259 blkext
7 loop
8 sd
9 md
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
253 device-mapper
254 mdp
Could you include your
/etc/fstab
? Are the disks in a RAID? I wonder if the problem arises because both disks have the same UUID, differing only by UUID_SUB, thus confusing smartctl. I know that one can use tune2fs to assign a new UUID, but I don't know if that is advisable here. – harrymc – 2018-05-11T20:09:39.550I included
/etc/fstab
as requested as well as/etc/mdadm/mdadm.conf
. The disks are in software RAID 1, available as/dev/md0
. The/dev/sda
, and/dev/sdb
devices should correspond to the two physical WD Red drives. – Witiko – 2018-05-11T21:34:22.960I think you are onto something with your UUID, and UUID_SUB remarks, see the output of
blkid
that I added. Could this be the issue? – Witiko – 2018-05-11T21:38:08.950The RAID creates in effect one virtual disk. Try the syntax of
-d sat,1
for slot 1. I'm a bit unclear whether slot numbers start from 0 or 1. – harrymc – 2018-05-12T06:07:45.417I can confirm trouble in enclosures with USB-to-SATA bridges concerning SMART commands: The ATA passthrough command sometimes just doesn't work as expected. The obvious way to find out if it is a RAID artificact, or a USB-to-SATA bridge problem is to temporarily disable the READ and see if submitting SMART commands then works. The
sg3-utils
package may be helpful to test the ATA passthrough command. – dirkt – 2018-05-14T11:52:02.063