Filesys::Btrfs - Simple wrapper around Linux btrfs util.
Simple wrapper around Linux
Btrfs util is used to manage btrfs filesystem: manage snapshots,
subvolumes and etc.
Only subset of
btrfs options is supported (hopefuly it is useful subset).
For more information about
btrfs util please see btrfs manpage.
WARNING This module is hightly experimental (as btrfs itself). API can change in the future.
use Filesys::Btrfs; my $btrfs = Filesys::Btrfs->new($mount_point); $btrfs->subvolume_create('subvolume'); ...
Note: all methods croak if error occures.
Default path to look for btrfs program:
my $btrfs = Filesys::Btrfs->new('/mnt/disk');
Mount point of
btrfs filesystem. Filesystem has to be mounted before this module can be used. All methods of
Filesys::Btrfs object operate with paths absolute or relative to mount point.
Additional options. Currently only one option is supported:
btrfs_cmd - specifies different path to btrfs util.
Returns path to
btrfs util being used.
Returns mount point being used.
Returns version of btrfs util being used.
Get list of all subvolumes. Returns hashref of (subvolume_name => id).
$dir is specified then only subvolumes located in this directory are returned.
Create new subvolume in
Delete subvolume in
Set subvolume with
$id to be mounted by default.
Force a sync on filesystem.
Balance the chunks across the device.
<kolya at cpan.org>
Please report any bugs or feature requests to
bug-filesys-btrfs at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Filesys-Btrfs. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
Copyright 2011 Nikolay Martynov.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.