In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to use Stratis under Linux to manage Linux storage from the command line. I believe most people don't know much about it, so share this article for your reference. I hope you can learn a lot after reading this article. Let's learn about it together.
Stratis is a volume management file system volume-managing filesystem (VMF), similar to ZFS and Btrfs. It uses the core idea of storage "pooling", which is adopted by various VMF and independent volume managers such as LVM.
Install Stratis for non-developers, the easiest way to try Stratis now is in Fedora 28.
You can install the Stratis daemon and Stratis command-line tools with the following command:
# dnf install stratis-cli stratisd
There are three concepts for creating a pool Stratis: blockdevs, pool, and file system. A Blockdevs is a block device that makes up a pool, such as a disk or disk partition. Once you create a pool, you can create a file system from it.
Suppose you have a block device called vdg on your system, which is not currently used or mounted, you can create a Stratis pool on it:
# stratis pool create mypool / dev/vdg
This assumes that vdg is completely zeroed and empty. If it is not used, but has old data, you may need to use the-force option of pool create. Do not use it for Stratis if you are using it.
If you want to create a pool from multiple block devices, simply list them on the pool create command line. You can also add more blockdevs later using the blockdev add-data command. Note that Stratis requires that the size of the blockdevs be at least 1 GiB.
Create a file system
After you have created a pool called mypool, you can create a file system from it:
# stratis fs create mypool myfs1
After you create a file system named myfs1 from the mypool pool, you can mount and use it using the entry created by Stratis in / dev/stratis:
# mkdir myfs1
# mount / dev/stratis/mypool/myfs1 myfs1
The file system is now mounted on myfs1 and ready for use.
Snapshot
In addition to creating an empty file system, you can also create a file system as a snapshot of an existing file system:
# stratis fs snapshot mypool myfs1 myfs1-experiment
After doing so, you can mount a new myfs1-experiment, which will initially contain the same file contents as myfs1, but it may change as the file system changes. Any changes you make to myfs1-experiment will not be reflected in myfs1 unless you uninstall myfs1 and destroy it:
# umount myfs1
# stratis fs destroy mypool myfs1
Then take a snapshot to recreate and mount it:
# stratis fs snapshot mypool myfs1-experiment myfs1
# mount / dev/stratis/mypool/myfs1 myfs1
Get information
Stratis can list the pools in the system:
# stratis pool list
As the file system writes more data, you will see an increase in the "Total Physical Used" value. Be careful when this value approaches "Total Physical Size". We are still trying to deal with the problem.
List the file systems in the pool:
# stratis fs list mypool
List the blockdevs that make up the pool:
# stratis blockdev list mypool
At present, only this minimum information is provided, but they will provide more information in the future.
Destroy pool
When you know what Stratis can do, to destroy the pool, first make sure that all file systems created from it are unmounted and destroyed, and then use the pool destroy command:
# umount myfs1
# umount myfs1-experiment (if you created it)
# stratis fs destroy mypool myfs1
# stratis fs destroy mypool myfs1-experiment
# stratis pool destroy mypool
Stratis pool list should now show that there is no pool.
The above is all the contents of the article "how to use Stratis to manage Linux storage from the command line under Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.