我正在设置一个带有两个 3TB 硬盘驱动器作为存储支持的系统。由于它是一个桌面工作站,我想知道以下磁盘设置:
sda
+ /boot with 500MB
+ btrfs for the remaining GBytes
sdb
+ btrfs for all the 3000GB
Run Code Online (Sandbox Code Playgroud)
然后我考虑将single
-mode 用于数据/
并/home
使用raid1
作为数据模式为(以及可能的其他人)创建一个子卷。当前的(内核 3.7.X)btrfs 可以实现吗?有没有人有资源,我找不到任何东西。
更新:我做了一个小测试设置,其中包含两个作为环回设备连接的普通文件,用于播放。在这些文件上,我创建了一个普通的 btrfs。然后我做了以下事情:
btrfs subvolume create test
dd if=/dev/urandom of=foo bs=1024 count=1 # use random data to prevent dedup
dd if=/dev/urandom of=test/bar bs=1024 count=1 # use random data to prevent dedup
btrfs balance start -dconvert=raid1 test
btrfs balance start -dconvert=single .
btrfs filesystem df .
Run Code Online (Sandbox Code Playgroud)
这表明文件系统在单模式下使用,而不是部分 RAID1 和部分单模式......我做错了什么?
小智 7
btrfs balance 命令适用于文件系统,如帮助所示,即使“filesystem”参数是可选的:
# btrfs balance start --help
usage: btrfs [filesystem] balance start [options] <path>
Run Code Online (Sandbox Code Playgroud)
在出现“btrfs subvolume balance”命令之前,我怀疑此功能不存在。
(以上基于Btrfs Btrfs v0.19)