OpenVZ Forum


Home » Mailing lists » Users » Changing files during migration
Changing files during migration [message #13669] Fri, 01 June 2007 12:47 Go to next message
Jun OKAJIMA is currently offline  Jun OKAJIMA
Messages: 30
Registered: March 2006
Member
Hello.

If I change/modifi/delete opened files during migration,
what happens?

For example....

1. I run a mail daemon ( like qmail or sendmail) in a VE.
2. Freeze the VE and create a suspend image.
In this moment, the daemon opens /var/spool/mail/* files.
3. Delete(or modify) /var/spool/mail/* stuff.
Opened files are deleted(modified) during migration!!!.
4. Restore the suspend image.

What happens?
It resumes or not?
Maybe whole OS (host OS) hangs?
Just the daemon gets "File read error" or something after resumed?
Or you can not resume the suspend image anymore?

This is an interesting trial, but a bit fear to do it on the real server...

--- Okajima, Jun. Tokyo, Japan.
Re: Changing files during migration [message #13671 is a reply to message #13669] Fri, 01 June 2007 13:05 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Jun OKAJIMA wrote:
>
>
> Hello.
>
> If I change/modifi/delete opened files during migration,
> what happens?
>
> For example....
>
> 1. I run a mail daemon ( like qmail or sendmail) in a VE.
> 2. Freeze the VE and create a suspend image.
> In this moment, the daemon opens /var/spool/mail/* files.

how can daemon open the file if it is frozen (and the whole VE as well)?

> 3. Delete(or modify) /var/spool/mail/* stuff.
> Opened files are deleted(modified) during migration!!!.
> 4. Restore the suspend image.
>
> What happens?
> It resumes or not?
> Maybe whole OS (host OS) hangs?
> Just the daemon gets "File read error" or something after resumed?
> Or you can not resume the suspend image anymore?
>
> This is an interesting trial, but a bit fear to do it on the real server...
>
> --- Okajima, Jun. Tokyo, Japan.
>
>
>
Re: Changing files during migration [message #13672 is a reply to message #13671] Fri, 01 June 2007 13:23 Go to previous messageGo to next message
Jun OKAJIMA is currently offline  Jun OKAJIMA
Messages: 30
Registered: March 2006
Member
>>
>> If I change/modifi/delete opened files during migration,
>> what happens?
>>
>> For example....
>>
>> 1. I run a mail daemon ( like qmail or sendmail) in a VE.
>> 2. Freeze the VE and create a suspend image.
>> In this moment, the daemon opens /var/spool/mail/* files.
>
>how can daemon open the file if it is frozen (and the whole VE as well)?
>
>

Wait, wait. sorry, not opens, but opened.

[HostOS]# vzctl 101 start
[HostOS]# vzctl 101 enter
[VE101]# /etc/init.d/sendmail start
.... sendmail opens /var/spool/mail/* in this moment.
[VE101]# exit
[HostOS]# vzctl 101 save
[HostOS]# rm -rf /var/lib/vz/root/101/var/spool/mail
[HostOS]# vzctl 101 restore

---> Then, what happens?

--- Okajima, Jun. Tokyo, Japan.
Re: Changing files during migration [message #13673 is a reply to message #13672] Fri, 01 June 2007 13:32 Go to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Jun OKAJIMA wrote:
>>>If I change/modifi/delete opened files during migration,
>>>what happens?
>>>
>>>For example....
>>>
>>>1. I run a mail daemon ( like qmail or sendmail) in a VE.
>>>2. Freeze the VE and create a suspend image.
>>> In this moment, the daemon opens /var/spool/mail/* files.
>>
>>how can daemon open the file if it is frozen (and the whole VE as well)?
>>
>>
>
>
> Wait, wait. sorry, not opens, but opened.
>
> [HostOS]# vzctl 101 start
> [HostOS]# vzctl 101 enter
> [VE101]# /etc/init.d/sendmail start
> .... sendmail opens /var/spool/mail/* in this moment.
> [VE101]# exit
> [HostOS]# vzctl 101 save
> [HostOS]# rm -rf /var/lib/vz/root/101/var/spool/mail
> [HostOS]# vzctl 101 restore
>
> ---> Then, what happens?

restore should fail. Changing VE filesystem from VE0
is a hack actually. It is convinient for management in
some situations, but you should understand what you do.
In this case you modify the filesystem of VE which is
frozen and doesn't expect files modifications.

So restore fails.

Thanks,
Kirill
Previous Topic: E: You don't have enough free space in /var/cache/apt/archives/
Next Topic: Live CD fails in live migration.
Goto Forum:
  


Current Time: Mon Jul 15 15:33:17 GMT 2024

Total time taken to generate the page: 0.02435 seconds