Saturday, May 7, 2016

combines multiple mount points into single mount point

you need a big capacity to store repositories, such as ubuntu, debian, python,  it can be 3TB+ so you need to have 4TB or bigger to store it but  if you have have smaller harddisks, more than 2 of 2TB, you still able to store it but we mhddfs to combine the space.

1- install mhddfs to the system
$ sudo apt-get install mhddfs

2- for example we have 2 partition /dev/sdb1 /dev/sdb2 so we mount it to /media/mount1 and /media/mount2 respectively
$ sudo mkdir /media/mount{1,2}
$ sudo mount /dev/sdb1 /media/mount1
$ sudo mount /dev/sdb2 /media/mount2

3- now we use mhddfs to combine the space of sdb1 and sdb2 to directory /media/mounttotal
$ mkdir /media/mounttotal
$ mount /dev/mount1 /dev/mount2 /media/mounttotal

4- to df -h to check and verify the space of the mount points
$ sudo df -h
Filesystem                    Size  Used Avail Use% Mounted on
udev                          975M     0  975M   0% /dev
tmpfs                         199M  8.7M  190M   5% /run
/dev/sda1                     196G  8.0G  178G   5% /
tmpfs                         992M   16K  992M   1% /dev/shm
tmpfs                         5.0M     0  5.0M   0% /run/lock
tmpfs                         992M     0  992M   0% /sys/fs/cgroup
tmpfs                         199M     0  199M   0% /run/user/1000
/dev/sdb1                     4.8G   10M  4.6G   1% /media/mount1
/dev/sdb2                     4.8G   10M  4.6G   1% /media/mount2
/media/mount1/;/media/mount2  9.6G   20M  9.1G   1% /media/mounttotal


so we need /media/monttotal space is 9.6G that combine the sdb1 and sdb2

No comments:

Post a Comment