Let's assume you have a 30GB movie, and you have three drives, each of size 20GB. So, how would you to store things?
Obviously, you can put your video is divided into two or three separate volumes, and store them on hand to drive. This is certainly not a good idea, it would be an arduous task, it requires manual intervention you, and you spend a lot of time.
Another solution is to create a RAID disk array. However, RAID storage notorious reliability, availability and poor terms of disk space. Another solution is mhddfs.
Mhddfs-- merge multiple partitions in Linux
mhddfs is a device driver for Linux, which can be more than one mount point into a virtual disk. It is based on FUSE driver, it provides a simple solution for large data storage. It can merge all the small file system, create a single large virtual file system, the file system contains all the contents of its member file systems, including file and free space.
Why do you need Mhddfs?
All of your storage devices will be created as a single virtual pool, which can be mounted at startup. This gadget can intelligently care and treatment which memory is full, which is stored empty, and writes the data which is stored in. Once you have successfully created a virtual drive, you can use SAMBA to share your virtual file system. Your client will at all times have seen a huge drive and a lot of free space.
Get file system attributes and system information.
Set file system properties.
Create, read, write, and remove directories and files.
It supports file locking and hard links on a single device.
The disadvantage mhddfs advantage of mhddfs
Suitable for home users mhddfs driver is not built into the Linux kernel
It requires a lot of processing power to run a simple runtime
No significant loss of data without redundancy solutions
Do not need to split the file does not support mobile hard links
You can add new files to the virtual file system composed of
You can manage files saved location
Support extended file attributes
Linux installed Mhddfs
In the Debian and similar transplant system, you can use the following command to install mhddfs package.
# Apt-get update && apt-get install mhddfs
Mhddfs to install Debian-based system
In RHEL / CentOS Linux system, you need to turn epel warehouse, then execute the following command to install mhddfs package.
#yum install mhddfs
In Fedora 22 and above systems, you can dnf package manager to get it, like this below.
# Dnf install mhddfs
Mhddfs to install Fedora
If the case can not be obtained from epel mhddfs package to warehouse, then you need to solve the following dependencies, and then to compile the source code such as the following and install it.
libattr1 header file (optional)
Next, just download the latest source package from the following address recommendations, then compiled.
# Tar-zxvf mhddfs * .tar.gz
#cd mhddfs-0.1.39 /
You should see mhddfs binary files in the current directory, as root, move it to / usr / bin / and / usr / local / bin / in.
#cp mhddfs / usr / bin /
#cp mhddfs / usr / local / bin /
Everything was settled, mhddfs already used.
How I use Mhddfs?
1, let us look at all our system is currently mounted to the hard disk.
Check Mounted Devices
FilesystemSizeUsedAvailUse% Mounted on
/ Dev / sda1 511M132K511M1% / boot / efi
/ Dev / sda2 451G92G336G22% /
/ Dev / sdb1 1.9T161G1.7T9% / media / avi / BD9B-5FCE
/ Dev / sdc1 555M555M0100% / media / avi / Debian8.1.0 M-A 1
Note that the 'mount point' name, we will later use to them.
2, create a directory '/ mnt / virtual_hdd', all of these file systems will be grouped together here.
# Mkdir / mnt / virtual_hdd
3, and then mount all file systems. You can be done by root or a user group FUSE.
# Mhddfs / boot / efi, /, / media / avi / BD9B-5FCE /, / media / avi / Debian \ 8.1.0 \ M-A \ 1 / / mnt / virtual_hdd -o allow_other
Mount all the file systems in Linux
Note: Here we use all the hard disk mount point name, obviously, your name will be different mount point. Please also note that "-o allow_other" option allows the virtual file system so that everyone else can be seen, not just the people who create it.
4. Now, run "df -h" to look at all the file systems. It should contain the one you just created.
Verify that the virtual file system mount
You may like to have hanging in the drive to a virtual file system as an option for all applications.
5, to start every time the system create the virtual file system, as root you should add the following line of code (where you will be a little different, depending on your mount points) at the end of the / etc / fstab file.
mhddfs # / boot / efi, /, / media / avi / BD9B-5FCE /, / media / avi / Debian \ 8.1.0 \ M-A \ 1 / / mnt / virtual_hdd fuse defaults, allow_other 00
6. If at any time you want to add / remove a new drive to / from a virtual hard disk, you can mount a new drive, copy the contents of / mnt / vritualhdd unmount the volume, you want to remove the pop-up drive and / or mount a new drive that you want to include. Use mhddfs command to mount all the file system to the next Virtualhdd, so all set.
How do I uninstall Virtual_hdd?
Uninstall virtual_hdd fairly simple, such as the following
# Umount / mnt / virtual_hdd