From owner-freebsd-questions@freebsd.org Tue Jan 7 12:02:47 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E7341D840B for ; Tue, 7 Jan 2020 12:02:47 +0000 (UTC) (envelope-from mdasyg@ieee.org) Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47sWGZ0w46z4485 for ; Tue, 7 Jan 2020 12:02:45 +0000 (UTC) (envelope-from mdasyg@ieee.org) Received: by mail-ot1-x32b.google.com with SMTP id a15so76129235otf.1 for ; Tue, 07 Jan 2020 04:02:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=ixmexBKMQcDLahJq5zlWOUYqn5wsLS5JyMlOeFHRKtE=; b=P6pExFKcxAQ9cHVDTD10EYD2NIjKAp/1ybB4qkBiQfJU6P3DKmnKZtnvpxbGlbW4HB Q0/48bFa54hwqj6BwT/9ofMEDvli5lzQJT2sip2hIa80g+G4y9wXFweckFDPqf6fXyzs 21DGzrEBSvAs80FvNAXpGHUqmmvO/w/T10hso= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ixmexBKMQcDLahJq5zlWOUYqn5wsLS5JyMlOeFHRKtE=; b=CZVERWqkRGHEqxFluHFU8yca7R7gZdazr3X5sLplLQp5TicLPAua/fTRfvtf+Gv2W1 QXTe+gW4542RJv1Bbf5X/QSSBTuGtakCwnU2T3QOaP95niJDRhgHZzwd4ktzcawa5D+A oI5Aysmtt5QUqiGa0Eo5fwoBb2zQ8SonMcDMTObmBn4AHf9DmesYrgje6ZJAXHQcLKRg vmDvHfLYxS4EELjoIvtZ1X1o33FopFm0+iX6N6n5F/H9sIaxN2t4PZM9cVTUe3676uFT kFabVK5HSkvIcG/iV4+JZCkReLUkiLm3/KJvtArd6c4Jp5qG7e3mmZCEyrNWdQo9UrzS xyeQ== X-Gm-Message-State: APjAAAXfobjpydg4RW1ft3mnw4XxHnRFlhmlvoTe/KWfCYosemRgJZHH e8r/xM99GfBU5udzAqrXi1MjGSOaZGPcs38u9J1QlZlQwAM= X-Google-Smtp-Source: APXvYqzzG7P3ovv0YHroh8ryecCT//ASV40zA6dReaTbjDXM8mgWVTsiufevKk/4gwRp82TgpmWviNL2iYK8pm6XN9s= X-Received: by 2002:a05:6830:9a:: with SMTP id a26mr112771401oto.131.1578398564585; Tue, 07 Jan 2020 04:02:44 -0800 (PST) MIME-Version: 1.0 From: Minas Dasygenis Date: Tue, 7 Jan 2020 14:02:33 +0200 Message-ID: Subject: New Tool: Map bad blocks g_vfs or smartmon LBA_of_first_error to files To: freebsd-questions@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 47sWGZ0w46z4485 X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ieee.org header.s=google header.b=P6pExFKc; dmarc=pass (policy=none) header.from=ieee.org; spf=pass (mx1.freebsd.org: domain of mdasyg@ieee.org designates 2607:f8b0:4864:20::32b as permitted sender) smtp.mailfrom=mdasyg@ieee.org X-Spamd-Result: default: False [-7.42 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[ieee.org:s=google]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_MED(-2.00)[ieee.org.dwl.dnswl.org : 127.0.9.2]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; DKIM_TRACE(0.00)[ieee.org:+]; DMARC_POLICY_ALLOW(-0.50)[ieee.org,none]; RCVD_IN_DNSWL_NONE(0.00)[b.2.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.42)[ip: (-8.06), ipnet: 2607:f8b0::/32(-2.12), asn: 15169(-1.85), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] 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: Tue, 07 Jan 2020 12:02:47 -0000 Dear all, I am releasing a tool that I have created for my FreeBSD servers, that can check /var/log/messages and smartctl output and locate automatically the file that carries the bad sector (if there is). Many times I needed a tool like this when I was a novice FreeBSD user, and I was not able to find it. Only some expert tips on using a plethora of tools, but a complete example was missing. So I decided to contribute to FreeBSD. It is written in pure sh. Feel free to send me patches to post them. It has been tested in some of the FreeBSD 12 servers that I administer. It is located at the link http://arch.ece.uowm.gr/mdasyg/misc/hard_disk_locate_bad_sector_from_vfs_smartctl.sh in my page http://arch.ece.uowm.gr/mdasyg/mdmiscellaneous.php --- Dr. Minas Dasygenis Electrical and Computer Engineer