From owner-freebsd-questions@freebsd.org Tue Apr 11 22:47:17 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17072D3AB1D for ; Tue, 11 Apr 2017 22:47:17 +0000 (UTC) (envelope-from jason@barnesos.net) Received: from barnesos.net (barnesos.net [67.52.219.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F106C108D for ; Tue, 11 Apr 2017 22:47:15 +0000 (UTC) (envelope-from jason@barnesos.net) Received: by barnesos.net (Postfix, from userid 1002) id 5BE443BA5; Tue, 11 Apr 2017 15:38:06 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by barnesos.net (Postfix) with ESMTP id 3F6823BA4 for ; Tue, 11 Apr 2017 15:38:06 -0700 (PDT) Date: Tue, 11 Apr 2017 15:38:06 -0700 (PDT) From: "Jason W. Barnes" X-X-Sender: jbarnes@oom9.barnesos.net To: freebsd-questions@freebsd.org Subject: ZFS kernel panic after power outage Message-ID: User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 22:47:17 -0000 FreeBSDers: After a recent power outage here I have run into trouble whenever I try to mount, or export, or list, or do anything at all to one of my ZFS file systems (see attached image). It instantly goes all "panic: solaris assert: rs == NULL". This is my data drive, not my system drive, so I commented out "zfs_enable=YES" in my rc.conf and it will now boot up after I set the system drive readonly to "off". But I'd like to now try to recover the damaged file system on those drives. The only think that I can think of, and hope for, at this point might be to start unplugging one of this three-drive RAID-5 at a time to see if that might cleanse the RAID of something that might have been in mid-write when the power went out. Or that could metastasize the cancer. Which would be bad. I've seen occasional posts in the past with similar issues, but without any firm solutions, so I thought that I'd ask if anyone has any insights as to how I might attempt to recover this drive. Thanks in advance if you have any ideas, - Jason From owner-freebsd-questions@freebsd.org Tue Apr 11 23:41:58 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFCB5D3AAB4 for ; Tue, 11 Apr 2017 23:41:58 +0000 (UTC) (envelope-from karly@kipshouse.net) Received: from mgmt.ironboy.kipshouse.net (ironboy.kipshouse.net [IPv6:2001:470:835a:4242::42]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (Client CN "mx.kipshouse.net", Issuer "Starfield Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 65DFBBAA for ; Tue, 11 Apr 2017 23:41:58 +0000 (UTC) (envelope-from karly@kipshouse.net) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kipshouse.org; i=@kipshouse.org; q=dns/txt; s=kh-ss; t=1491954119; x=1523490119; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; z=Date:=20Tue,=2011=20Apr=202017=2016:14:07=20-0700|From: =20Karl=20Young=20|To:=20Anton=20Yuz haninov=20|Cc:=20freebsd-questions@ freebsd.org|Subject:=20Re:=20awk,=20swap=20elements=20A =20and=20B,=20pipe=20a=20command=20in=20place=20of=20an =20element|Message-ID:=20<20170411231407.GZ2787@mailboy.k ipshouse.net>|References:=20=0D=0A=20|MIME-Version: =201.0|In-Reply-To:=20; bh=PG4I49walNqWLxIzXWyHAGPzyWybllqo91jtUdbb7qk=; b=X9oWOOFRbeb+OGfpHP5mA15jR/q6zyqONfFA7gtnZKavA3H74/mMgpDe daN1hNjsk0+pd+ZZ0xj4bLkUYF3dwzKVlPMZ35PbtP6zmGlTou0ccNPKI u0YbjzRbTtG/3n05dv2iTTiKRCqnYNDpyjvbjkJjtNxkd3M1O5D0e2qbS I3znQ9WNARae3HZhYBcdPptENU+UnGuJGcIuPTvCFcG5jxLiRic9+kxQh DY+C4Pb+CYm77w0jh7NdeKuK5KsQHcK9JMjyq+Q72k8b0L8RVS/VSNjRr Fu7CC16qmUSxKtz2fcn+S2D2b4ZfkBzk6mHS32gkEUjCxgmZ9oo7oB7Tw Q==; Authentication-Results: d2.ironport.kipshouse.net; dkim=none (message not signed) header.i=none; spf=None smtp.pra=karly@kipshouse.org; spf=None smtp.mailfrom=karly@kipshouse.net; spf=None smtp.helo=postmaster@mailboy.kipshouse.net Received-SPF: None (d2.ironport.kipshouse.net: no sender authenticity information available from domain of karly@kipshouse.org) identity=pra; client-ip=2001:470:835a:1010::26; receiver=d2.ironport.kipshouse.net; envelope-from="karly@kipshouse.net"; x-sender="karly@kipshouse.org"; x-conformance=sidf_compatible Received-SPF: None (d2.ironport.kipshouse.net: no sender authenticity information available from domain of karly@kipshouse.net) identity=mailfrom; client-ip=2001:470:835a:1010::26; receiver=d2.ironport.kipshouse.net; envelope-from="karly@kipshouse.net"; x-sender="karly@kipshouse.net"; x-conformance=sidf_compatible Received-SPF: None (d2.ironport.kipshouse.net: no sender authenticity information available from domain of postmaster@mailboy.kipshouse.net) identity=helo; client-ip=2001:470:835a:1010::26; receiver=d2.ironport.kipshouse.net; envelope-from="karly@kipshouse.net"; x-sender="postmaster@mailboy.kipshouse.net"; x-conformance=sidf_compatible X-SBRS: None X-MID: 243226 X-RemoteIP: 2001:470:835a:1010::26 X-RemoteHost: 2001:470:835a:1010::26, mailboypriv.kipshouse.net X-IronPort-AV: E=McAfee;i="5800,7501,8495"; a="243226" Received: from mailboypriv.kipshouse.net (HELO mailboy.kipshouse.net) ([IPv6:2001:470:835a:1010::26]) by d2.ironport.kipshouse.net with ESMTP; 11 Apr 2017 16:41:57 -0700 Received: by mailboy.kipshouse.net (Postfix, from userid 500) id DD69043B3C; Tue, 11 Apr 2017 16:14:07 -0700 (PDT) Date: Tue, 11 Apr 2017 16:14:07 -0700 From: Karl Young To: Anton Yuzhaninov Cc: freebsd-questions@freebsd.org Subject: Re: awk, swap elements A and B, pipe a command in place of an element Message-ID: <20170411231407.GZ2787@mailboy.kipshouse.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Arbitrary-Number-Of-The-Day: 42 X-URL: http://www.kipshouse.org/karly X-Work-URL: http://www.cisco.com/ X-Disclaimer: My opinions do not necessarily represent those of my employer. User-Agent: Mutt/1.5.20 (2009-12-10) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 23:41:58 -0000 Anton Yuzhaninov(citrin+bsd@citrin.ru)@2017.04.11 17:18:47 -0400: > On 04/11/17 16:19, Antonio Olivares wrote: > > However if we have 3 elements, namely a > > > > TimeStamp Home Away > > 1 2 3 > > > > We can swap 2 and 3 with above code. However I want to format $1 with > > date -r "$i" "+%a %b %d %Y %I:%M %p" and then swap $2 and $3. With > > regular BSD awk strftime command is not available. We can use for > > command to format the timestamp > > echo "1491945088 x y" | awk '{ system("date -r "$1" \"+%a %b %d %Y %I:%M > %p\" | tr -d \"\n\""); print " "$3" "$2}' > Tue Apr 11 2017 05:11 PM y x > Heh heh. Perl has no lock on TMTOWTDI > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"