學術及資源的交流園地 ^_^

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

 

iSCSI

最後更新: 2019-08-14

目錄

  • 介紹
  • open-iscsi
  • tgtd
  • iscsitarget

介紹

iscsi 的 initiator 一共有兩類:

qemu cli

last update: 22-8-11
 

User mode
    qemu linux.img

System mode
    qemu-i386 -L / /bin/ls


apt-get install qemu qemu-utils

qemu
qemu-img
 



建立 image

 

qemu-img create -f qcow2 hda.img 10G 

Default cluster_size: 65536

 


 

啟動

 

qemu -hda c.img -cdrom linux.iso -boot d -m 128 -localtime -vnc,password -monitor stdio

 

-monitor stdio 在 cmd mode 下見到 monitor

Debian 常用 package

last update: 22-8-11
 

Network:

  • iproute: tc, ss, ip, arpd, nstat, lnstat, rtmon
  • dnsutils: dig, nslookup, nsupdate
  • traceroute
  • telnet
  • net-tools: arp, mii-tool, route, ifconfig, rarp
  • whois
  • nmap
  • iftop
  • lftp
  • tcpdump
  • mailutils
  • lynx
  • curl
  • wget
  • iputils-ping    <--- ping

 

FileSystem:

  • fuse-utils
  • sshfs
  • quota
  • quotatool

 

RSS feed