Subvolumes / Snapshots


# cd /mnt/VB0250EAVER
# btrfs subvolume list -a .
ID 532 gen 386814 top level 5 path backup/btrfs_rootfs
ID 533 gen 392787 top level 5 path backup/btrfs_vogsphere
ID 535 gen 386805 top level 5 path backup/btrfs_vogsphere_20150615_snapshot

# btrfs subvolume create home2

# rsync -ravx home home2

# btrfs subvolume list -a . | grep home
ID 947 gen 400364 top level 5 path home2

# mkdir -pv /home2

# mount -o subvolid=947 LABEL="VB0250EAVER"  /home2 
# ls /home2
ebal



# btrfs sub create btrfs_rootfs/
# rsync -rax / ./btrfs_rootfs/

# du -sh btrfs_rootfs/
13G btrfs_rootfs/

# btrfs sub show btrfs_rootfs/
/mnt/data/btrfs_rootfs
    Name:           btrfs_rootfs
    uuid:           fa4f2b5f-73b4-4742-a223-27c188c774c4
    Parent uuid:        -
    Creation time:      2014-01-17 23:52:51
    Object ID:      3174
    Generation (Gen):   61032
    Gen at creation:    61020
    Parent:         5
    Top Level:      5
    Flags:          -
    Snapshot(s):

# btrfs sub snap -r btrfs_rootfs btrfs_rootfs_20140117
Create a readonly snapshot of 'btrfs_rootfs' in './btrfs_rootfs_20140117'

# btrfs sub show btrfs_rootfs/
/mnt/data/btrfs_rootfs
    Name:           btrfs_rootfs
    uuid:           fa4f2b5f-73b4-4742-a223-27c188c774c4
    Parent uuid:        -
    Creation time:      2014-01-17 23:52:51
    Object ID:      3174
    Generation (Gen):   61033
    Gen at creation:    61020
    Parent:         5
    Top Level:      5
    Flags:          -
    Snapshot(s):
                btrfs_rootfs_20140117

# du -sh btrfs_rootfs*
13G btrfs_rootfs
13G btrfs_rootfs_20140117

# btrfs sub show btrfs_rootfs_20140117/
/mnt/data/btrfs_rootfs_20140117
    Name:           btrfs_rootfs_20140117
    uuid:           fdc7fe38-5cc0-184d-9523-c90d0ecbfe7d
    Parent uuid:        fa4f2b5f-73b4-4742-a223-27c188c774c4
    Creation time:      2014-01-17 23:13:22
    Object ID:      3175
    Generation (Gen):   61033
    Gen at creation:    61033
    Parent:         5
    Top Level:      5
    Flags:          readonly