# stratis 관련 도구 설치
$ yum -y install stratisd stratis-cli
# 재부팅해도 사용할 수 있게 enable
$ systemctl enable stratisd
# daemon running 확인
$ systemctl status stratisd
● stratisd.service - Stratis daemon
Loaded: loaded (/usr/lib/systemd/system/stratisd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-10-20 17:55:48 EDT; 2 days ago
Docs: man:stratisd(8)
Main PID: 911 (stratisd)
Tasks: 8 (limit: 23247)
Memory: 7.5M
CGroup: /system.slice/stratisd.service
└─911 /usr/libexec/stratisd --log-level debug
# stratis pool 생성
$ stratis pool create pool1 /dev/sdb /dev/sdc
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
...
sdb 8:16 0 30G 0 disk
`-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-physical-originsub
253:3 0 60G 0 stratis
|-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-flex-thinmeta 253:4 0 48M 0 stratis
| `-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-thinpool-pool 253:7 0 59.9G 0 stratis
|-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-flex-thindata 253:5 0 59.9G 0 stratis
| `-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-thinpool-pool 253:7 0 59.9G 0 stratis
`-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-flex-mdv 253:6 0 16M 0 stratis
sdc 8:32 0 30G 0 disk
`-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-physical-originsub
253:3 0 60G 0 stratis
|-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-flex-thinmeta 253:4 0 48M 0 stratis
| `-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-thinpool-pool 253:7 0 59.9G 0 stratis
|-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-flex-thindata 253:5 0 59.9G 0 stratis
| `-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-thinpool-pool 253:7 0 59.9G 0 stratis
`-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-flex-mdv 253:6 0 16M 0 stratis
# stratis pool 확인
$ stratis pool list
Name Total Physical Properties UUID
pool1 60 GiB / 44.84 MiB / 59.96 GiB ~Ca,~Cr ff189618-1b94-475a-bfb8-b13bb4b38567
$ 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 filesystem list
Pool Name Name Used Created Device UUID
$ stratis pool list
Name Total Physical Properties UUID
pool1 60 GiB / 44.84 MiB / 59.96 GiB ~Ca,~Cr ff189618-1b94-475a-bfb8-b13bb4b38567
$ stratis filesystem create pool1 fs1
$ stratis fs create pool1 fs2
$ stratis filesystem list
Pool Name Name Used Created Device UUID
pool1 fs2 517 MiB Oct 23 2022 03:44 /dev/stratis/pool1/fs2 f560c601-363b-4eb2-93d0-b93c5e42e9db
pool1 fs1 517 MiB Oct 23 2022 03:44 /dev/stratis/pool1/fs1 915392f5-9375-4203-b288-9b8f34bab634
$ stratis fs list | awk '{print $NF}' >> /etc/fstab
$ vim /etc/fstab
...
UUID
915392f5-9375-4203-b288-9b8f34bab634
f560c601-363b-4eb2-93d0-b93c5e42e9db
# /etc/fstab 수정
# stratisd service가 동작중일 때만 사용 가능.
$ vim /etc/fstab
...
UUID=915392f5-9375-4203-b288-9b8f34bab634 /mnt xfs defaults,x-systemd.requires=stratisd.service 0 0
UUID=f560c601-363b-4eb2-93d0-b93c5e42e9db /nas xfs defaults,x-systemd.requires=stratisd.service 0 0
$ mount -a
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
...
sdb 8:16 0 30G 0 disk
`-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-physical-originsub 253:3 0 60G 0 stratis
|-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-flex-thinmeta 253:4 0 48M 0 stratis
| `-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-thinpool-pool 253:7 0 59.9G 0 stratis
| |-stratis-1-ff1896181b94475abfb8b13bb4b38567-thin-fs-915392f593754203b2889b8f34bab634
| | 253:8 0 1T 0 stratis /mnt
| `-stratis-1-ff1896181b94475abfb8b13bb4b38567-thin-fs-f560c601363b4eb293d0b93c5e42e9db
| 253:9 0 1T 0 stratis /nas
|-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-flex-thindata 253:5 0 59.9G 0 stratis
| `-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-thinpool-pool 253:7 0 59.9G 0 stratis
| |-stratis-1-ff1896181b94475abfb8b13bb4b38567-thin-fs-915392f593754203b2889b8f34bab634
| | 253:8 0 1T 0 stratis /mnt
| `-stratis-1-ff1896181b94475abfb8b13bb4b38567-thin-fs-f560c601363b4eb293d0b93c5e42e9db
| 253:9 0 1T 0 stratis /nas
`-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-flex-mdv 253:6 0 16M 0 stratis
sdc 8:32 0 30G 0 disk
`-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-physical-originsub 253:3 0 60G 0 stratis
|-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-flex-thinmeta 253:4 0 48M 0 stratis
| `-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-thinpool-pool 253:7 0 59.9G 0 stratis
| |-stratis-1-ff1896181b94475abfb8b13bb4b38567-thin-fs-915392f593754203b2889b8f34bab634
| | 253:8 0 1T 0 stratis /mnt
| `-stratis-1-ff1896181b94475abfb8b13bb4b38567-thin-fs-f560c601363b4eb293d0b93c5e42e9db
| 253:9 0 1T 0 stratis /nas
|-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-flex-thindata 253:5 0 59.9G 0 stratis
| `-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-thinpool-pool 253:7 0 59.9G 0 stratis
| |-stratis-1-ff1896181b94475abfb8b13bb4b38567-thin-fs-915392f593754203b2889b8f34bab634
| | 253:8 0 1T 0 stratis /mnt
| `-stratis-1-ff1896181b94475abfb8b13bb4b38567-thin-fs-f560c601363b4eb293d0b93c5e42e9db
| 253:9 0 1T 0 stratis /nas
`-stratis-1-private-ff1896181b94475abfb8b13bb4b38567-flex-mdv 253:6 0 16M 0 stratis
# stratis 파일 시스템 확인
$ stratis fs list
Pool Name Name Used Created Device UUID
pool1 fs1 517 MiB Oct 23 2022 03:44 /dev/stratis/pool1/fs1 915392f5-9375-4203-b288-9b8f34bab634
pool1 fs2 517 MiB Oct 23 2022 03:44 /dev/stratis/pool1/fs2 f560c601-363b-4eb2-93d0-b93c5e42e9db
# stratis 파일시스템 삭제
$ stratis fs destroy pool1 fs1
$ stratis fs destroy pool1 fs2
$ stratis fs list
Pool Name Name Used Created Device UUID
$ stratis pool list
Name Total Physical Properties UUID
pool1 60 GiB / 44.84 MiB / 59.96 GiB ~Ca,~Cr ff189618-1b94-475a-bfb8-b13bb4b38567
# stratis pool 삭제
$ stratis pool destroy pool1
$ stratis pool list
Name Total Physical Properties UUID
7.기본 네트워킹 관리 (0) | 2022.10.26 |
---|---|
10.컨테이너 관리 - 컨테이너 이미지 검색 / 검사 (0) | 2022.10.25 |
5.파일 시스템 구축 및 설정 - 파일 시스템 생성, 마운트, 언마운트 (0) | 2022.10.20 |
4.로컬 스토리지 설정 - fdisk로 파티션 생성, 삭제, 확인 (0) | 2022.10.20 |
1. 필수 툴 이해 및 사용 - grep 정리 (0) | 2022.05.10 |