The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Using mount --bind to save space on partition

Discussion in 'Bind / DNS / Nameserver Issues' started by BassTeQ, Feb 26, 2014.

  1. BassTeQ

    BassTeQ Member

    Joined:
    Aug 31, 2008
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,

    I have created a bind mount to move data to a larger partition. Mount is showing this
    Code:
    /usr/local/stuff on /home/stuff type none (rw,bind)
    Once mounted I copy some files into /usr/local/stuff, but when I run command 'df' it's now showing less free space then I had before? Any ideas?

    Thanks
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. BassTeQ

    BassTeQ Member

    Joined:
    Aug 31, 2008
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Hi Michael, I didn't think quotas applied to system directories eg /usr ?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. BassTeQ

    BassTeQ Member

    Joined:
    Aug 31, 2008
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Output from mount

    Code:
    /dev/sda5 on / type ext3 (rw,noatime,usrquota)
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
    /dev/sda8 on /home type ext3 (rw,noatime,usrquota)
    /dev/sda6 on /tmp type ext3 (rw,noexec,nosuid)
    /dev/sda3 on /usr type ext3 (rw,noatime,usrquota)
    /dev/sda2 on /var type ext3 (rw,noatime,usrquota)
    /dev/sda1 on /boot type ext3 (rw,noatime)
    tmpfs on /dev/shm type tmpfs (rw)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    /tmp on /var/tmp type none (rw,noexec,nosuid,bind)
    sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
    /dev/sdb2 on /backup/var type ext3 (rw)
    /dev/sdb3 on /backup/usr type ext3 (rw)
    /dev/sdb6 on /backup/tmp type ext3 (rw)
    /dev/sdb8 on /backup/home type ext3 (rw)
    /dev/sdb5 on /backup/basedir type ext3 (rw)
    /usr/local/stuff on /home/stuff type none (rw,bind)
    Output from fstab

    Code:
    /dev/sda5               /                       ext3    noatime,defaults,usrquota        1 1
    /dev/sda8               /home                   ext3    noatime,defaults,usrquota        1 2
    /dev/sda6               /tmp                    ext3    noatime,defaults        1 2
    /dev/sda3               /usr                    ext3    noatime,defaults,usrquota        1 2
    /dev/sda2               /var                    ext3    noatime,defaults,usrquota        1 2
    /dev/sda1               /boot                   ext3    noatime,defaults        1 2
    tmpfs                   /dev/shm                tmpfs   defaults        0 0
    devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
    sysfs                   /sys                    sysfs   defaults        0 0
    proc                    /proc                   proc    defaults        0 0
    /dev/sda7               swap                    swap    defaults        0 0
    /usr/local/stuff       /home/stuff          none    bind            0 0
    
    Thanks!
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket using the link in my signature so we can take a closer look and determine if there are any obvious problems with your configuration. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  7. BassTeQ

    BassTeQ Member

    Joined:
    Aug 31, 2008
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Hi Michael,

    I've worked out the issue, in /etc/fstab I had the directories around the wrong way. I've changed it to this

    Code:
    /home/stuff            /usr/local/stuff          none    bind            0 0
    When I then 'mount /home/stuff' is doesn't occupy any space in /usr, which is what I was expecting to see.

    Thanks for your help!
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page