You could also format the new mod 3's, go ahead and add them to the volume
groups you want them to end up in, and then pvmove the old extents to the
new ones. Once the data is migrated, use pvremove to take the old physical
volumes out of the volume group. You needn't even bring down the
applications while the migration is taking place.

--
   .~.    Robert P. Nix             Mayo Foundation
   /V\    RO-OE-5-55                200 First Street SW
  /( )\   507-284-0844              Rochester, MN 55905
  ^^-^^   -----
        "In theory, theory and practice are the same, but
         in practice, theory and practice are different."




On 2/13/08 11:32 AM, "Edmund R. MacKenty" <[EMAIL PROTECTED]>
wrote:

> On Wednesday 13 February 2008 11:28, Luis La Torre wrote:
>> Why?. because we have the z/VM and all Linux guests on 3390-3 volumes. And
>> for some reason our previous administrator defined the LVM  on a 3390-9,
>> maybe he ran out of 3390-3.
>
> Aha!  So your 3390-9's contain a set of LVM physical volumes (PVs), which are
> participating in some unknown number of volume groups (VGs).  I can tell you
> a Linux-centric way of doing this.  I'll outline it here, and if you need
> more details, just ask.
>
> The main problem is that you want to copy Linux filesystems from one device to
> a device of a different geometry.  If all of the partitions on those 3390-9's
> are exactly the size of a 3390-3, then you could possibly copy each partition
> onto a Model 3 and rebuild the VTOC, but I don't know how to do that cleanly
> with the available tools.  So I'm treating this as the general case of
> copying a Linux filesystem to a device of a different size.
>
> First, log into the Linux guest to which all the model 9's are attached, as
> root.  (If some are attached to different guests, you'll have to repeat this
> process for each one.)  Turn off all applications and services that might
> write to the LVM filesystems you are going to copy.
>
> From Linux, you can use the LVM tools (vgdisplay and friends) to list the VGs,
> the logical volumes (LVs) they contain and the PVs (DASD) that are allocated
> to each VG.  Now go and attach a whole mess of Model 3's to that guest,
> enough to that you have at least as much space as all the Model 9's.  Then
> add a couple more Model 3's, because there may be a bit more overhead chewed
> up by LVM on these smaller devices.
>
> Vary all those 3's online, run dasdfmt and fdasd on them to create a single
> partition on each one.  Remember, the shell's "for" loop is your friend for
> doing this kind of repetative stuff.
>
> Create new VGs to match each of the existing VGs, giving them new names.
> Assign the Model 3's as PVs to these VGs, so that the new VGs have the same
> amount of space as the old ones (and maybe a bit more for overhead.
>
> Create new LVs within the new VGs to match the old LVs.  Create filesystems
> within each LV.  Make sure the filesystem types are the same, and the block
> and inode counts are at least as large as the originals.  Mount these
> filesystems somewhere.
>
> Now copy your data from the old filesystems to the new filesystems, using cpio
> or a tar pipe to preserve all metadata.  I prefer the tar pipe, like this:
>
> tar -C /old/fs -cf - . | tar -C /new/fs -xpf -
>
> After everything has been copied, you now have all your data on your 3390-3
> devices.  Edit your /etc/fstab to change the old device paths to the new
> ones.  Reboot.  Now your mounted filesystems are the new ones and the ones
> using the Model 9's are not mounted.  Vary them offline and detach them.
>
> I think that covers everything.  I'm sure the list will correct any mistakes
> I've made here.
> - MacK.
> -----
> Edmund R. MacKenty
> Software Architect
> Rocket Software, Inc.
> Newton, MA USA
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to