Today I hired a VPS with 12GB HD. 3GB for the system disk, 9GB left; It was created two partitions: One: /dev/xvdb1 == /home Two: /dev/xvdb2 == /var Data were transferred to each new partitions with the command "find . -depth -print0 | cpio –null –sparse -pvd /srv/newhome/" by tutorial http://helpforlinux.blogspot.com.br/2009/0... After all is done and reboot, I went to see the list of partitions -------------------------------------------------- #mount -v /dev/xvda1 on / type ext4 (rw,noatime,errors=remount-ro) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) /dev/xvdb1 on /home type ext4 (rw) /dev/xvdb2 on /var type ext4 (rw) /dev/xvdb1 on /srv/Home type ext4 (rw,nosuid,nodev,noatime) /dev/xvdb2 on /srv/Var type ext4 (rw,nosuid,nodev,noatime) tmpfs on /var/gandi type tmpfs (rw,mode=0755,size=22000) -------------------------------------------------- Realize that you have: /dev/xvdb1 on /home type ext4 (rw) /dev/xvdb2 on /var type ext4 (rw) /dev/xvdb1 on /srv/Home type ext4 (rw,nosuid,nodev,noatime) /dev/xvdb2 on /srv/Var type ext4 (rw,nosuid,nodev,noatime) * the ideal is to run out the last 2 lines -------------------------------------------------- My fstab #cat /etc/fstab /dev/xvda1 / ext4 rw,noatime,errors=remount-ro 0 1 devpts /dev/pts devpts defaults 0 0 none /proc proc rw,nosuid,noexec 0 0 /dev/xvdb1 /home ext4 defaults 0 2 /dev/xvdb2 /var ext4 defaults 0 2 -------------------------------------------------- They know how to not let it hit the record repeated? excuse the English.
Hosting expert mode: /home and /var its own partition
You should be logged in to post new messages. Create an account.
- By:
Bernardo Sepulveda de Castro - Date: on 2012 Jul. 12 01:59
- Subject: /home and /var its own partition
- By: Nicolas Chipaux
- Date: on 2012 Jul. 19 16:18
- Subject: Re: /home and /var its own partition
On Thu, 12 Jul 2012 01:59:00 +0200 Bernardo Sepulveda de Castro <bs.castro@gmail.com> wrote:
Today I hired a VPS with 12GB HD. 3GB for the system disk, 9GB left; It was created two partitions: One: /dev/xvdb1 == /home Two: /dev/xvdb2 == /var
Hello, I advise you not use partition on your virtual disk. This will hurt the input/output performance. You can create 2 virtual disks, one for your home and one for your var which will be mounted by gandi-mount during the boot process in /srv/<your-label>/ More information here : http://gandikitchen.net/post/2010/12/24/Ne...
Data were transferred to each new partitions with the command "find . -depth -print0 | cpio -null -sparse -pvd /srv/newhome/" by tutorial http://helpforlinux.blogspot.com.br/2009/0... After all is done and reboot, I went to see the list of partitions -------------------------------------------------- #mount -v /dev/xvda1 on / type ext4 (rw,noatime,errors=remount-ro) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) /dev/xvdb1 on /home type ext4 (rw) /dev/xvdb2 on /var type ext4 (rw) /dev/xvdb1 on /srv/Home type ext4 (rw,nosuid,nodev,noatime) /dev/xvdb2 on /srv/Var type ext4 (rw,nosuid,nodev,noatime) tmpfs on /var/gandi type tmpfs (rw,mode=0755,size=22000) -------------------------------------------------- My fstab #cat /etc/fstab /dev/xvda1 / ext4 rw,noatime,errors=remount-ro 0 1 devpts /dev/pts devpts defaults 0 0 none /proc proc rw,nosuid,noexec 0 0 /dev/xvdb1 /home ext4 defaults 0 2 /dev/xvdb2 /var ext4 defaults 0 2
If you want to manually manage your disk on your virtual server, you can disable the udev rules which automatically mount the additional virtual disk to /srv/<disk-label> by commenting the line containing RUN+="/etc/gandi/manage_data_disk.py" in /etc/udev/rules.d/86-gandi.rules This way, virtual disk will be attached to your server by our Xen infrastructure during the boot and will be shown by the kernel in /proc/partitions. Virtual disks however will not be mounted. A couple of warning about adding additional disk entry in your /etc/fstab : * if you detach a disk and reboot your server, the boot will hangs with an emergency root console complaining the disk is missing. * if you move all data from /var to an additional disk, you may experienced probleme during the boot. I advise you to move only none boot essential data to your additional disk. For example : /var/log /var/cache /var/lib/mysql to an additional disk which could be labeled /more.space. By creating softlink back to /var (/more.space/log -> /var/log) you can keep a compatibility with the current setup. my 2 cents.
Nicolas Chipaux GANDI - http://www.gandi.net
- By:
Bernardo Sepulveda de Castro - Date: on 2012 Jul. 23 21:19
- Subject: Re: /home and /var its own partition
It would be better then having it all in "/"? you advise that? Do you have a tip for safe partitioning Gandi VPS
- By: Nicolas Chipaux
- Date: on 2012 Jul. 30 19:36
- Subject: Re: /home and /var its own partition
On Mon, 23 Jul 2012 21:19:28 +0200 Bernardo Sepulveda de Castro <bs.castro@gmail.com> wrote:
It would be better then having it all in "/"? you advise that? Do you have a tip for safe partitioning Gandi VPS
My advice would be : keep the system disk to the default size and add additional disk with the necessary space for your user or application. I prefer to repeat the information from my previous post but please do not make partition on the virtual drive which will be attached to your virtual server. You will get a I/O performance loss. Example : (first disk /dev/xvda1) / -> /usr, /etc, /tmp, /lib, ... (second disk /dev/xvda2) automatic swap (third disk /dev/xvdb) /srv/<your_label> -> /srv/<your_label>/site/www.example.tld, /srv/<your_label>/postgresql, ... (fourth disk ...) (...)
Nicolas Chipaux GANDI - http://www.gandi.net
- By:
Bernardo Sepulveda de Castro - Date: on 2012 Aug. 2 20:51
- Subject: Re: /home and /var its own partition
Nicolas great, thanks for your answer. Virtualization is a new thing for me.



