Pb disk

Discussion in 'Installation/Configuration' started by Titalium, Oct 25, 2017.

  1. Titalium

    Titalium New Member

    Hello,
    I have a problem with the disk space from my ISPCONFIG server...
    [​IMG]

    Anyone have a solution to increase the size without losing data ?
    Thank you in advance.

    A French man who doesn't speak English very well.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. Titalium

    Titalium New Member

    Thank's but in my folder, i have shortcut from directory user :
    [​IMG]
    he redirects to /var/www/clients :

    [​IMG]
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    So the website files are under /var/www/clients? Then You can fix the too full root partition by doing as Till wrote, and move the /var/www/clients directory tree to somewhere under /home, since there is lots of space there.

    You do not state what operating system is used nor what kind of hardware. But the disk partitions seem like they are Multiple Device stuff, /dev/md1 looks like that. So maybe it is possible to change disk partition sizes with the whatever software is used to create those md devices?

    If still no luck, take disk image copies of those partitions, with tools like Norton Ghost or Clonezilla http://clonezilla.org/. Then install a new host with better disk partition sizes, and copy the disk images to those partitions.

    So there are options. I would say the way Till advised is fastest to do and easiest.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The instructions I posted are moving the full /var/www tree to another directory incl. the symlinks. Just follow the tutorial I posted, it is written for the exact problem you are facing and made for servers that run ISPConfig.
     
  6. Titalium

    Titalium New Member

    I have make the instructions, but it the same probleme ..
     
  7. Poliman

    Poliman Member

    I have similar problem as I wrote in other thread:
    "I have Cloud instance from OVH with ISPconfig 3.1.7p1 and Ubuntu Server 16.04 LTS. HDD size is around 50GB. I can only migrate to higher version of instance with faster CPU, more RAM, and more capacious HDD but it generates unnecessary costs. Second option is additional HDD. After buy I need to mount it. After this operation I will have in my system two disks - main 50GB and mounted somewhere secondary with some free space. I need to move /web/ directory (there are websites files which take a lot of space) of each user to this secondary HDD. The main problem is how to do this? Does it break ISP? Created databases and other ISP and Ubuntu files don't need to be moved anywhere. Please be patient with me and help me. :)

    PS
    I think that probably I need to move whole user account, not only /web directory but I don't know what is possible and faster."

    Thanks God this thread appear on horizon. I mounted new disk under /mnt/additionaldisk:
    Code:
    root@s1:~# lsblk
    NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
    sda      8:0    0   20G  0 disk
    ├─sda1   8:1    0   19G  0 part /
    ├─sda2   8:2    0    1K  0 part
    └─sda5   8:5    0 1022M  0 part [SWAP]
    sdb      8:16   0    2G  0 disk
    └─sdb1   8:17   0    2G  0 part /mnt/additionaldisk
    sr0     11:0    1 1024M  0 rom
    
    Then:
    Code:
    root@s1:/var/vmail# service postfix stop
    root@s1:/var/vmail# service dovecot stop
    root@s1:/var/vmail# service apache2 stop
    root@s1:~# mv /var/vmail /mnt/additionaldisk/
    root@s1:~# mkdir /var/vmail
    root@s1:~# chown vmail:vmail /var/vmail
    root@s1:~# chattr -i /var/www/clients/client*/web*
    root@s1:~# umount /var/www/clients/client*/web*/log
    root@s1:~# mv /var/www /mnt/additionaldisk/
    root@s1:~# mkdir /var/www
    root@s1:~# nano /etc/fstab
    
    and in /etc/fstab added:
    Code:
    /mnt/additionaldisk/vmail /var/vmail none bind,nobootwait,_netdev 0 0
    /mnt/additionaldisk/www /var/www none bind,nobootwait,_netdev 0 0
    But after I did "mount -a" I got message in console:
    Code:
    root@s1:~# mount -a
    mount: mount point /var/www/clients/client1/web1/log does not exist
    Did I understand well @till tutorial?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to put the two new bind mount lines in fstab before the bind mount lines for the log directories.
     
    Poliman likes this.
  9. Poliman

    Poliman Member

    If all commands which I put in earlier post were in good order I can say that your post Till done the job - "mount -a" doesn't give any message. Unbeliveable it's that simple.
     
    Last edited: Nov 2, 2017
  10. Poliman

    Poliman Member

    Is it possible to move only one user's files to additional disk? His web directory is under /var/www/. How to do it?
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    That should be possible as well. Move his web root to the other disk and then replace it with a bind mount.
     
    Poliman likes this.
  12. Poliman

    Poliman Member

    So I should do this same steps as for whole /var/www. But in this case it would be /var/www/clients/clientX/webX/web, it that right (here can't be symbolic link?)?
     
  13. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I would move the whole client directory, not just the web/. That is, move /var/www/clients/clientX . You are right about symlink, symlinks do not use diskspace so moving them does not help.
     
    Poliman likes this.
  14. Poliman

    Poliman Member

    Thank you for answer. What about moving whole /var/www/ as I mentioned earlier. Is that right procedure? ;)
     
  15. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You should read again what Till answered in #5.
     
  16. Poliman

    Poliman Member

    How mount permanentnly additional disk during boot on Ubuntu Server?
     
  17. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  18. Poliman

    Poliman Member

    What about quota after move www and vmail to additional disk? Defautl disk has in /etc/fstab:
    Code:
    usrjquota=quota.user,grpjquota=quota.group
    (whole line:))
    Code:
    LABEL=cloudimg-rootfs   /        ext4   defaults,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 0
    
    PS
    I have a problem with
    Code:
    umount /var/www/clients/client*/web*/log
    , there is:
    Code:
    umount: /var/www/clients/client4/web4/log: target is busy
            (In some cases useful info about processes that
             use the device is found by lsof(8) or fuser(1).)
    umount: /var/www/clients/client5/web8/log: target is busy
            (In some cases useful info about processes that
             use the device is found by lsof(8) or fuser(1).)
    
    Strange thing, because 6 another mounts got umount nicely.
     
    Last edited: Jan 22, 2018
  19. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    To get quota working on the additional disk, modify the fstab line for that disk in similar way, i.e. add the quota options.

    As for the PS, if the system claims "target is busy" then it is quite certain some process has working directory or open files on that mount. It may be your command window where pwd is that directory. Like the error message suggests, the lsof or fuser commands can help in finding which process is involved, if you can not find it otherwise.
     
  20. Poliman

    Poliman Member

    After add quota lines to additional disk should I execute some command like mount -a? I deleted added lines like tutorial says (section 11. Install PureFTPd and Quota) https://www.howtoforge.com/tutorial...pureftpd-bind-postfix-doveot-and-ispconfig/2/, added them to additional disk configuration and I executed only
    Code:
     mount -o remount /mnt/disk
    and after this
    Code:
    root@s1:~# quotacheck -avugm
    quotacheck: Quota for users is enabled on mountpoint / so quotacheck might damage the file.
    Please turn quotas off or use -f to force checking.
    I am not sure information above is good.
    Mine fstab (current):
    Code:
    LABEL=cloudimg-rootfs   /        ext4   defaults        0 0
    
    #dodatkowy dysk
    UUID="0fae4444-161b-4a9b-b82b-6f169d04598e"     /mnt/disk       ext4    defaults,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0,nofail,x-systemd.device-timeout=1       0 0
    /mnt/disk/vmail /var/vmail none bind,nobootwait,_netdev 0 0
    /mnt/disk/www /var/www none bind,nobootwait,_netdev 0 0
    
    
    Before was:
    Code:
    LABEL=cloudimg-rootfs   /        ext4   defaults,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0        0 0
    
    #dodatkowy dysk
    UUID="0fae4444-161b-4a9b-b82b-6f169d04598e"     /mnt/disk       ext4    defaults,nofail,x-systemd.device-timeout=1       0 0
    /mnt/disk/vmail /var/vmail none bind,nobootwait,_netdev 0 0
    /mnt/disk/www /var/www none bind,nobootwait,_netdev 0 0
    
    For the PS - I used only one terminal, even never was inside these both directories, so I just used umount -l option. Then it works.
     
    Last edited: Jan 24, 2018

Share This Page