Switch to a new partition ?

  • Hello ,



    Really need help! How to transfer VAR folder to another partition ? Because i do this and need help dont have free space on partition. Today i buy additional disk space and make partition. I mean second partition will be only for VAR folder ... (mail, web ... ) ...
    or switch everything to a new partition but how?


    Anyone can help !?




    Debian Jessie
    i-MSCP 1.5.1
    Build: 20170908
    Codename: Ennio Morricone

  • @kennosys


    I report here what I've ansswered you privately (no tested):


    [hr]


    Good morning,


    Your/dev/sdb storage is mounted on the /mnt/vdb directory. i-MSCP knows nothing about this new storage and there is no way to say it to use older storage and new storage at the same time. Your problem is not an i-MSCP problem, that is a partition layout problem. Currently you have a single partition mounted on / that hold all data (/var, /usr, /home ...). One way to solve your problem would be to move the variable data (/var) to the new storage. For instance:


    1. Switch to rescue mode
    2. Mount your /dev/sda on the /mnt/sda directory (create it first)
    Note: Replace /dev/sda by the real name (in rescue mode, it could be another).
    3. Mount your /dev/sdb on the /mnt/sdb directory (create it first)
    Note: Replace /dev/sdb by the real name (in rescue mode, it could be another).
    4. Copy the data from your current /dev/sda/var directory into your new partition:


    Code
    1. cd /mnt/sda/varcp -ax * /mnt/sdb

    5. Rename the current /var directory from your /mnt/sda storage (you'll be able to delete it when you'll be sure that all has been correctly moved):


    Code
    1. mv /mnt/sda/var /mnt/sda/var.old

    6. Create the new empty /mnt/sda/var directory:


    Code
    1. mkdir /mnt/sda/var

    7. Umount your /dev/sdb storage:


    Code
    1. umount /mnt/sdb

    8. Mount your /dev/sdb storage on the new /mnt/sda/var directory:


    Code
    1. mount /dev/sdb /mnt/sda/var

    Note: Replace /dev/sdb by the real name (in rescue mode, it could be another).


    9. Check that all goes fine. The /mnt/sda/var directory should contains your data.
    10. Edit your /mnt/sda/etc/fstab file and add something like:

    Code
    1. /dev/sdb /var ext4 defaults 0 0

    Warning: change ext4 to the correct value if you do not have created an ext4 filesystem on /dev/sdb.


    11. Return in normal mode (reboot)
    12. Delete the /var.old directory if all goes fine.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206