공유할 서비스 선택

TECH


TECH

OS Stratis 파일시스템에 대해 들어보셨나요?

페이지 정보

작성자 OSworker 아이디로 검색 전체게시물 댓글 0건 조회 1,652회 좋아요 1회 작성일 23-09-25 00:02

본문

안녕하세요 

 

Stratis 파일시스템에 대해 들어보셨나요?  

  

Stratis Linux 로컬 스토리지 관리 솔루션입니다.

단순성과 사용 편의성에 중점을 두고 고급 스토리지 기능에 액세스할 있습니다.

 

 

 

Stratis 고급 스토리지 기능을 지원하는 하이브리드 사용자 커널 로컬 스토리지 관리 시스템입니다. Stratis 주요 개념은 스토리지 입니다. 풀은 하나 이상의 로컬 디스크 또는 파티션에서 생성되며 풀에서 볼륨이 생성됩니다.

풀을 사용하면 다음과 같은 다양한 유용한 기능을 사용할 있습니다. 

  

- 파일 시스템 스냅샷

프로비저닝

계층화

 


f36a0b684c7fc9666b5cc29749af06da_1695567093_3187.png
1.   Stratis 설치

stratis-cli stratisd 설치

stratis-cli CLI툴이고, stratisd CLI 통한 요청을 처리하는 데몬입니다.

 

[root@rhel9]# yum install stratisd stratis-cli 

Updating Subscription Management repositories. 

Last metadata expiration check: 4:20:04 ago on Mon 20 Feb 2023 06:48:57 PM KST. 

 

Dependencies resolved. 

================================================================================== 

 Package                             Architecture             Version                                             Repository                               Size 

================================================================================== 

Installing: 

 stratis-cli                noarch                      3.2.0-1.el9                       rhel-9-for-x86_64-appstream-rpms                      122 k 

 stratisd                 x86_64                      3.2.2-1.el9                       rhel-9-for-x86_64-appstream-rpms                      3.2 M 

 

Installing dependencies: 

 python3-dbus-client-gen           noarch              0.5-5.el9                         rhel-9-for-x86_64-appstream-rpms                       32 k 

 python3-dbus-python-client-gen  noarch              0.8-5.el9                         rhel-9-for-x86_64-appstream-rpms                       33 k

 python3-dbus-signature-pyparsing  noarch           0.04-5.el9                        rhel-9-for-x86_64-appstream-rpms                       25 k

 python3-into-dbus-python          noarch           0.08-5.el9                        rhel-9-for-x86_64-appstream-rpms                       35 k

 python3-justbases                    noarch         0.15-6.el9                        rhel-9-for-x86_64-appstream-rpms                       54 k

 python3-justbytes                    noarch          0.15-6.el9                        rhel-9-for-x86_64-appstream-rpms                       52 k

 python3-packaging                  noarch          20.9-5.el9                        rhel-9-for-x86_64-appstream-rpms                       81 k

 python3-pyparsing                  noarch         2.4.7-9.el9                       rhel-9-for-x86_64-baseos-rpms                         154 k

 python3-wcwidth                   noarch          0.2.5-8.el9                       rhel-9-for-x86_64-appstream-rpms                       48 k

 

Transaction Summary

 

 ===================================================================================

Install  11 Packages 

Total download size: 3.9 M 

Installed size: 16 M 

Is this ok [y/N]: 

 

2. Stratis  기동

[root@rhel9 ~]# systemctl enable stratisd

[root@rhel9 ~]# systemctl start stratisd

 

[root@rhel9 ~]# systemctl status stratisd

stratisd.service - Stratis daemon

      Loaded: loaded (/usr/lib/systemd/system/stratisd.service; enabled; vendor preset: enabled)

      Active: active (running) since Mon 2023-02-20 23:10:50 KST; 14s ago

        Docs: man:stratisd(8)

    Main PID: 3562 (stratisd)

       Tasks: 8 (limit: 24625)

      Memory: 1.7M

         CPU: 15ms

      CGroup: /system.slice/stratisd.service

              └─3562 /usr/libexec/stratisd --log-level debug

  

Feb 20 23:10:50 rhel9 systemd[1]: Starting Stratis daemon...

Feb 20 23:10:50 rhel9 stratisd[3562]: [2023-02-20T14:10:50Z INFO  stratisd::stratis::run] stratis daemon version 3.2.2 started

Feb 20 23:10:50 rhel9 stratisd[3562]: [2023-02-20T14:10:50Z INFO  stratisd::stratis::run] Using StratEngine

Feb 20 23:10:50 rhel9 stratisd[3562]: [2023-02-20T14:10:50Z INFO  stratisd::engine::strat_engine::liminal::identify] Beginning initial search for Stratis block devices

Feb 20 23:10:50 rhel9 stratisd[3562]: [2023-02-20T14:10:50Z INFO  stratisd::stratis::ipc_support::dbus_support] D-Bus API is available

Feb 20 23:10:50 rhel9 systemd[1]: Started Stratis daemon.

 

 

 

3.Pool 생성, File system 생성 

 

 

[root@rhel9 ~]# stratis pool create pool01 /dev/vda

[root@rhel9 ~]# stratis pool create pool02 /dev/vdb

[root@rhel9 ~]# lsblk

 

NAME                                                                    MAJ:MIN RM  SIZE RO TYPE    MOUNTPOINTS

 

 

……

 

 

….. 생략

 

 

vda                                                                     252:0    0   10G  0 disk

 

 

└─stratis-1-private-5d4ec595a51f47939588cfefbf33e49c-physical-originsub 253:2    0   10G  0 stratis

 

 

  ├─stratis-1-private-5d4ec595a51f47939588cfefbf33e49c-flex-thinmeta    253:3    0  712K  0 stratis

 

 

  └─stratis-1-private-5d4ec595a51f47939588cfefbf33e49c-thinpool-pool  253:6    0  9.5G  0 stratis

 

 

  ├─stratis-1-private-5d4ec595a51f47939588cfefbf33e49c-flex-thindata    253:4    0  9.5G  0 stratis

 

 

  └─stratis-1-private-5d4ec595a51f47939588cfefbf33e49c-thinpool-pool  253:6    0  9.5G  0 stratis

 

 

  └─stratis-1-private-5d4ec595a51f47939588cfefbf33e49c-flex-mdv         253:5    0  512M  0 stratis

 

 

vdb                                                                     252:16   0   10G  0 disk

 

 

└─stratis-1-private-1f2c87c154634403b224be0d3b15bc04-physical-originsub 253:7    0   10G  0 stratis

 

 

  ├─stratis-1-private-1f2c87c154634403b224be0d3b15bc04-flex-thinmeta    253:8    0  712K  0 stratis

 

 

  └─stratis-1-private-1f2c87c154634403b224be0d3b15bc04-thinpool-pool  253:11   0  9.5G  0 stratis

 

 

  ├─stratis-1-private-1f2c87c154634403b224be0d3b15bc04-flex-thindata    253:9    0  9.5G  0 stratis

 

 

  └─stratis-1-private-1f2c87c154634403b224be0d3b15bc04-thinpool-pool  253:11   0  9.5G  0 stratis

 

 

  └─stratis-1-private-1f2c87c154634403b224be0d3b15bc04-flex-mdv         253:10   0  512M  0 stratis

 

[root@rhel9 ~]#

 

 

 

>  Pool List 확인

 

 

[root@rhel9 ~]# stratis pool list

 

 

Name                Total / Used / Free    Properties                                   UUID   Alerts

 

 

pool01   10 GiB / 517.39 MiB / 9.49 GiB   ~Ca,~Cr, Op   5d4ec595-a51f-4793-9588-cfefbf33e49c   WS001

 

 

pool02   10 GiB / 517.39 MiB / 9.49 GiB   ~Ca,~Cr, Op   1f2c87c1-5463-4403-b224-be0d3b15bc04   WS001

 

 

------------------------------------- 

> pool 생성 오류

$ stratis pool create pool1 /dev/sdb /dev/sdc

Execution failed:

 

stratisd failed to perform the operation that you requested. It returned the following information via the D-Bus: ERROR: Engine error: At least one of the devices specified was unsuitable for initialization: Engine error: udev information indicates that device /dev/sdb is a block device which appears to be owned.

 

 

# 파일시스템 signature 지워줍니다.

 

 

$ wipefs -a /dev/sdb

 

 

/dev/sdb: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54

 

 

/dev/sdb: 8 bytes were erased at offset 0x77ffffe00 (gpt): 45 46 49 20 50 41 52 54

 

 

/dev/sdb: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa

 

 

/dev/sdb: calling ioctl to re-read partition table: Success

 

 

$ wipefs -a /dev/sdc

 

 

  ------------------------------------- 

 

 

 

 

Stratis 파일 시스템 생성 확인

 

 

[root@rhel9 ~]# stratis filesystem create pool01 fs01

 

 

[root@rhel9 ~]# stratis filesystem create pool02 fs02

 

 

[root@rhel9 ~]# stratis filesystem list

 

 

Pool     Filesystem   Total / Used / Free             Created             Device                     UUID

 

 

pool01   fs01         1 TiB / 546 MiB / 1023.47 GiB   Feb 20 2023 23:18   /dev/stratis/pool01/fs01   3e468ce7-e2ae-45d0-b13e-68309e650b31

 

 

pool02   fs02         1 TiB / 546 MiB / 1023.47 GiB   Feb 20 2023 23:18   /dev/stratis/pool02/fs02   3bacf709-18c6-4aeb-9c04-02d184ace12c

 

 

[root@rhel9 ~]#

 

 

 

 

> Stratis 파일 시스템 마운트

 

 

[root@rhel9 ~]# df -hP

 

 

Filesystem                                                                                       Size  Used Avail Use% Mounted on

 

 

 

 

/dev/mapper/stratis-1-5d4ec595a51f47939588cfefbf33e49c-thin-fs-e0b54a6db635466cb9b58ad7bcfb7e2c  1.0T  7.2G 1017G   1% /fs01

 

 

/dev/mapper/stratis-1-1f2c87c154634403b224be0d3b15bc04-thin-fs-3bacf70918c64aeb9c0402d184ace12c  1.0T  7.2G 1017G   1% /fs02

 

 

 

 

OR

 

 

 

 

[root@rhel9 /]# vi /etc/fstab

 

 

UUID=e0b54a6db635466cb9b58ad7bcfb7e2c           /fs01   xfs     defaults,x-systemd.requires=stratisd.service 0 0

 

 

UUID=3bacf709-18c6-4aeb-9c04-02d184ace12c       /fs02   xfs     defaults,x-systemd.requires=stratisd.service 0 0

 

 

 

 

Stratis 파일 시스템에서 스냅샷 사용

 

 

[root@rhel9 fs01]# touch test{0..9}.txt

 

 

[root@rhel9 fs01]# ll

 

 

total 0

 

 

-rw-r--r-- 1 root root 0 Feb 23 14:41 test0.txt

 

 

-rw-r--r-- 1 root root 0 Feb 23 14:41 test1.txt

 

 

-rw-r--r-- 1 root root 0 Feb 23 14:41 test2.txt

 

 

-rw-r--r-- 1 root root 0 Feb 23 14:41 test3.txt

 

 

-rw-r--r-- 1 root root 0 Feb 23 14:41 test4.txt

 

 

-rw-r--r-- 1 root root 0 Feb 23 14:41 test5.txt

 

 

-rw-r--r-- 1 root root 0 Feb 23 14:41 test6.txt

 

 

-rw-r--r-- 1 root root 0 Feb 23 14:41 test7.txt

 

 

-rw-r--r-- 1 root root 0 Feb 23 14:41 test8.txt

 

 

-rw-r--r-- 1 root root 0 Feb 23 14:41 test9.txt

 

 

 

 

[root@rhel9 fs01]# stratis fs snapshot pool01 fs01  pool01_fs01_0223_snapshot

 

 

[root@rhel9 fs01]# stratis fs list

 

Pool     Filesystem              Total / Used / Free             Created             Device                                          UUID

 

 

pool01   fs01            1 TiB / 546 MiB / 1023.47 GiB   Feb 23 2023 14:01   /dev/stratis/pool01/fs01   e0b54a6d-b635-466c-b9b5-8ad7bcfb7e2c

 

 

pool01   pool01_fs01_0223_snapshot   1 TiB / 546 MiB / 1023.47 GiB   Feb 23 2023 14:43   /dev/stratis/pool01/pool01_fs01_0223_snapshot   62e8a1eb-6d60-4b22-9eb8-756a3332d2fd

 

 

pool02   fs02            1 TiB / 546 MiB / 1023.47 GiB   Feb 20 2023 23:18   /dev/stratis/pool02/fs02   3bacf709-18c6-4aeb-9c04-02d184ace12c

 

 

 

 

> Stratis 파일 시스템에서 스냅샷 사용 테스트

 

 

[root@rhel9 fs01]# rm -rf test{5..9}.txt      <----파일을 지워봅니다.

 

 

[root@rhel9 fs01]# ls          

 

 

test0.txt  test1.txt  test2.txt  test3.txt  test4.txt                 <----- 5번에서9번 파일이 없음

 

 

 

 

[root@rhel9 fs01]# mount /dev/stratis/pool01/pool01_fs01_0223_snapshot          <------ 스냅샷 파일시스템 활성화(마운트)

 

 

[root@rhel9 fs01]# mkdir /snampshot                                                     <------ 임시 마운트할 디렉토리 생성

 

 

[root@rhel9 fs01]# mount /dev/stratis/pool01/pool01_fs01_0223_snapshot /snampshot   <--- 마운트 하기

 

 

[root@rhel9 fs01]# df -h

 

 

Filesystem                                                                                       Size  Used Avail Use% Mounted on

 

 

………………

 

 

…………

 

 

/dev/mapper/stratis-1-5d4ec595a51f47939588cfefbf33e49c-thin-fs-e0b54a6db635466cb9b58ad7bcfb7e2c  1.0T  7.2G 1017G   1% /fs01

 

 

/dev/mapper/stratis-1-1f2c87c154634403b224be0d3b15bc04-thin-fs-3bacf70918c64aeb9c0402d184ace12c  1.0T  7.2G 1017G   1% /fs02

 

 

/dev/mapper/stratis-1-5d4ec595a51f47939588cfefbf33e49c-thin-fs-62e8a1eb6d604b229eb8756a3332d2fd  1.0T  7.2G 1017G   1% /snapshot

 

 

 

 

[root@rhel9 fs01]# ls /snapshot/                  <------5 ~ 9번까지의 파일이 있는것을 확인

 

 

test0.txt  test1.txt  test2.txt  test3.txt  test4.txt  test5.txt  test6.txt  test7.txt  test8.txt  test9.txt

 




간단하게 사용할 백업 파일시스템으로 사용할때 좋습니다. ~^^

감사합니다. 

참고링크 





 

 

댓글목록

등록된 댓글이 없습니다.

TECH 목록
번호 제목 작성자 작성일 조회수
248 OS OSworker 아이디로 검색 전체게시물 05-01 79
xsos라고 들어보셨나요? #sosreport

카테고리 : OS

79 0
작성자 : OSworker 25/05/01
247 OS OSworker 아이디로 검색 전체게시물 04-23 202
sarchart 라고 들어보셨나요? sar datat 를 좀더 보기 편하게 만들어줍니다.

카테고리 : OS

202 0
작성자 : OSworker 25/04/23
246 OS OSworker 아이디로 검색 전체게시물 04-16 269
Sosreport 생성시에 OS 의 모든 sar 데이터가 포함되지 않아요. 해결방법은?

카테고리 : OS

269 0
작성자 : OSworker 25/04/16
245 OS OSworker 아이디로 검색 전체게시물 03-29 427
이슈 : sbd watchdog type stonith 사용시 메모리 누수 발생 #RHEL8.10 #RHEL9.4

카테고리 : OS

427 0
작성자 : OSworker 25/03/29
244 OS OSworker 아이디로 검색 전체게시물 03-23 459
Linux 명령어 : du vs df 차이점에 대해 알아보겠습니다.

카테고리 : OS

459 0
작성자 : OSworker 25/03/23
243 OS OSworker 아이디로 검색 전체게시물 03-15 535
아직도 헷갈려 하시는 RHEL Life-cycle에 대해 좀 더 설명드리고자 합니다. RHEL5하고 RHEL6 "ongoing"

카테고리 : OS

535 0
작성자 : OSworker 25/03/15
242 OS OSworker 아이디로 검색 전체게시물 02-28 449
3월 11일에 RedHat 코리아에서 개최하는 행사가 있습니다. 어서 등록하세요~!!

카테고리 : OS

449 0
작성자 : OSworker 25/02/28
241 OS OSworker 아이디로 검색 전체게시물 02-23 393
Extended Life Cycle Support Extension 6 RHEL6 버전의 패키지가 아직도 나온다구요?

카테고리 : OS

393 0
작성자 : OSworker 25/02/23
240 OS OSworker 아이디로 검색 전체게시물 02-17 560
Red Hat Enterprise Linux 10 Beta -> 지금 이용 가능

카테고리 : OS

560 0
작성자 : OSworker 25/02/17
239 OS OSworker 아이디로 검색 전체게시물 01-28 562
2025년 엔터프라이즈 리눅스를 시작해야 하는 10가지 이유

카테고리 : OS

562 0
작성자 : OSworker 25/01/28
Total 248건
게시물 검색

주식회사 클럭스| 대표 : 이찬호| 사업자등록번호 : 107-87-27655
주소 : 서울특별시 영등포구 국회대로 800, 여의도파라곤
E-mail : sales@chlux.co.kr
Copyright © 클럭스 www.chlux.co.kr All rights reserved.
상단으로Top