Adding & Using Second Hard Drive (home02)

Richard8

Verified User
Joined
Jul 4, 2019
Messages
73
Location
USA
I've added a cloud volume to my DirectAdmin by going through the normal steps of mounting it with usrquota,grpquota,noatime,nofail 0 2 (it's ext4, CentOS 7). I can verify the quota group/user files are there, and 'repquota /mnt/home02' outputs just fine. My second drive is in use properly at the system level.

After reading through some sort of old instructions about 2nd drives and DA, I managed to set ext_quota_partitions=/mnt/home02 in directadmin.conf and restarted directadmin and httpd (wasn't sure if Apache restart was required).

I got a bit lost regarding the exim settings to check the second location, and how the quotas for email are calculated (it's important I track email space/quota). I only plan on having a handful of users on this extra /mnt/home02, but I definitely will need everything working on both drives (/home which is mounted as /, and /mnt/home02).

If I edit the exim.conf hard-coded lines, what happens after I run exim changes with custombuild? Will I mess up my quotas or do I need to add the exim changes to another file? That above link about exim paths is from 2012. I'm on the latest beta release, latest custombuild 2, CentOS 7 on a VPS.

I want to make sure I'm adding this right. I know the VPS / provider should be fine, as I previously had a /home2 on cPanel, same virtual server specs and data center -- if I recall for that instance I did a ln -s to /home/02 or something, but I can't be certain. I want to do it the "DirectAdmin way" so I don't start getting lost in my own conf changes (and losing them later in the process..).

Thanks,
 
Some information related to my setup:

[root@]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Wed Jan 30 17:45:28 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/sda / ext4 defaults,usrquota,grpquota 1 1
/dev/sdb none swap defaults 0 0
/dev/disk/by-id/scsi-0Linode_Volume_home02 /mnt/home02 ext4 usrquota,grpquota,noatime,nofail 0 2



[root@ home02]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda 154G 23G 123G 16% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 8.5M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sdc 99G 61M 94G 1% /mnt/home02
tmpfs 783M 0 783M 0% /run/user/1004




[root@]# repquota /mnt/home02
*** Report for user quotas on device /dev/sdc
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 4 0 0 1 0 0
 
And lastly (I'm not sure this matters or not), but my Exim that I'm referring to when I mention the email quota checking is a SpamBlockerTechnology* powered exim.conf, Version 4.5.14 custombuild setup.

Should I just specify the extra directory = in some special exim.conf space where it won't get overwritten, or should I do some symlink and switch up my /mnt/home02? Before I'm married to that location forever and start using it more often, it doesn't have to be /mnt/home02 named if it makes things easier / more future proof.
 
39rfmw

Create symlinks instead of modifying exim.conf ;)


/home2/userbob/ -> /home/userbob/


https://help.directadmin.com/item.php?id=451

Is the bit about Exim paths, and mail quota issues etc. still a thing?

If I just create my symlink I can expect the account to work normally for the ones I did symlink? ... calculate mail quota properly, and so forth? It's only a handful of accounts that need this one specific block of space. It'll also be nice to know in the future how much editing is needing, since I like to mount drive as easily as possible but still have them work.

Worst thing is when one of your cloud drives decides it's done for the day and unmounts itself because of an update or breaks symlink and the end-user thinks their world just ended. :D
 
You need to enable disk quotas on /home2/ in /etc/fstab and configure directadmin to calculate quotas from /home2/ via ext_quota_partitions= (which you already have done).

All is calculated fine:

- directadmin:

Code:
Disk  Usage               37.51 GB
E-mail Disk Usage	146.19 MB	
Database Disk Usage	94.07 MB

- console:

Code:
[root@srv2 poralix]# du -h --max-depth=1 /home2/userbob/ | sort -h -r
38G     /home2/userbob/domains
38G     /home2/userbob/
131M    /home2/userbob/Maildir
16M     /home2/userbob/imap
...
 
You need to enable disk quotas on /home2/ in /etc/fstab and configure directadmin to calculate quotas from /home2/ via ext_quota_partitions= (which you already have done).

Gotcha. So, rather than doing a symlink from /mnt/home02 to /home2 ("cPanel way"), I can just use /mnt/home02 as is since I'm mounted and quota'd correctly and I have specified ext_quota_partitions.

Thanks for clarification!
 
Back
Top