Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Oct 2015 18:38:36 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Dino Vliet <dino_vliet@yahoo.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Mounting from ufs:/dev/mirror/gm0s1a failed with error 19
Message-ID:  <alpine.BSF.2.20.1510241829001.71153@wonkity.com>
In-Reply-To: <691088220.1041369.1445717805068.JavaMail.yahoo@mail.yahoo.com>
References:  <691088220.1041369.1445717805068.JavaMail.yahoo@mail.yahoo.com> <691088220.1041369.1445717805068.JavaMail.yahoo@mail.yahoo.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sat, 24 Oct 2015, Dino Vliet via freebsd-questions wrote:

> Dear FreeBSD userlist,2 or 3 years ago I tried to upgrade to freebsd 9.1 through source and as a consequence my gmirrorhas been broken because I ended up with a broken mirror and don't know how to fix it.

It has been running that way for 2 or 3 years?

> Mounting from ufs:/dev/mirror/gm0s1a failed with error 19.
> Loader variables:
>  vfs.root.mountfrom=ufs:/dev/mirror/gm0s1a
>  vfs.root.mountfrom.options=rw
>
> Manual root filesystem specification:
>
>  <fstype>:<device> [options]
>      Mount <device> using filesystem <fstype>
>      and with the specified (optional) option list.
>
>    eg. ufs:/dev/da0s1a
>        zfs:tank
>        cd9660:/dev/acd0 ro
>          (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /)
>
>  ?               List valid disk boot devices
>  .               Yield 1 second (for background tasks)
>  <empty line>    Abort manual input
>
> I found this on internet:
> gmirror broken after upgrade | The FreeBSD Forums
>
> And at the loader prompt I did this:
>
> set kern.geom.part.check_integrity=0
> boot
>
> And was able to boot but where I'm stuck is that according to that link I should redo the mirror according to this 18.3. RAID1 - Mirroring but how do I proceed exactly if I don't want to loose my data?
>
> So where do I start exactly?

First, make a full backup.  Test it.  Do not skip this step.

Then, create a new mirror on a new drive (or two drives) as shown in the 
Handbook.  Give the new mirror a different name, do not reuse the old 
name.

Use dump/restore to copy the data from the old drive onto the new 
mirror.  Adjust /etc/fstab on the new mirror to boot from the new label 
or device name.

Shut down.  Remove the old drive, putting it someplace safe to act as 
another backup.

Boot from the new mirror.

This is what the Handbook procedure shows.  If you are concerned about 
the procedure, test it on a non-critical machine first.
From owner-freebsd-questions@freebsd.org  Sun Oct 25 10:42:47 2015
Return-Path: <owner-freebsd-questions@freebsd.org>
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 F21FA8AD0
 for <freebsd-questions@mailman.ysv.freebsd.org>;
 Sun, 25 Oct 2015 10:42:47 +0000 (UTC)
 (envelope-from niklaas@kulturflatrate.net)
Received: from mail2.kulturflatrate.net (mail2.kulturflatrate.net
 [IPv6:2a01:4f8:121:52ad::3:1])
 by mx1.freebsd.org (Postfix) with ESMTP id B78991EC1
 for <freebsd-questions@freebsd.org>; Sun, 25 Oct 2015 10:42:47 +0000 (UTC)
 (envelope-from niklaas@kulturflatrate.net)
Received: from [10.0.0.38] (mail.kulturflatrate.net
 [IPv6:2a01:488:66:1000:2ea3:77dd:0:1])
 (Authenticated sender: niklaas@kulturflatrate.net)
 by mail2.kulturflatrate.net (Postfix) with ESMTPSA id 193DCFE56
 for <freebsd-questions@freebsd.org>; Sun, 25 Oct 2015 11:42:45 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kulturflatrate.net;
 s=default; t=1445769765;
 bh=ha8QBLQIwbIqw6R2KJYh6dYEz/EY9rc0baNXH4CuHf0=;
 h=To:From:Subject:Date;
 b=Kg9lW6119WpDX/ehcmiuIF8gNdGg9X/yj2lKVw+jx+c/xv4OmXhmHLa0aHM9Kf+U4
 6UdRw7GK2ThAYxOdgHA0KguYhRG3ozLBlaDc4EoVz6LdqntwACerixoHsgTwKJs28+
 jQY4DMAI4GBgvIOjA7hGr57no9eSF7YQVwdBzmNI=
To: FreeBSD Questions <freebsd-questions@freebsd.org>
From: Niklaas Baudet von Gersdorff <niklaas@kulturflatrate.net>
Subject: cd /.zfs/snapshot hangs (tmux put to uninterruptible sleep)
X-Enigmail-Draft-Status: N1110
Message-ID: <562CB2C2.6090402@kulturflatrate.net>
Date: Sun, 25 Oct 2015 11:45:22 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.3.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Oct 2015 10:42:48 -0000

When I cd into /.zfs/.snapshot the shell hangs. I must confess, there
are a lot of snapshots because I never thought this may cause a problem.
Maybe it does now.

$ zfs list -t snapshot | wc -l
    1316

These are hourly, daily, weekly backups. I keep them for some time but
delete old ones. They accumulate because I have several jails with a
independent datasets on the system. (In case someone wonders why there
are that much.)

Nonetheless, there are not that much snapshots on the tank/root dataset
that is mounted to /.

$ zfs list -t snapshot | grep tank/root | wc -l
     174

So a `cd /.zfs/snapshot` should only list 174.

Why am I not able to see the output of `cd /.zfs/snapshot`? Did I reach
the limit of possible snapshots?

Related to this problem: I ran the command in a tmux session that is now
freezed.

> $ ps -lJ 0 | grep 'tmux: server'
>  1001 21018     1   0  20   0 42396 19432 zfs      Ds    -       0:55.71 tmux: server (/tmp/tmux-1001/default) (
>  1001 86447 85718   0  20   0 18808  2236 piperd   S+   20       0:00.00 grep tmux: server

`kill -9 21018` doesn't kill the process. I cannot return to tmux with
`tmux a` either.

Any help is very much appreciated.

Best,

-- 
Niklaas



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1510241829001.71153>