Filesys::Btrfs - Simple wrapper around Linux btrfs util.
Version 0.01
Simple wrapper around Linux btrfs util. 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).
btrfs
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.
Example:
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: /sbin/btrfs.
/sbin/btrfs
Create new Filesys::Btrfs object.
Filesys::Btrfs
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.
btrfs_cmd
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).
If $dir is specified then only subvolumes located in this directory are returned.
$dir
Create new subvolume in $dir.
Delete subvolume in $dir.
Set subvolume with $id to be mounted by default.
$id
Force a sync on filesystem.
Balance the chunks across the device.
Nikolay Martynov, <kolya at cpan.org>
<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.
bug-filesys-btrfs at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Filesys::Btrfs
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Filesys-Btrfs
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Filesys-Btrfs
CPAN Ratings
http://cpanratings.perl.org/d/Filesys-Btrfs
Search CPAN
http://search.cpan.org/dist/Filesys-Btrfs/
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.
To install Filesys::Btrfs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Filesys::Btrfs
CPAN shell
perl -MCPAN -e shell install Filesys::Btrfs
For more information on module installation, please visit the detailed CPAN module installation guide.