系統指令

btrfs - 最強的 FileSystem

最後更新: 2023-03-10

 

目錄

  • 注意事項
  • 新式指令
  • Scrub
  • Kernel threads
  • Recovery
  • Build btrfs-progs
  • extref(extended inode refs)
  • More about btrfs
  • 建立多 Device 的 btrfs (mkfs.btrfs)
  • RAID1 Usage
  • Conversion (single -> raid1)
  • Replacing failed devices
  • Play btrfs with image file
  • btrfs-send / btrfs-receive
  • GlobalReserve
  • XOR module
  • 常遇到的應用
  • Data Integrity Test

 

介紹

btrfs 是一個多才多藝的 FileSystem 來, 它核心架構是 CoW, 支援以下功能:

  • Extent based file storage (2^64 max file size = 16EiB)
  • Dynamic inode allocation
  • Writable snapshots
  • Subvolumes (internal filesystem roots)
  • Subvolume-aware quota support
  • Object level mirroring and striping
  • Compression (ZLIB, LZO)
  • Online filesystem defragmentation
  • Integrated multiple device support (RAID0, RAID1, RAID10, RAID5 )
  • Checksums on metadata and data (crc32c, xxhash, sha256, blake2b)
  • Space-efficient packing of small files
  • Space-efficient indexed directories
  • Seed devices
    (Create a readonly filesystem that acts as a template to seed other Btrfs filesystems)
  • Background scrub process for finding and fixing errors on files with redundant copies
  • Efficient incremental backup(btrfs send)

所以說, 唔用就走寶 ~

不過, 使用前一定要少心, 因為在 Linux2.6 上它仍未有 fsck !! (Linux 3.2 上的 btrfsck 仍未用得..)

此外, 如果 CPU 支援 hardware 的 CRC32 那效能會更好
(grep -i SSE4.2 /proc/cpuinfo)

Version

每 version 的改善: btrfs_version

 

RecuseCD 功能一覽

RecuseCD 是我最心愛的工具碟來, 它集所有必殺 Linux 工具於一碟, 能力驚人 !!

 


 

memtester

memtester <MEMORY> [ITERATIONS]

MEMORY: megabytes
ITERATIONS: infinite

root  privileges  to  mlock
It will then attempt to mlock this memory
decrease the amount of memory requested until it succeeds.

parted

最後更新: 2020-03-11

介紹

 

parted 是 Linux 上修改 partion 的利器來.

它可以建立(mkpart), 刪除(rm), 檢查(check) Partion.

而且還可以 更改容量(resize) 及 救回(rescue) 誤刪的 partion !!!

注意: resize partion  唔等於 resize file system !!

目錄

 

 

debootstrap 精簡系統建立

2012/12/03

介紹

 

debootstrap 是用來建立最基本的 debian 系統的工具來. 它會自動下載及建立系統所需要的目錄及檔案架構.

它可用於 chroot 環境, 建立 VPS(虛擬機)及安裝新系統(要好有技術 !!)

 

debootstrap 是一個自動化的過程來

分別有以下步驟:

  • Retrieving
  • Validating
  • Extracting
  • Configuring
  • cleaning

指令:

debootstrap [OPTION...]  SUITE TARGET [MIRROR]

例子:

debootstrap lenny ./lenny

它會建立一個基本的 lenny 系統在 lenny 目錄內.

 

如果想建立另一版本, 可以用

debootstrap --verbose squeeze ./squeeze

 


 

RSS feed