• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How To Create/Remove and Mount a Stratis Filesystem in CentOS/RHEL 8

By admin

“stratis” is the new volume manager introduced in the CentOS/RHEL 8 release. This post outlines steps to create or remove a new stratis filesystem in CentOS/RHEL 8 system. We will also see how to mount and umount a stratis filesystem in this post.

Creating and mounting a stratis filesystem

1. Install Stratis packages:

# rpm -qa | grep "strati*"
stratisd-1.0.3-1.el8.x86_64
stratis-cli-1.0.2-1.el8.noarch

2. Enable and start the stratisd service:

# systemctl enable --now stratisd
# systemctl start stratisd

Verify the status of the stratisd service:

# systemctl status stratisd
● stratisd.service - A daemon that manages a pool of block devices to create flexible filesystems
Loaded: loaded (/usr/lib/systemd/system/stratisd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2019-08-19 17:12:11 EDT; 1s ago
Docs: man:stratisd(8)
Main PID: 8642 (stratisd)
Tasks: 1 (limit: 26213)
Memory: 876.0K
CGroup: /system.slice/stratisd.service
└─8642 /usr/libexec/stratisd --debug

3. Create a pool:

# stratis pool create Stratis_Test /dev/sdb

Verify the pool you just created:

# stratis pool list
Name Total Physical Size Total Physical Used
Stratis_Test 1.09 GiB 52 MiB

4. Create a filesystem on the newly created “Stratis_Test” pool:

# stratis filesystem create Stratis_Test x01

Verify the filesystem creation:

# stratis filesystem list
Pool Name Name Used Created Device UUID
Stratis_Test x01 546 MiB Aug 19 2019 17:19 /stratis/Stratis_Test/x01 aa24d4adfd4342e38a1ffe0c5e7debe6

5. Create a mount point and mount the filesystem:

# mkdir /x01
# mount /stratis/Stratis_Test/x01 /x01

Verify:

# df -h | grep /x01
/dev/mapper/stratis-1-6c2cd4f86a58439f9f1aa6a004b919db-thin-fs-aa24d4adfd4342e38a1ffe0c5e7debe6 1.0T 7.2G 1017G 1% /x01
# grep x01 /proc/mounts
/dev/mapper/stratis-1-50fb0bbeb3e24ceaafd7be90917208df-thin-fs-9b9d33fac8734406907283fde7567889 /x01 xfs rw,seclabel,relatime,attr2,inode64,sunit=2048,swidth=2048,noquota 0 0
Note: If it is needed to add more blockdevs to an existing pool proceed with step 6.

6. Add more blockdevs to an existing pool:

Syntax:

pool add-data [pool_name] [blockdev] [[blockdev]..]
Add one or more blockdevs to an existing pool, to enlarge its storage capacity.

In our case the command would be:

# stratis pool add-data Stratis_Test /dev/sdb
# stratis pool list
Name Total Physical Size Total Physical Used
Stratis_Test 1.09 GiB 598 MiB ----------------

# stratis filesystem list
Pool Name Name Used Created Device UUID
Stratis_Test x01 546 MiB Aug 19 2019 17:19 /stratis/Stratis_Test/x01 aa24d4adfd4342e38a1ffe0c5e7debe6

# stratis blockdev list
Pool Name Device Node Physical Size State Tier
Stratis_Test /dev/sdb 1.09 GiB In-use Data

Auto Mount the filesystem

1. Check the UUID:

# blkid -p /stratis/Stratis_Test/x01
/stratis/Stratis_Test/x01: UUID="aa24d4ad-fd43-42e3-8a1f-fe0c5e7debe6" TYPE="xfs" USAGE="filesystem"

2. Write the UUID into the file /etc/fstab:

# echo "UUID="aa24d4ad-fd43-42e3-8a1f-fe0c5e7debe6 /x01 xfs defaults 0 0" >> /etc/fstab
# cat /etc/fstab
/dev/mapper/ol-root / xfs defaults 0 0 
UUID=0c39942a-a85b-454c-bdbc-44443874241e /boot xfs defaults 0 0
/dev/mapper/ol-swap swap swap defaults 0 0
UUID=9b9d33fa-c873-4406-9072-83fde7567889 /x01 xfs defaults 0 0
Note: If you already have the filesystem mounted, proceed to step 3, if not, do step 4.

3. Umount the mount point:

# umount /x01

4. Mount the mount point using /etc/fstab:

# mount -a
# df -h | grep x01
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/stratis-1-6c2cd4f86a58439f9f1aa6a004b919db-thin-fs-aa24d4adfd4342e38a1ffe0c5e7debe6 1.0T 7.2G 1017G 1% /x01

Removing a Stratis filesystem

1. Check the pool and filesystem configuration:

# stratis pool list
Name Total Physical Size Total Physical Used
Stratis_Test 1.09 GiB 598 MiB 
# stratis filesystem list
Pool Name Name Used Created Device UUID
Stratis_Test x01 546 MiB Aug 19 2019 17:19 /stratis/Stratis_Test/x01 aa24d4adfd4342e38a1ffe0c5e7debe6
# stratis blockdev list
Pool Name Device Node Physical Size State Tier
Stratis_Test /dev/sdb 1.09 GiB In-use Data

2. Umount the filesystem and distroy filesystem and then the pool.

# umount /x01
Destroy the stratis filesystem/pool
# stratis fs destroy Stratis_Test x01
# stratis pool destroy Stratis_Test

3. Verify:

# stratis pool list
Name Total Physical Size Total Physical Used
# stratis filesystem list
Pool Name Name Used Created Device UUID
# stratis blockdev list
Pool Name Device Node Physical Size State Tier

Filed Under: CentOS/RHEL 8, Linux

Some more articles you might also be interested in …

  1. “Warning: Missing charsets in String to FontSet conversion” – how to resolve the xclock warning message
  2. Unable to Run X Applications Through SSH in Linux
  3. LVM error “WARNING: Inconsistent metadata found” – How to resolve in CentOS / RHEL
  4. Linux OS Service ‘lm_sensors’
  5. CentOS / RHEL : How to Recover from deleted /etc/passwd file
  6. How to install packages using dnf in CentOS/RHEL 8
  7. How to transfer files securely using sftp (examples included)
  8. How to Configure Separate Port For SSH and SFTP On CentOS/RHEL
  9. CentOS / RHEL 6 : How to limit memory resources for a specific user using cgroups
  10. Connection using SSH to a Host Not in DNS/hosts Stalls for Some Time at Connection Initiation

You May Also Like

Primary Sidebar

Recent Posts

  • Basics of client connectivity in Oracle Data Guard configuration
  • ORA-354 ORA-353 and ORA-312: Possible corruption in Online Redo Log File Members in a Redo Log Group
  • How to relocate the redo log files to a different location on disk
  • Oracle Database: Redo log operations (Add/Drop/Change Location)
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary