日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Linux下Stratis具體使用方法

Stratis 是一個(gè)卷管理文件系統(tǒng)volume-managing filesystem(VMF),類似于 ZFS 和 Btrfs。它使用了存儲“池”的核心思想,該思想被各種 VMF 和 形如 LVM 的獨(dú)立卷管理器采用,下面為大家分享一下Linux下Stratis具體使用方法。

成都創(chuàng)新互聯(lián)公司專注于企業(yè)全網(wǎng)整合營銷推廣、網(wǎng)站重做改版、邵東網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5建站、商城網(wǎng)站建設(shè)、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)營銷網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為邵東等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

img

為了開始使用Stratis,我們需要添加一些磁盤設(shè)備,并創(chuàng)建一個(gè)單獨(dú)的池,在一個(gè)Stratis池中,可以創(chuàng)建多個(gè)文件系統(tǒng)。

安裝Stratis

通過下面命令使用yum安裝stratis:

[root@localhost ~]# yum -y install stratis*

安裝完成之后,設(shè)置開機(jī)啟用并立即啟動(dòng):

[root@localhost ~]# systemctl enable stratisd --now

查看以下是否啟動(dòng):

列出可用磁盤

在這添加了5個(gè)2GB磁盤,使用下面命令列出磁盤:

[root@localhost ~]# lsblk

在Centos8 中使用Stratis管理本地存儲(一)在Centos8 中使用Stratis管理本地存儲(一)

列出現(xiàn)有的池和文件系統(tǒng):

使用下面幾條命令列出塊設(shè)備、stratis池、文件系統(tǒng):

[root@localhost ~]# stratis blockdev list
[root@localhost ~]# stratis pool list
[root@localhost ~]# stratis filesystem list

在Centos8 中使用Stratis管理本地存儲(一)在Centos8 中使用Stratis管理本地存儲(一)

創(chuàng)建池和文件系統(tǒng)

首先,我們創(chuàng)建“data01_pool”的池。將/dev/sda,/dev/sdb,/dev/sdc,/dev/sdd添加到該池中:

[root@localhost ~]# stratis pool create data01_pool /dev/sd{a..d}
[root@localhost ~]# stratis pool list
[root@localhost ~]# stratis blockdev list

上面命令創(chuàng)建”data01_pool”池、查看池、查看塊設(shè)備。

下面從“data01_pool”池中創(chuàng)建兩個(gè)文件系統(tǒng):

[root@localhost ~]# stratis filesystem create data01_pool user_data01
[root@localhost ~]# stratis filesystem create data01_pool user_data02

下面命令列出創(chuàng)建的文件系統(tǒng):

[root@localhost ~]# stratis filesystem list
或者
[root@localhost ~]# stratis fs list

上圖中列出的文件系統(tǒng)中,字段Device是stratis設(shè)備的位置。

掛載創(chuàng)建好的文件系統(tǒng)

一旦從池中創(chuàng)建了文件系統(tǒng),請創(chuàng)建一個(gè)掛載點(diǎn)并掛載文件系統(tǒng)。默認(rèn)情況下在創(chuàng)建文件系統(tǒng)時(shí),它將使用XFS文件系統(tǒng)對其進(jìn)行格式化。

# 創(chuàng)建掛載點(diǎn)
[root@localhost ~]# mkdir /user_data01
[root@localhost ~]# mkdir /user_data02
# 掛載文件系統(tǒng)
[root@localhost ~]# mount /stratis/data01_pool/user_data01 /user_data01/
[root@localhost ~]# mount /stratis/data01_pool/user_data02 /user_data02/

使用df -h查看掛載的情況:

[root@localhost ~]# df -h /user_data*
Filesystem                                                                                       Size  Used Avail Use% Mounted on
/dev/mapper/stratis-1-359fd7072d8349d390741a1a71f885fb-thin-fs-0657c26979ed443aa4d3a70c15606e1c  1.0T  7.2G 1017G   1% /user_data01
/dev/mapper/stratis-1-359fd7072d8349d390741a1a71f885fb-thin-fs-b91b970f23d94eb6b2ed56f347f770d2  1.0T  7.2G 1017G   1% /user_data02

希望你已經(jīng)觀察到我們沒有格式化文件系統(tǒng)。Stratis程序?yàn)槲覀兘鉀Q了這一問題,并創(chuàng)建了XFS類型的文件系統(tǒng)。

同樣,由于自動(dòng)精簡配置,默認(rèn)情況下,它將顯示文件系統(tǒng)大小為1 TB,并且該大小僅是虛擬的,而不是實(shí)際的。要檢查實(shí)際大小,您將必須使用Stratis命令

使用df -hT /user*匹配出user_data01和user_data02掛載點(diǎn)的文件系統(tǒng),可以看到他們的類型都是XFS格式。

在/etc/fstab中添加開機(jī)掛載的條目

首先需要獲取文件系統(tǒng)的UUID,有兩種方式:

第一種方式,是通過使用stratis fs list就可以獲取到文件系統(tǒng)的UUID。

[root@localhost ~]# stratis fs list

第二種方式,使用blkid獲取塊存儲的uuid,過濾出stratis文件系統(tǒng):

[root@localhost ~]# blkid|grep stratis

下面就是將掛在信息寫入到/etc/fstab中:

[root@localhost ~]# echo "UUID=0657c26979ed443aa4d3a70c15606e1c /user_data01  xfs  defaults,x-systemd.requires=stratis.service  0 0" >> /etc/fstab
[root@localhost ~]# echo "UUID=b91b970f23d94eb6b2ed56f347f770d2 /user_data02  xfs  defaults,x-systemd.requires=stratis.service  0 0" >> /etc/fstab

在Centos8 中使用Stratis管理本地存儲(一)在Centos8 中使用Stratis管理本地存儲(一)

檢查Stratis守護(hù)程序版本

如果需要檢查Stratis運(yùn)行的守護(hù)進(jìn)程版本,使用如下命令:

[root@localhost ~]# stratis daemon version
2.1.0

在Centos8 中使用Stratis管理本地存儲(一)在Centos8 中使用Stratis管理本地存儲(一)

總結(jié)

Stratis是RHEL8/Centos8中提供的一個(gè)新的本地存儲管理工具,它將有助于在塊設(shè)備上創(chuàng)建分層存儲。在RHEL8/Centos8中,可以通過安裝兩個(gè)軟件包獲得Stratis。文章第二部分:https://www.linuxprobe.com/?p=213460


網(wǎng)頁題目:Linux下Stratis具體使用方法
當(dāng)前URL:http://m.5511xx.com/article/cdehpso.html