From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: List missing files on a degraded read-only btrfs mount
Date: Sun, 6 Mar 2016 06:52:49 +0000 (UTC) [thread overview]
Message-ID: <pan$a8a36$df557ab$65c7500c$8abb0a5b@cox.net> (raw)
In-Reply-To: CAJ5gi5+xZgHd7Bgpo1RzF=e1okyseibadvAUDDjCqiX2QsWbsA@mail.gmail.com
Justin Madru posted on Sat, 05 Mar 2016 12:32:31 -0800 as excerpted:
> I have a btrfs filesystem spanning 3 drives. The metadata is using raid1
> (mirroring), but the data is using single, so no mirroring or parity
> just spanning. For example:
>
> mkfs.btrfs -m raid1 -d single /dev/sda /dev/sdb /dev/sdc
>
> One of the drives, /dev/sdb, had a hardware failure before I could
> replace it. I'm able to mount the filesystem in read-only using:
>
> mount -o degraded,ro /dev/sda /mnt/data
>
> But how do I list the files that were on the failed drive?
I don't believe there's a simple, admin-level command, to list only the
files that happened to be on a particular drive.
What you /can/ do is just do a global copy to somewhere else, and
unaffected files will copy, while affected ones will fail.
The other alternative is to use btrfs restore on the unmounted
filesystem, restoring the files that are possible to some other
location. Note that by default, the restored files will be written as
root, using umask, with symlinks skipped, but on reasonably recent btrfs-
progs, restore has options that allow you to restore metadata such as
ownership/perms/times, and symlinks, if you wish.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
prev parent reply other threads:[~2016-03-06 6:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-05 20:32 List missing files on a degraded read-only btrfs mount Justin Madru
2016-03-06 6:52 ` Duncan [this message]
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='pan$a8a36$df557ab$65c7500c$8abb0a5b@cox.net' \
--to=1i5t5.duncan@cox.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).