move /var/www to /home/www

Discussion in 'General' started by JESUSSAVES, Oct 8, 2014.

  1. JESUSSAVES

    JESUSSAVES New Member

    Hi,

    Can someone please advise if this will break ISPConfig?

    Install new hard drive, create LVM partition, mount /home on new drive, mv /var/www /home, and put a symbolic link for www in /var.

    I'm having problems with ISPConfig after doing this.

    Debian 7.6, Apache2, ISPConfig 3.0.5.3.

    Thank you for your help.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. spydom

    spydom New Member

    Hi. I followed the above guide but there has to be something that I am missing. It seems that both disks (/dev/sda2 and /dev/md127 in my case) are filling with data.
    What I wanted to do was to place the /var/www directory on a seperate disk (/dev/md127) without affecting ISPConfig. But when checking with df it seems that both /dev/sda2 and /dev/md127 are growing, and the first one is pretty small.
    Thanks in advance for your advise.
    Spyros
     
  4. Taleman

    Taleman Active Member HowtoForge Supporter

    You give precious little information. What do
    Code:
    df -hT
    ,
    Code:
    sudo fdisk -l
    , and
    Code:
    cat /etc/fstab
    show?
     
  5. spydom

    spydom New Member

    Thanks Taleman.
    Code:
    [email protected]:/var# df -hT
    Filesystem  Type  Size  Used Avail Use% Mounted on
    udev  devtmpfs  12G  0  12G  0% /dev
    tmpfs  tmpfs  2.4G  133M  2.3G  6% /run
    /dev/sda2  ext4  69G  57G  7.9G  88% /
    tmpfs  tmpfs  12G  0  12G  0% /dev/shm
    tmpfs  tmpfs  5.0M  4.0K  5.0M  1% /run/lock
    tmpfs  tmpfs  12G  0  12G  0% /sys/fs/cgroup
    /dev/sda1  ext4  922M  38M  822M  5% /boot
    /dev/md127  ext4  1.8T  87G  1.7T  5% /raidata
    tmpfs  tmpfs  2.4G  4.0K  2.4G  1% /run/user/111
    tmpfs  tmpfs  2.4G  0  2.4G  0% /run/user/1000
    
    Code:
    [email protected]:/var# fdisk -l
    Disk /dev/sda: 74.5 GiB, 80026361856 bytes, 156301488 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x27377514
    
    Device  Boot  Start  End  Sectors  Size Id Type
    /dev/sda1  *  2048  1953791  1951744  953M 83 Linux
    /dev/sda2  1953792 148301823 146348032 69.8G 83 Linux
    /dev/sda3  148301824 156301311  7999488  3.8G 82 Linux swap / Solaris
    
    
    Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x8d5008f0
    
    Device  Boot Start  End  Sectors  Size Id Type
    /dev/sdc1  2048 3907029167 3907027120  1.8T fd Linux raid autodetect
    
    
    Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0xff20952c
    
    Device  Boot Start  End  Sectors  Size Id Type
    /dev/sdb1  2048 3907029167 3907027120  1.8T fd Linux raid autodetect
    
    
    Disk /dev/md127: 1.8 TiB, 2000263643136 bytes, 3906764928 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    Code:
    [email protected]:/var# cat /etc/fstab
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>  <type>  <options>  <dump>  <pass>
    # / was on /dev/sda2 during installation
    UUID=a025319e-e3ba-4732-8f12-f4b4ee7ae36c /  ext4  errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0  0
    # /boot was on /dev/sda1 during installation
    UUID=00f5b6fe-d83d-4d18-930a-c9a528e7762a /boot  ext4  defaults,noatime  0  0
    # swap was on /dev/sda3 during installation
    UUID=e6f7207a-4766-4c4e-9ef4-43235f8c6ca2 none  swap  sw  0  0
    
    /dev/md127  /raidata  ext4  noatime,rw  0  0
    /raidata/vmail /var/vmail none bind,nobootwait,_netdev 0 0
    /raidata/www /var/www none bind,nobootwait,_netdev 0 0
    /var/log/ispconfig/httpd/demosite1.gr /var/www/clients/client3/web3/log  none  bind,nofail  0 0
    /var/log/ispconfig/httpd/demosite2.gr /var/www/clients/client1/web19/log  none  bind,nobootwait  0 0
    
    My distribution is Debian 9.
     
    Last edited: Mar 24, 2018
  6. Taleman

    Taleman Active Member HowtoForge Supporter

    The df output shows there is lots of free disk space on /dev/md127.
    Code:
    /dev/md127  ext4  1.8T  87G  1.7T  5% /raidata
    There is 5 % used space and 1.7 Terabytes free. So that is not filling with data, at least not yet.
    On the other hand, /dev/sda2 is 88 % full. Did you succesfully move the /var/www data from sda2 to md127?
    Code:
    /dev/sda2  ext4  69G  57G  7.9G  88% /
    How much is there in the directory trees? Check with du command like this:
    Code:
    du -shc /var/www
    du -shc /raidata/www
     
  7. spydom

    spydom New Member

    Thanks again Taleman.
    Code:
    [email protected]:/home/spyros# du -shc /var/www
    140G  /var/www
    140G  total
    
    Code:
    [email protected]:/home/spyros# du -shc /raidata/www
    140G  /raidata/www
    140G  total
    
    Pls note that the /var/www directory was empty at first place, I knew that /dev/sda2 was sort so I wanted to have ISPConfig use the /raidata/www instead. Unfortunately both grow together...
     
  8. Taleman

    Taleman Active Member HowtoForge Supporter

    You have not understood what the bind mount does. It "binds" /var/www and /raidata/www together.
     
  9. spydom

    spydom New Member

    Thank you Taleman for your time. I'll do my homework again.
     

Share This Page