1822042 Members
3625 Online
109640 Solutions
New Discussion юеВ

Re: Vgsync

 
SOLVED
Go to solution

Vgsync

I would like know if I launch a
vgsync /dev/cxtxdx &
and the synchronization begin, if I logout and block the console, LVM kill the vgsync process or not?

There are times in witch I must go to other clients and I would like leave the system running vgsync but I don??t know what happens if i try to exit from root and block the console to prevent unauthorized users. The theory says "When one user logout all the processes launched by him are automatic killed"

Thanks for your contribution!
Jorge Martinez
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: Vgsync

I wouldn't do it the way you are thinking. There is a very good chance that the vgsync process would be killed.

A way that would probably work better would be:

# nohup vgsync vg?? &

That way, even if you logout, the nohup should keep the process going.
A. Clay Stephenson
Acclaimed Contributor

Re: Vgsync

The answer is to use nohup.

e.g.

nohup vgsync /dev/vgxx &

You can then logout and your command is immune to hangups (SIGHUP) and n'rupts (SIGINT). It's just what you need. Man nohup for details.

Regards, Clay
If it ain't broke, I can fix that.
Helen French
Honored Contributor

Re: Vgsync

Hi,

The theory is RIGHT ! The process will get killed when you log out ! Try 'nohup' command instead; see man pages of nohup.

HTH,
Shiju
Life is a promise, fulfill it!
Sanjay_6
Honored Contributor
Solution

Re: Vgsync

Hi jorge,

Most of the time vgsync would be finish in no time at all. It takes a couple of seconds for the vgsync to complete. The only time when vgsync would take more time, is when you have a problem with the mirror and the mirrors are not synced. IF you still want to do vgsync and logout, use nohup,

nohup vgsync /dev/vg_name &

Hope this helps.

Regds
Darrell Allen
Honored Contributor

Re: Vgsync

Hi,

Nohup has saved my bacon more than once. I use it regularly when dialed in since dialup connections tend to get dropped at the most inopportune moment.

I'd suggest you redirect output. Nohup appends to nohup.out by default but I prefer my own names:

nohup vgsync vgxx >outfile 2>errfile &

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Xavier Gutierrez
Frequent Advisor

Re: Vgsync

Hi, Jorge

Try this:

nohup vgsync vgxx &

This will prevent the process to be killed in case of a hangup (nohup stands for NO-Hang-UP) or connection close.

Best regards,

Xavier
Live fast, die young!