2

Situation: I just migrated my disks from a HP MicroServer to a HP DL320e v2, in the process discarding an onboard backup HDD. To replace it I've added another SSD that I want to add to my LVM VG.

Problem: I got carried away with all the changes now I have some new toys to play with (mmm bonding) and I started a pvmove operation on a PV close to 1TB. It's going along at around 40 MB/s so will take just under 7 Hours to complete. I ran it in an SSH session via putty on my Windows PC but I'd like to turn it off now.

What I should have done: Either use a local console (iLO) or use a screen session.

So my question is basically what can I do?

  • Is it okay to stop pvmove and pick it up later (is Ctrl-C okay)?
  • Can I send it to the background Ctrl-Z and then bring it foreground fg again in a screen session? Maybe I should research that now I mention it.
  • Should I leave the PC on? I'd rather save the electric.

I'm open to known good suggestions - I'd really rather not use my backups.

Thanks in Advance, Al

albal
  • 141
  • 6

1 Answers1

2

Okay so looks like it has been asked and answered before. Once I thought to write background and foreground in another session I had more appropriate search terms to work with.

The magic is done with reptyr - simply apt-get install reptyr

This is what I did (note I edited the lines to show which TTY the I/O is on):

(pts/4) /dev/sda5: Moved: 10.6%

(pts/5) # apt-get install reptyr
(pts/5) # screen

(pts/4) /dev/sda5: Moved: 10.6%

(pts/6) # ps -ef | grep pvmove
(pts/6) root 20618 13769 0 22:40 pts/4 00:00:00 pvmove /dev/sda5 --interval 10 --verbose
(pts/6) # reptyr 20618

(pts/4) [1]+  Stopped                 pvmove /dev/sda5 --interval 10 --verbose

(pts/6) /dev/sda5: Moved: 10.8%
(pts/6) /dev/sda5: Moved: 10.9%`

Nothing like playing with live fire (so long as you don't get burnt).

albal
  • 141
  • 6