儲存那些事兒(二) 下一代Linux檔案系統BTRFS簡介

來源:互聯網
上載者:User

BTRFS,通常念成 Butter FS,Better FS 或B-tree FS。下一代的Linux檔案系統。

它基於寫時拷貝(copy-on-write),支援高效的snapshot和clone。它使用b-tree作為儲存的資料結構。在BTRFS項目首頁上對自己是這麼描述的:"一個新的針對Linux的寫時複製檔案系統,致力於實施進階的功能,同時關注容錯、修複和管理方便性。"

它有哪些進階功能呢?下面的feature來自BTRFS的項目首頁:http://btrfs.wiki.kernel.org/

Extent based file storage #擴充了

2^64 byte == 16 EiB maximum file size #支援16EB的檔案大小, 1PB = 1024 TB, 1EB = 1024 PB

Space-efficient packing of small files   #高效支援小檔案, 通過inline files實現的

Space-efficient indexed directories       #高效的目錄索引

Dynamic inode allocation                       #動態inode分配。我們知道,傳統Linux檔案系統的inode格式化好後inode的節點數就確定了,也就是說檔案系統的檔案數確定

Writable snapshots, read-only snapshots  #支援可讀,可寫的快照

Subvolumes (separate internal filesystem roots)  #支援subvolumes,可以理解成在檔案系統上建立子的檔案系統,方便使用者的許可權控制

Checksums on data and metadata (crc32c)    #支援資料和中繼資料的檢驗,保證資料的正確性

Compression (zlib and LZO)                               #支援在線壓縮

Integrated multiple device support                     #多裝置支援

File Striping, File Mirroring, File Striping+Mirroring, Striping with Single and Dual Parity implementations

查看本欄目更多精彩內容:http://www.bianceng.cnhttp://www.bianceng.cn/database/storage/

SSD (Flash storage) awareness (TRIM/Discard for reporting free blocks for reuse) and optimizations (e.g. avoiding unnecessary seek optimizations, sending writes in clusters, even if they are from unrelated files. This results in larger write operations and faster write throughput)

Efficient Incremental Backup   #高效的增量備份

Background scrub process for finding and fixing errors on files with redundant copies #後台進程自動檢測並修複錯誤

Online filesystem defragmentation   #線上的檔案系統片段管理

Offline filesystem check#離線的檔案系統檢查

Conversion of existing ext3/4 file systems #ext3/4檔案系統的轉換

Seed devices. Create a (readonly) filesystem that acts as a template to seed other Btrfs filesystems. The original filesystem and devices are included as a readonly starting point for the new filesystem. Using copy on write, all modifications are stored on different devices; the original is unchanged.

Subvolume-aware quota support #支援subvolume配額,就是支援subvolume的大小限制設定

Send/receive of subvolume changes

Efficient incremental filesystem mirroring

Batch, or out-of-band deduplication (happens after writes, not during) #支援寫後的資料消重

以下這些features正在開發,或者計劃中:

Very fast offline filesystem check   #快速離線檔案系統檢查

Object-level mirroring and striping #對象層級的鏡像和條帶

Alternative checksum algorithms    #可選擇的校正演算法

Online filesystem check    #線上檔案系統檢查

Other compression methods (snappy, lz4)   #其他的壓縮演算法

Hot data tracking and moving to faster devices (currently being pushed as a generic feature available through VFS): 熱資料轉移到更快的裝置上,比如SSD

In-band deduplication (happens during writes)   #支援寫時資料消重

既然BTRFS的目標是下一代的Linux檔案系統,那麼它不單單能作為智能手持功能的檔案系統,還能作為企業生產環境下的檔案系統。它需要能搭建在眾多的硬體平台上。

BTRFS的實現視圖可以看成需要btree構成的一個森林,使用copy-on-write(COW,寫時複製)作為更新的方法。硬碟的block以extent的形式被管理。

這篇文章作為該系列文章的開篇,簡單的介紹一下BTRFS。接下來的文章我講更詳細的去分享這些feature的具體實現。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.