UseCases

From btrfs Wiki
(Difference between revisions)
Jump to: navigation, search
(Replaced content with 'This page is blank')
Line 1: Line 1:
There have been quite a few questions about how to accomplish ZFS tasks in Btrfs, as well as just generic "How do I do X in Btrfs?".  This page aims to answer those questions.  Simply add your question to the "Use Case" section of the table.
+
This page is blank
 
+
{|border="1"
+
|-
+
!Use Case
+
!How to do it in Btrfs
+
|-
+
| How do I create a RAID1 mirror in Btrfs?
+
|mkfs.btrfs -m RAID1 -d RAID1 /dev/sda1 /dev/sdb1
+
|-
+
| How do I create a RAID10 striped mirror in Btrfs?
+
|mkfs.btrfs -m RAID10 -d RAID10 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
+
|-
+
|I want to be able to do rollbacks with Btrfs
+
|If you use yum you can install the yum-plugin-fs-snapshot plugin and it will take a snapshot before doing any yum transaction.  You can also take a snapshot manually by running
+
 
+
btrfs subvolume snapshot /path/to/subvolume /path/to/subvolume/snapshot_name
+
 
+
then if something goes wrong you can either mount using the mount option subvol=<snapshot name> or the subvolid=<id> option.  You can determine the ID of a snapshot by running
+
 
+
btrfs subvolume list /path/to/subvolume
+
 
+
If you wish to default to mounting from the rollback snapshot you can run either
+
 
+
btrfs subvolume set-default <id>
+
 
+
using the subvolume ID, or alternatively if you already have the snapshot mounted, you can run
+
 
+
btrfs subvolume set-default /path/to/snapshot
+
|}
+
[[Category:Documentation]]
+

Revision as of 21:04, 18 October 2010

This page is blank

Personal tools