FSTAB Volumes Setup

Discussion in 'Server Operation' started by fatmike, Mar 20, 2020.

Tags:
  1. fatmike

    fatmike Member

    Hello.
    I have a VPS Cloud from Hetzner.
    OS is debian 9 and have installed ISPConfig 3.1 (latest).

    The below information are hypothetical.

    I have two clients.
    One of them requires large amount of email storage -> /var/vmail/clientsdomain.com
    and the other large amount of file storage (eg. uploads web directory). -> /var/www/clients/client1/web1/web/uploads

    As you may know hetzner allows extra volumes to be added to their cloudvps.
    What is the safest future proof way to handle the above?

    1. Setup the /etc/fstab/ like:
    Code:
    UUID=this_is_the_id / ext4 defaults,errors=remount-ro,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0 1
    /dev/disk/by-id/scsi-0HC_Volume_ID1 /var/vmail/clientsdomain.com ext4 defaults,errors=remount-ro,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0 0
    /dev/disk/by-id/scsi-0HC_Volume_ID2 /var/www/clients/client1/web1/web/uploads ext4 defaults,errors=remount-ro,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0 0
    
    So the mount points are the actual directories that already exist.

    or
    2. Leave the mount point to /mnt/scsi-0HC_Volume_ID1 and /mnt/scsi-0HC_Volume_ID1 and create symlinks of the /var/vmail/clientsdomain.com and /var/www/clients/client1/web1/web/uploads to those mount points.


    What would you recommend?

    Best regards
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Recommend for what? What are the requirements?
    There is this tutorial on how to add disk for website or email on an already installed system.
    https://www.howtoforge.com/use_moun...ctory_of_a_ispconfig_server_to_a_new_location
    I do not know if there would be significant differences between your methods 1 and 2. Did you check both of them work? If you have not verified the 2. works, I would go with 1 since at least the quota system would work, I'm not sure if quotas handle that symlink.
     
  3. fatmike

    fatmike Member

    Hello.
    Thanks for the link.

    The tutorial seems like "my option" #1 but with some unnecessary steps.

    @till
    Why move the directories to a new location and then mount bind those folders to the new ones that are mounted to the new HDD partition?
    Isn't it just simpler to mount the disk directly to the folder you want in the first place?

    Best regards
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The tutorial by Till describes a different situation than yours. Since
    (I know nothing about these Hetzher extra volumes) which seem like disk devices or disk partitions from the way you use them in fstab, you can mount that extra partition to a mount point of your choosing.
    The Till tutorial however, is used when host does not have extra disk drives. The partitions for www and or mail are full, but there is a third partition that does have free space. Then bind mount can be used to get that free space for www or mail.
     
    fatmike likes this.
  5. fatmike

    fatmike Member

    Oh sure yes, you are right.
    In the tutorial if you have one extra partition or drive you can mount more than one folders. My way you cannot do one to many, just one to one.

    I got it.

    Thank you
     

Share This Page