Edmund R. MacKenty 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.
I regularly shuffle peecee data around using dd and, if it's NTFS
filesystems, ntfsclone and it s friends.
In your case though, I'd look at the dump/restore commands. Dump reads
what must, and restore restores it as you'd expect.
AFAIK there's no problem with different-sized filesystems, and no
concerns about funny business under the hood. Just use the usual tools
to create the new, empty, filesystems, and the do the deed.
As I understand it, filesystems must be offline when using these tools.
I gather Linus has had some words to say on occasion.
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 -
I think, following recent discussion, more operands are required to
preserve ACLs and such.
btw My boss was rather startled today when he discovered I've been
shoveling 60 Byte filesystems around the LAN. 49 doesn't seem so bad to
me, on a mainframe.
--
Cheers
John
-- spambait
[EMAIL PROTECTED] [EMAIL PROTECTED]
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375
You cannot reply off-list:-)
----------------------------------------------------------------------
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