1. 程式人生 > 實用技巧 >CentOS 6.5 上使用Btrfs-安裝整合工具包

CentOS 6.5 上使用Btrfs-安裝整合工具包





基本步驟:

參看 https://btrfs.wiki.kernel.org/index.php/Btrfs_source_repositories

說明:

修改1:

==========

Fedora

yum install libuuid-devel libattr-devel zlib-devel libacl-devel e2fsprogs-devel libblkid-devel lzo2-devel

============

在CentOS中修正為

yum install  uuid-dev libattr1-dev zlib1g-dev libacl1-dev e2fslibs-dev libblkid-dev liblzo2-dev


修改2:

下文中,

git clone git://repo.or.cz/btrfs-progs-unstable/devel.git
cd devel
git checkout integration-YYYYMMDD

修改為

git clone git://repo.or.cz/btrfs-progs-unstable/devel.git
cd devel
git checkout integration-20131125

=======================================================

要注意,YYYYMMDD 整合日期在2013年12月12日查詢到的整合日期是20131125,如整合失敗,則要到官網上重新查詢。

查詢地址:http://repo.or.cz/w/btrfs-progs-unstable/devel.git

000336303.jpg

Official repository

The userspace utilities can be downloaded from this repository (Gitweb access):

$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
$ cd btrfs-progs

Integration repository

David Sterba maintains an "integration" branch of patches for the userspace tools (

Gitweb access). This is at:

git://repo.or.cz/btrfs-progs-unstable/devel.git integration-YYYYMMDD

where YYYMMDD is the date of the branch.

To check out this repository, and select the latest branch, use:

git clone git://repo.or.cz/btrfs-progs-unstable/devel.git
cd devel
git checkout integration-YYYYMMDD

btrfs kernel module git repository

Until October 2012, the latest features and bug fixes hit this repo before going upstream to Linus' kernel tree. Currently it is not up to date. The Linux RCs are more up to date and btrfs-next (see below) is most up to date.

btrfs repository (the command downloads a complete Linux kernel tree, if you have a local instance already, add it as a git remote) (Gitweb access)

git clone git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git

Integration repository (btrfs-next)

Josef Bacik maintains an "integration" branch of all the kernel patches seen on the mailing list.

git clone git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git

gitweb access

This is the code you want to test if you think you've found a bug or want to test the latest features.

"Hello,

In an effort to be a little bit better about reviewing patches sent to themailinglist I've created a btrfs-next git tree kernel.org. You can get it here

git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git

I'm going to be scraping the mailinglist every day for patches that are sent andapplying them to this tree in order to get some better testing throughout thedevelopment cycle and possibly stop being such a lazy bum about reviewing. Ifyou are looking to get patches into the next merge window and you notice Ihaven't included them in this tree please let me know so I can pull them in, Idid a very casual look through the list to find stuff so I probably missedsomething. Thanks much,

Josef"

Patches sent to mailinglist

A convenient interface to get an overview of patches and the related mail discussions can be found at https://patchwork.kernel.org/project/linux-btrfs/list/ .

It is possible to directly apply a patch by pasting the mbox link from the patch page to the command

$ wget -O - 'https://patchwork.kernel.org/patch/123456/mbox' | git am -

you may want to add --reject, or decide otherwise what to do with the patch.

Build

Dependencies

Before compiling the userspace tools you'll need to get some dependencies:

Fedora

yum install libuuid-devel libattr-devel zlib-devel libacl-devel e2fsprogs-devel libblkid-devel lzo2-devel

Note that some Fedora/Red Hat derived distributions use lzo-devel instead of lzo2-devel.

Debian/Ubuntu

sudo apt-get build-dep btrfs-tools
-or-
sudo apt-get install uuid-dev libattr1-dev zlib1g-dev libacl1-dev e2fslibs-dev libblkid-dev liblzo2-dev

If you tried the first and get "cannot find llzo2", try the second; your distro has an even older version of btrfs-progs packaged than expected.

Arch Linux

pacman -S e2fsprogs

openSUSE

zypper in libattr-devel zlib-devel libacl-devel libext2fs-devel libuuid-devel libblkid-devel lzo-devel

Build

Once you have everything in place, you can run

make

to build the user-space tools. After that they can be used like this:

./btrfsck --repair /dev/<devicename>



轉載於:https://blog.51cto.com/walkthrough/1340061