From owner-freebsd-questions@freebsd.org Sun Jan 6 23:27:18 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 697EA149ED0A for ; Sun, 6 Jan 2019 23:27:18 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF93F963D7 for ; Sun, 6 Jan 2019 23:27:16 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.193.226.69]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPA (Nemesis) id 1Mbj7g-1hI55L3Igo-00dGfv; Mon, 07 Jan 2019 00:27:13 +0100 Date: Mon, 7 Jan 2019 00:27:13 +0100 From: Polytropon To: Manish Jain Cc: FreeBSD Questions Subject: Re: What smartctl command to use to verify if disk is okay or failing ? Message-Id: <20190107002713.5f920a9c.freebsd@edvax.de> In-Reply-To: <613aefd600422ad976a4cf44a96b4977fa2937a3.camel@yandex.com> References: <613aefd600422ad976a4cf44a96b4977fa2937a3.camel@yandex.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:hHnB1NBtAShkWddlQHSXRQhieC7LiST3sQYVjBbq26FBf/iWNGv MWTrsgsi1mt6MFGNy6M2prQ4Rzd9UhXoQ145Pg7ivKdC7MicWjTFDvWXezuEt/doR5p8JHg Eq+IuvNG3RMXFF87BF1N5uZOaZGG+Gv+ImIx0qF7ND4R8k9OQuHD1Q3eAwbRTk7HW08YjJm /t7QZHuqXtrRa1sj9abvA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:WR2HRIiW84Q=:MnZcpAeA6sfYrEy0WbRzdF QoZLcrzHBMfVlJrpOmt/eM0Ch/ro8KRCENsmeQPmpiLeFTZZPusV+D84XvrjfI1jfs4/V3RKz Q6MQ2cUT4yH9zCt/LKlVCFJHEEZb2gjLVYX3gzruDdvVVTWkaaFAVF+Vl2+AeMzRCFOas/qEJ drFMQjLNrCSQvr1i6AdoFlzOHOKkuRXqaG4EihSBCH0wZ+p/s36T5iSf+e0Ybg0k7OCa0C9Ed pufW2bFBBU5GX1TFxJL5lvxD5Jv6ZKMnF4QxENw5WM4DspRbwudOVcZtNL6o6J2dMqNGSoanF Y/G2QAlgSph1cwuRNyG+iOlnqjTk5/pz+o2Qxx1vACRxBk17oGhmaZSeluhNiMrbZZit7PfER 7qEEg+9Fcz1TRAqXPXqJWdRNOFwHXDeWc8smlNRZnuSLb3NOXr6j7VevmIzh66RZMW8DVzoKm Qy+isOBy2cqYU8d/T2P/CS6AHVbqEVyCCJdtwmkUr8sBS6V7tLh4FlsqFQeGEerZmU8SeT3PE KrbeX2GcBsFJV7wIdiI5Scp4PVDvvc4l23nphUB9d+eqmB4iwSPPNRx/b4zpFJAqwY4YK+8BJ svNgcrRw8ZLoIBs/yyFnOyFv1qstcdEP5KPJslnq/GXCHx8wLTELAyWeOCDUkOdIKllpQgF7H wr0db7UwsNtzSiVMNORuQJU4v4giEj0ecVw5c6F7WUj+1ecjVukKlaOmmZ+IjoGv6UTqt/DCU W8NNbW87gTNHLEeeDwzVGIRntXYhkJ2r7d6DpuF1GGEXXnuMbx9vnvCreak= X-Rspamd-Queue-Id: DF93F963D7 X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [5.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: mx01.schlund.de]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[yandex.com]; RECEIVED_SPAMHAUS_PBL(0.00)[69.226.193.92.zen.spamhaus.org : 127.0.0.10]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.47)[0.469,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.70)[0.705,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.94)[0.939,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[24.17.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.09)[ipnet: 212.227.0.0/16(-0.51), asn: 8560(0.99), country: DE(-0.01)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 23:27:18 -0000 On Mon, 07 Jan 2019 04:37:29 +0530, Manish Jain wrote: > Yesterday I saw an AHCI/CAM error on my SATA SSD on the console, and I > am a bit worried whether the disk (ada0) is failing. AHCI/CAM could also indicate a problem with the controller the disk is attached to. > I installed smartmontools and enabled smartd in rc.conf. But I am > unable to figure out the command to utilise for reliably testing the > state of /dev/ada0 (Samsung EVO 850; SMART enabled). > > If anyone could tell me the right command to go through a good test > (preferably with a log file generated), it would be much appreciated. You can initiate such a test with the smartctl command. There are many examples in the EXAMPLES section of "man smartctl". For example, to read current information, use: # smartctl -a /dev/ada0 To start a unit self-test ("long test"), use: # smartctl -t long /dev/ada0 There are various other kinds of tests smartctl can inititate. It's also possible to automate such tasks for the continuous surveillance of a drive; see "man smartd" for details. On Linux, there's also a GUI tool for interacting with smartctl, it's called GSmartCtl, if I remember correctly. Maybe this tool is also available in FreeBSD ports? -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...