OpenVZ Forum


Home » General » Support » Duplicate folder or what it is? /vz/root and /home/vps
Duplicate folder or what it is? /vz/root and /home/vps [message #51146] Tue, 25 February 2014 17:59 Go to next message
postcd is currently offline  postcd
Messages: 73
Registered: April 2013
Member
Hello,

i remember that i installed openvz and i started running out of disk space as number of VMs grow, so i moved or symlinked /vz to /home/vz (home partition is big)

but now, i dont understand why i have there two folders both contianing VMs data, is it duplicate or why its there?


[root@* /]# stat /vz
  File: `vz' -> `/home/vz'
  Size: 8         	Blocks: 0          IO Bl
Device: 902h/2306d	Inode: 238         Links
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)
Access: 2014-02-25 03:13:33.000000000 +0100
Modify: 2013-04-23 00:35:10.000000000 +0200
Change: 2013-04-23 00:35:10.000000000 +0200



[root@* /]# stat /home/vz
  File: `/home/vz'
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 903h/2307d	Inode: 99074049    Links: 8
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2014-02-25 18:22:27.000000000 +0100
Modify: 2013-07-18 19:46:54.000000000 +0200
Change: 2014-02-25 18:22:01.000000000 +0100


[root@* home]# du -h /home/vz --max-depth=0
96G	/home/vz


[root@* home]# du -h /home/vps --max-depth=0
89G	/home/vps


you see these big folders, almost same, both contains VPS data..

[root@* home]# ls vz;ls vps
dump  lock  private  root  template  vztmp
130  190  200  240  310  330  430  440  500  550  600  640  650  tmp.500-1  tmp.500-2


please can anyone can advice me what is wrong and which folder i need to backup? i used vzdump, but i want to do some rsync to another server so i need to know which VZ folder is needed to backup, i hope not boths (alot of data)?

[Updated on: Tue, 25 February 2014 18:05]

Report message to a moderator

Re: Duplicate folder or what it is? /vz/root and /home/vps [message #51147 is a reply to message #51146] Wed, 26 February 2014 11:26 Go to previous messageGo to next message
dipps is currently offline  dipps
Messages: 22
Registered: May 2013
Location: Out in the scrub
Junior Member
/vz and /home/vz will have similar contents, given that one is symlinked to the other. I don't understand why they aren't using the same space. No idea what /home/vps is.

Each container can have its filesystems in a different place. Suggest you look through the /etc/vz/conf/VEID.conf files and see where containers' files really are. Mine look like this:

VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"


Hopefully that will tell you what's actually being used.

I only back up the private tree on my CTs.. the root tree seems to be a working copy that disappears when the container is stopped. So far seems ok.
Re: Duplicate folder or what it is? /vz/root and /home/vps [message #51148 is a reply to message #51147] Wed, 26 February 2014 11:44 Go to previous messageGo to next message
postcd is currently offline  postcd
Messages: 73
Registered: April 2013
Member
dipps wrote on Wed, 26 February 2014 12:26

look through the /etc/vz/conf/VEID.conf files and see where containers' files really are.


in my case:

VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/home/vps/650"

/vz is a symlink to /home/vz i hope as mentioned in first post

dipps wrote on Wed, 26 February 2014 12:26

I only back up the private tree on my CTs.. the root tree seems to be a working copy that disappears when the container is stopped. So far seems ok.


Thank you, so in my case /home/vps is what to backup... so the VMs need to be stopped to backup safelly or it can be running?
Re: Duplicate folder or what it is? /vz/root and /home/vps [message #51149 is a reply to message #51148] Wed, 26 February 2014 12:05 Go to previous message
dipps is currently offline  dipps
Messages: 22
Registered: May 2013
Location: Out in the scrub
Junior Member
postcd wrote on Wed, 26 February 2014 22:14

VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/home/vps/650"


Ah, so that's where /home/vps comes in.

Quote:

Thank you, so in my case /home/vps is what to backup... so the VMs need to be stopped to backup safelly or it can be running?


Yeah I reckon. Safer if they're stopped. I don't know if the 2 trees are identical while it's running - I'm learning by experimenting, if anyone knows, please tell!

I've been using vzdump --suspend and --snapshot for backups. It automates the stop/rsync/start process, and tries to minimise the container's downtime. Also I like the way a vzdump file has everything you need to start up the VE on another HN.
Previous Topic: cpu limit not working
Next Topic: how to deal with /dev/loop for crypto disk ?
Goto Forum:
  


Current Time: Tue Nov 05 20:45:09 GMT 2024

Total time taken to generate the page: 0.05072 seconds