From nobody Sat Apr 15 19:25:07 2023 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PzNZB0HLyz44vb8 for ; Sat, 15 Apr 2023 19:25:22 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PzNZ93f9Cz3Dvl for ; Sat, 15 Apr 2023 19:25:21 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 33FJP7hO001695; Sat, 15 Apr 2023 13:25:08 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: Date: Sat, 15 Apr 2023 12:25:07 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Reply-To: freebsd@dreamchaser.org Subject: Re: frequent disk error, need guidance Content-Language: en-US To: Polytropon Cc: FreeBSD Mailing List References: <20230415073315.7adfdddd.freebsd@edvax.de> From: Gary Aitken In-Reply-To: <20230415073315.7adfdddd.freebsd@edvax.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Sat, 15 Apr 2023 13:25:08 -0600 (MDT) X-Rspamd-Queue-Id: 4PzNZ93f9Cz3Dvl X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/14/23 22:33, Polytropon wrote: > On Fri, 14 Apr 2023 20:53:05 -0700, Gary Aitken wrote: >> I'm seeing a boatload of the same error: >> (ada0:ata2:0:0:0): READ_DMA. ACB: c8 00 e2 c7 73 41 00 00 00 00 40 00 >> (ada0:ata2:0:0:0): CAM status: ATA Status Error >> (ada0:ata2:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 40 (UNC ) >> (ada0:ata2:0:0:0): RES: 51 40 e7 c7 73 01 01 00 00 00 00 >> (ada0:ata2:0:0:0): Retrying command, 3 more tries remain >> repeated, with occasional: >> g_vfs_done():ada0p2[READ(offset=12474351616, length=32768)]error = 5 ... >> # smartctl --test=long /dev/ada0 >> # smartctl --log=selftest /dev/ada0 >> Num Test_Description Remaining LBA_of_1st_error >> Status LifeTime(hours) >> >> # 1 Extended offline Completed: read failure 90% 7482 24365031 >> # 2 Short offline Completed: read failure 90% 7482 24365031 >> # 3 Short offline Completed: read failure 90% 7482 24365031 >> # 4 Short offline Completed without error 00% 0 - >> >> So I presume a bad block/sector on the disk. > > Probably too many bad blocks. The disks's firmware will > remap defective blocks to spare ones, and as soon as you > receive errors on OS level, it ran out of spare blocks. > This means it is not the beginning of a problem, but > the problem now is significant, and the disk probably > has arrived its end of life. > > There is another option: Check all cables. Power to > be sure, but data is most important. In worst case, > try replacing the data cable. Check that it sits > as inteded on both sides. Yes - sometimes it is > that simple. ;-) Thanks all who responded. Replaced the cable and retried, no change. Used different port with new cable, no change. Brought up, tested (smartctl --test=long), set up a new disk. Having never actually done this (I've always installed a newer version of fbsd in such cases), wanted to see if the following is a good way to copy the old disk to the new one. mount /dev/ada1p2 /mnt/newsys cd /mnt/newsys dump -0 -f - /dev/ada0p2 | restore -r -Dv -f - However... this is a running system, which seems unlikely to produce a consistent result. There are only 2 sata slots on the mobo, so I can't mount a third system, although I might be able to build a memstick and use that. Can I reboot in a read-only manner and do the above? Never done that, not sure what's involved. Is single-user mode sufficient? Thanks, Gary