Highlighted
Super Contributor.
Super Contributor.
166 views

Copy/move primary-server install location to new volume

Jump to solution

As we prepare to upgrade ZENworks from 11.4.3 to 2017u4, we need to expand the partition which ZENworks installed to, so that it has the specified minimum of 20GB free space before the upgrade begins.

(This is separate from the content repo; that's on a separate volume, and is mounted to the appropriate directory in the installed directory tree.)

Our primary servers are VMWare virtual machines. We install ZENworks to a location under the F: drive, by defining %ZENWORKS_HOME% before initiating the install. For reasons which are unclear to me and out of my control, the F: drive on these servers is a Windows spanned volume, which is spread across two or more virtual disks.

Thus far, whenever we try to expand one of these underlying virtual disks so as to provide more space to let us expand the F: drive, the F: drive comes up as unmountable and unrecoverable; we have had to run a full server restore to get that primary server back into operation.

While I am still pushing for us to look at alternate approaches to getting expanded space made available, it has been suggested that we instead add a new (larger) virtual disk as a separate drive, shut down the ZENworks services, copy all the data across, unmount both the F: drive and the new one, mount the new drive under F:, and bring up services again.

This runs into one major obvious snag, leaving aside any less-than-obvious ones: file permissions and ownership, most especially on the cache directory. I don't even have access to view the permissions on that directory (much less change them to add new permissions, much less view or copy the contents of the directory), not even when using the local Administrator account; as such, even if I somehow managed to copy the contents of the directory by some shenanigans, I wouldn't be able to put the correct permissions back into place on the resulting copy.

Any suggestions for how we might be able to successfully migrate the installed ZENworks file and directory tree from one volume to another (on the same server), given the above?

I'm entertaining vague ideas about booting to a live Linux environment and doing the copy (possibly on a block-device level) with ldmtool and the unrestricted power of root, but I'm not sure how viable that is, for a few different reasons.

My absolute last-resort fallback would be to install new primary servers and use them to replace the old ones. I've done that before, exactly once (with two servers), and it had so many snags that I would very much rather avoid doing it again.

Is this something where it might be helpful to file a SR and ask someone to help us get things migrated across? Are we just plain out of luck, and going to have to fall back on the replace-with-newly-installed-servers approach, if we can't find a way to expand the volume without that data loss?

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Copy/move primary-server install location to new volume

Jump to solution

I have never done the following, but I expect it should work.

  1. Take a Snapshot of Server
  2. Create a new Drive H:  that is sufficiently larger than your current Drive F: to handle your needs going forward.
  3. Shutdown all ZENworks Services on the Server.
  4. Use Robocopy with the /MIR option as well as  /SEC to Mirror Driver F:  to Drive H:   (Note: You will want to do this as System.  Windows Task Scheduler as well as PSEXEC can do this.) 
  5. Change Drive Letter F: to  J:
  6. Change Drive Letter H: to F:
  7. Restart ZENworks Services.

Tip: I recommend Fiddling with this process on an Agent to confirm all files and permissions copy when Mirroring an agent install directory before moving on to messing with your server, so you have the process down in advance.

 

--
Please give a hearty thumbs up to any post you find helpful!
To find articles by Craig Wilson simply follow the link: Craig Wilson's Tips!

View solution in original post

5 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Copy/move primary-server install location to new volume

Jump to solution

I have never done the following, but I expect it should work.

  1. Take a Snapshot of Server
  2. Create a new Drive H:  that is sufficiently larger than your current Drive F: to handle your needs going forward.
  3. Shutdown all ZENworks Services on the Server.
  4. Use Robocopy with the /MIR option as well as  /SEC to Mirror Driver F:  to Drive H:   (Note: You will want to do this as System.  Windows Task Scheduler as well as PSEXEC can do this.) 
  5. Change Drive Letter F: to  J:
  6. Change Drive Letter H: to F:
  7. Restart ZENworks Services.

Tip: I recommend Fiddling with this process on an Agent to confirm all files and permissions copy when Mirroring an agent install directory before moving on to messing with your server, so you have the process down in advance.

 

--
Please give a hearty thumbs up to any post you find helpful!
To find articles by Craig Wilson simply follow the link: Craig Wilson's Tips!

View solution in original post

Highlighted
Super Contributor.
Super Contributor.

Re: Copy/move primary-server install location to new volume

Jump to solution
That's basically the procedure I had in mind, but I hadn't thought of trying it as SYSTEM. I'll experiment with that on a client machine, as suggested, and if it seems to be able to bypass the read-permissions problem then I think this looks like a viable avenue to take.

Thanks for the fast suggestion!
0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: Copy/move primary-server install location to new volume

Jump to solution
This procedure, with minor modifications, worked flawlessly.

After shutting down the server and taking a snapshot for fallback purposes, I first copied PsExec into place, as part of the PsTools collection.

We mapped the new virtual disk as the J: drive.

I used the 'novell-zenworks-configure -c Start' interface to stop the ZENworks services cleanly, but that left the "Novell ZENworks Updater Service" (which runs from the F: drive) running, so I had to stop that manually via services.msc.

I was unable to stop "ZESService" (which appears to run from the F: drive), and did not try to stop the "Novell Identity Store" service (which appears to run from the C: drive, since its installation does not appear to respect %ZENWORKS_HOME%).

I then unmounted the content-repo partition from %ZENWORKS_HOME%\work\content-repo\, using diskmgmt.msc, and ran the following command:
F:\PSTools\PsExec.exe -s robocopy F:\ J:\ /MIR /COPYALL
(According to 'robocopy /?', /COPYALL is a superset of /SEC.)

After the copy completed, I exported the permissions information of both locations, using the following commands:
F:\PSTools\PsExec.exe -s icacls F:\ /save C:\Temp\servername-fdrive-justcopied.acls /T
F:\PSTools\PsExec.exe -s icacls J:\ /save C:\Temp\servername-jdrive-justcopied.acls /T

I then compared the resulting files with a diff tool, to confirm that there were no permissions differences between the old and the new. (On one primary server out of three, where there were files in the Recycle Bin on that drive, the copy process added a permission to those files - but it didn't seem to affect anything outside the Recycle Bin, and since we don't expect to keep those files around the extra permission didn't seem to do any harm.)

Having confirmed that, I used diskmgmt.msc to remove the drive letter from the F: drive, change the J: drive to be the new F: drive, and mount the content repo under the same path as before.

Then I started the manually-stopped service by hand, and started the remaining services via 'novell-zenworks-configure -c Start' again.

Everything came up without issues, and nothing unusual that I could see in the log files. After verifying that, we restarted the server and verified it again, shut down the server, removed the former-F:-drive virtual disks from the storage pool, booted the server, and verified a third time that everything was working.

There doesn't seem to be anything even slightly wrong with the result. There are a few errors showing up in the logs, but they were showing up before the migration just as much as after, so they don't seem to be related.

This was as perfect and seamless a transition as I could have hoped for. Thank you very much for pointing me to the piece of the process I was missing!
0 Likes
Highlighted
Contributor.
Contributor.

Re: Copy/move primary-server install location to new volume

Jump to solution
If you have a huge amount of data to copy and to reduce down time. You can initiate a robocopy between step 2 and 3 (and ignore errors). And the robocopy in step 4 will be like a "sync".
0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Copy/move primary-server install location to new volume

Jump to solution

Technically, if it's a spanned (as opposed to "striped") volume, you can simply expand it with just another VMDK. Nevertheless i'd follow Craig's advise and consolidate stuff to a new, single and larger VMDK.

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.