Stratis

admin 2021年4月6日02:25:52Stratis已关闭评论41 views字数 1123阅读3分44秒阅读模式

Stratis

Sun Apr 15 18:14:39 2018

Stratis 是 redhat 放棄 Btrfs 之後推出的代替品,
使用類似 LVM 的方案來提供有如 btrfs、zfs 般強大的功能。

其實 Stratis 釋出 0.5 有一段時間了,今次抽出時間來嚐下鮮。
Stratis 目前沒有面向用戶的文檔,故久違的寫一篇博文用以記錄。

準備工作

從 AUR 安裝 stratisd
stratis-cli
然後啟動 stratisd

$ systemctl start stratisd

開始

首先我們清理要用的塊設備

$ sudo wipefs -a /dev/sda

但當前版本創建 pool 的時候會碰到錯誤,stratisd 認爲這個塊設備已經被使用

$ stratis pool create stratis /dev/sda
Execution failed: 1: Device /dev/sda appears to belong to another application

根據 issue
如果塊設備的前 4/8k 字節未置零,stratisd 不會使用它。

知道原因就簡單了,我們將它置零

$ dd if=/dev/zero of=/dev/sda bs=1024 count=8

然後就可以正常創建 pool

$ stratis pool create stratis /dev/sda
$ stratis pool list
Name Total Physical Size Total Physical Used
stratis > 238.47 GiB 52 MiB

隨後創建 fs

$ stratis fs create stratis storage
$ stratis fs list stratis
Name
storage
$ la /dev/stratis/stratis/storage
Permissions Size User Date Modified Name
lrwxrwxrwx 9 root 15 4月 18:21 /dev/stratis/stratis/storage -> /dev/dm-6

完成

創建完成,直接掛載就可以使用啦

$ sudo mount /dev/stratis/stratis/storage /run/media/quininer/storage
$ sudo chown quininer /run/media/quininer/storage

用得開心。 Stratis

CN-SEC.COM中文网|本文百科收录于:https://quininer.github.io/

相关推荐: 关于expressjs的一个小坑

关于expressjs的一个小坑 Tue Dec 9 01:07:53 2014 都知道在PHP里,/?key[arr]=value 会被解析为 array(1) { ["key"]=> array(1) { ["arr"]=> string(5)…

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年4月6日02:25:52
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Stratishttps://cn-sec.com/archives/327148.html