All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Chmielewski <mangoo@wpkg.org>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Any chance to recovery btrfs raid-0 after accidental format of one volume?
Date: Tue, 06 Sep 2011 08:24:32 +0200	[thread overview]
Message-ID: <4E65BCA0.40109@wpkg.org> (raw)

> Bad case of user error here but I managed to reformat one half of a
> btrfs volume that was set up with metadata raid-1 and data raid-0.

It won't help you - but did you format it with mkfs.btrfs, while it was mounted?

mkfs.btrfs behaves very dangerously here.


For example, we have a block device in use:

# cat /proc/swaps 
Filename				Type		Size	Used	Priority
/dev/md0                                partition	10233276	0	-1


mkfs for other filesystems will refuse to touch it, because it's in use:

# mkfs.ext4 /dev/md0
mke2fs 1.41.14 (22-Dec-2010)
/dev/md0 is mounted; will not make a filesystem here!

# mkfs.xfs /dev/md0
mkfs.xfs: cannot open /dev/md0: Device or resource busy




mkfs.btrfs doesn't see a problem in creating a filesystem on a mounted block device:

# mkfs.btrfs /dev/md0

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

fs created label (null) on /dev/md0
	nodesize 4096 leafsize 4096 sectorsize 4096 size 9.76GB
Btrfs Btrfs v0.19



-- 
Tomasz Chmielewski
http://wpkg.org


             reply	other threads:[~2011-09-06  6:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-06  6:24 Tomasz Chmielewski [this message]
     [not found] <CAKdoYmDNjBDgHjLNaf5HmrRxGkYPXjssZoGa3Tb4p3uc2DcOcg@mail.gmail.com>
2011-09-05 21:56 ` Any chance to recovery btrfs raid-0 after accidental format of one volume? Dante
2011-09-06 23:00   ` Dante
2011-09-06 23:12     ` Hugo Mills

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=4E65BCA0.40109@wpkg.org \
    --to=mangoo@wpkg.org \
    --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.