From: Anand Jain <anand.jain@oracle.com>
To: Florian Uekermann <florian@uekermann.me>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Device only missing if unmounted
Date: Wed, 10 Dec 2014 10:46:19 +0800 [thread overview]
Message-ID: <5487B3FB.4070109@oracle.com> (raw)
In-Reply-To: <708100218.650154.1418123709778.JavaMail.open-xchange@omgreatgod.store>
On 09/12/2014 19:15, Florian Uekermann wrote:
> I am using a few disks in Raid1 mode. This is the output of various
> commands in unmounted state.
>
> root@oot:/# uname -a
> Linux oot 3.18.0-rc5+ #1 SMP Sun Nov 23 18:01:56 CET 2014 x86_64 GNU/Linux
> root@oot:/# btrfs --version
> Btrfs v3.17
> root@oot:/# btrfs fi show
> Label: none uuid: be2b3499-7452-4b91-b664-4ec4d7ff62b9
> Total devices 3 FS bytes used 149.68GiB
> devid 2 size 465.76GiB used 151.03GiB path /dev/sdb
> devid 3 size 465.76GiB used 151.03GiB path /dev/sda
> devid 4 size 92.26GiB used 0.00B path /dev/sdc4
>
> Btrfs v3.17
> root@oot:/# btrfs fi df /srv/storage/
> Data, RAID1: total=150.00GiB, used=149.40GiB
> System, RAID1: total=32.00MiB, used=48.00KiB
> Metadata, RAID1: total=1.00GiB, used=287.42MiB
> GlobalReserve, single: total=96.00MiB, used=0.00B
>
> I stripped a few lines from the output of btrfs fi show, which
> describe other filesystems.
> If I unmount the devices in question, I get the following
> output (note that missing devices are reported now):
>
> root@oot:/# btrfs fi show
> Label: none uuid: be2b3499-7452-4b91-b664-4ec4d7ff62b9
> Total devices 4 FS bytes used 149.68GiB
> devid 2 size 465.76GiB used 151.03GiB path /dev/sdb
> devid 3 size 465.76GiB used 151.03GiB path /dev/sda
> devid 4 size 92.26GiB used 0.00B path /dev/sdc4
> *** Some devices missing
>
> Btrfs v3.17
>
> I got into this state by removing a device from the array formatting it
> and then adding it again (some time ago, I can't remember the exact
> sequence of commands)
above you mention both btrfs fi show outputs in unmounted only.
It depends on the disk that is read first, you could read super block
using btrfs-show-super and check if num_device.
> The discrepancy in output between mounted and unmounted state is not
> a problem in itself for me, but this issue seems to interrupt systemds
> boot sequence, which only continues successfully if I mount the array manually.
> The array is not degraded, I just removed a drive (via btrfs delete I think).
It may fail if you are mounting more than one subvol during boot and if
you don't have this patch.
commit 0f23ae74f589304bf33233f85737f4fd368549eb
Author: Chris Mason <clm@fb.com>
Date: Thu Sep 18 07:49:05 2014 -0700
Revert "Btrfs: device_list_add() should not update list when mounted"
This reverts commit b96de000bc8bc9688b3a2abea4332bd57648a49f.
> If I try to remove the "missing devices" with the btrfs tool the following
> happens:
>
> btrfs dev del missing /srv/storage
> ERROR: error removing the device 'missing' - no missing devices found to remove
that means you don't see missing when mounted. if you don't see
missing when mounted then no need to run delete missing. ?
> btrfs balance start /srv/storage/ does not solve the issue.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2014-12-10 2:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 11:15 Device only missing if unmounted Florian Uekermann
2014-12-10 2:46 ` Anand Jain [this message]
2014-12-13 14:24 ` Florian Uekermann
2014-12-18 0:56 ` Anand Jain
[not found] ` <1184043001.122994.1419096721838.JavaMail.open-xchange@ptangptang.store>
2014-12-24 15:45 ` Anand Jain
-- strict thread matches above, loose matches on Subject: below --
2015-01-11 15:49 Florian Uekermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5487B3FB.4070109@oracle.com \
--to=anand.jain@oracle.com \
--cc=florian@uekermann.me \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.