From owner-freebsd-fs@freebsd.org Tue Jul 18 19:13:28 2017 Return-Path: Delivered-To: freebsd-fs@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 2719FD9DFD5 for ; Tue, 18 Jul 2017 19:13:28 +0000 (UTC) (envelope-from tarkhil@webmail.sub.ru) Received: from mail.sub.ru (mail.sub.ru [88.212.205.2]) by mx1.freebsd.org (Postfix) with SMTP id 7CA21809DC for ; Tue, 18 Jul 2017 19:13:26 +0000 (UTC) (envelope-from tarkhil@webmail.sub.ru) Received: (qmail 58749 invoked from network); 18 Jul 2017 22:13:18 +0300 Received: from 128-68-38-94.broadband.corbina.ru (128-68-38-94.broadband.corbina.ru [128.68.38.94]) by mail.sub.ru ([88.212.205.2]) with ESMTP via TCP; 31 Dec 1969 23:59:59 -0000 Subject: Re: How can I recover data from a faulted pool? To: freebsd-fs@freebsd.org References: <7e3d874e-e051-1169-2111-b8f2549f89ee@webmail.sub.ru> From: =?UTF-8?B?0JDQu9C10LrRgdCw0L3QtNGAINCf0L7QstC+0LvQvtGG0LrQuNC5?= Message-ID: Date: Tue, 18 Jul 2017 22:13:19 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: ru X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 19:13:28 -0000 Everything is fine. The problem was in mounting order, so I did not see files. And I could not think properly because of tooth pain)) 15.07.2017 16:52, Volodymyr Kostyrko пишет: > Александр Поволоцкий wrote: >> Hello >> >> FreeBSD 10.3. ZFS. >> >> # zpool status >> pool: database >> state: UNAVAIL >> status: One or more devices are faulted in response to persistent >> errors. There are insufficient replicas for the pool to >> continue functioning. >> action: Destroy and re-create the pool from a backup source. Manually >> marking the device >> repaired using 'zpool clear' may allow some data to be >> recovered. >> scan: none requested >> config: >> >> NAME STATE READ WRITE CKSUM >> database UNAVAIL 0 0 0 >> mirror-0 UNAVAIL 0 0 0 >> gpt/database0 FAULTED 0 0 0 too many errors >> gpt/database1 FAULTED 0 0 0 too many errors >> >> disks can be read, can I somehow recover data from the pool? > > For sure... First please describe what happened to both disks and what > hardware you were using (chipset/controller). Please don't try to > `zpool clear` yet. > > 1. ZFS *HEAVILY* relies on hardware to be stable, any hardware > glitches may result in severe pool corruption. If you have any doubts > in hardware first move the disks to the trusted box. > > 2. I assume both mirror parts were on different disks? ZFS doesn't > like pools that have more then one chunk on any drive. > > 3. Try mounting pool R/O with transaction recovery. While this is > mirror please do this for both disks and give it another try for > single disks as results may differ: > > `zpool import -N -O readonly=on -f -R /mnt/somezpoool …` > > You can use mfsBSD for that. > > If that doesn't help try: > > `zpool import -N -O readonly=on -f -R /mnt/somezpoool -Fn …` > > Both commands will try to import the pool without mounting file > systems in r/o mode. If that would work, try mounting only required > filesystem and copy some data from it. > > Please post your results. >