In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What this article shares to you is the example analysis of the Linux partition merging tool in the mhddfs virtual storage tool. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
The so-called Linux partition merge, strictly speaking, should be called Linux mount point merge. You must have seen a lot of partition merging software under Windows, and Windows itself has its own simple partition merging function, which can meet the needs of users in most cases. Imagine that you have three hard drives (or partitions) of 100G, 200G and 60G in Linux. How do you access 180G video folders under a unified path?
I believe that most users will think of several solutions:
◆, just buy a bigger hard drive.
◆ uses LVM
◆ group RAID
Today I'm going to introduce the mhddfs tool, mhddfs is a FUSE system module that combines multiple Linux partitions (mount points) or hard drives into a single virtual drive. This allows us to drop the files into the virtual drive created by mhddfs, which automatically distributes the files to different mount points, and the user looks like a unified path (a bit like LVM).
1. Install the mhddfs virtual storage tool
The Debian and Ubuntu series can use the following commands:
Sudo apt-get install mhddfs
Redhat, CentOS, or Fedora are installed using YUM:
Yum install mhddfs2. Configure mhddfs virtual storage
First of all, we will use the following command to look at the partition of the current system:
Df-h
There are mainly three partitions in our current system. From the picture, we can see that the three mount points are 1.7g, 8.8g and 173G respectively.
Note: the mount point of your own system must be different from mine. Please check it yourself.
Next, we use the following command to create a new mount point for managing virtual storage.
Sudo mkdir / mnt/virtual
Second, we mount the mhddfs using the following command.
Mhddfs /, / boot,/home / mnt/virtual
Please adjust the above command according to your own mount point and need to select the partitions that need to be merged.
The mhddfs: move size limit 4294967296 bytes returned by the command says: if a partition is less than 4G, the newly stored file will be thrown into the next partition with more than 4G remaining space, and if all the partitions in the virtual storage are less than 4G, the file will be saved randomly.
*. Let's use df-h to check whether the mount is successful:
3. Automatically mount mhddfs virtual storage on boot
As with other types of partition boot mounts, we can directly change the / etc/fstab file to achieve:
1. Open a fstab file using vi
Sudo vi / etc/fstab
two。 Just write the mount information and save it.
Mhddfs# /, / boot, / home / mnt/virtual fuse defaults 0 0
Tip: uninstalling mhddfs virtual storage can also be done directly with the umount / mnt/virtual command.
The above is the example analysis of the Linux partition merging tool in the mhddfs virtual storage tool. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please 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.