Tomasz Chmielewski
2011-Sep-06 06:24 UTC
Re: Any chance to recovery btrfs raid-0 after accidental format of one volume?
> 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 -- 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