Operating System - HP-UX
1753626 Members
5462 Online
108797 Solutions
New Discussion юеВ

Re: determine status of vgmove

 
Doug Wilburn
Advisor

determine status of vgmove

I am migrating to new storage (from older EVA to newer EVA) using vgmove. I have some fairly large filesystems to move (800GB). When moving the first one, the vgmove had been running for two days. It seemed "hung", so I killed the process. But when I checked, the vgmove appeared to have been successful. The new pv now had all the pe's and the old pv had 0 allocated pe's. I finished the job by "vgreduce'ing" and everything was fine. I am now vgmove'ing another vg to new storage. Is there a way to check on the status of the vgmove (without having to just let it run and kill it after two days)?

2 REPLIES 2
Matti_Kurkela
Honored Contributor

Re: determine status of vgmove

Exactly how did you run the vgmove command? Did you run it in the background, e.g. by adding and "&" to the command line?

If you did that, the command would still be associated with the terminal session and if it attempted to output anything to the terminal, it would be held suspended until you used the "fg" command, so that it could present its output to you. This is how the standard shell job control works.

 

The vgmove command might have actually completed its job successfully and only hung because it could not output its "job complete" message at the very end.

 

You could avoid this by running the backgrounded command with the "nohup" prefix command, i.e. instead of running:

vgmove <parameters> &

 you would run:

nohup vgmove <parameters> &

 

The "nohup" command achieves two things:

  • it makes the command immune to SIGHUP, so you can leave the command running while logging out of your terminal session
  • it redirects the command's standard input from /dev/null and standard output & error to a file named "nohup.out", so the command will not need to hang if it requests input or attempts to produce any output. Any output is also saved so that you can examine it later.
MK
Doug Wilburn
Advisor

Re: determine status of vgmove

Thanks for that input, but I ran the vgmove in the "foreground"/interactively. The command I used was "vgmove -f diskmap.txt /dev/vgname". I didn't use "&" or "nohup".