On Wed, Mar 26, 2003 at 09:49:54PM +0800, John Summerfield wrote: > On Wed, 26 Mar 2003, Froberg, David C wrote: > > > Folks, > > > > If I copy (say, via (cd / ; tar -clpSf - . ) | tar -xpSf - -C /mnt) > > a whole bootable Linux volume to a new volume mounted to /mnt, > > then chroot to /mnt, then upgrade a package (say samba) with > > rpm, would that keep rpm's updates to within the directory structure > > under /mnt so the *new* volume would have the new samba and > > the samba under / left unchanged? > > > > Essentially, I'm thinking along the lines of what is often done in the > > OS/390 realm where a resvol is cloned and maintenance applied to > > the clone leaving the original intact.
[fixed the lines: removed blanks] > > > The idea is sound. Note: > > Be sure you replicate the _entire_ system > dd may be faster than tar | tar. Depends on how much data. Doing either of those things on a running system exposes you to a chance of copying an inconsistant filesystem. I believe that the tar method is a bit safer. BTW: you assume that the whole system is on one partition (/), right? > > Some S/390 storage systems can have their own means of replicating > volumes. That is likely to be faster. Even if the system allows you to copy a snapshot of a partition (I think LVM is supposed to allow this, I'm not sure whether or not S/390 has something equivalent) the filesystem may be in an inconsistant state at the time of the snapshot. It will certainly be "not safely unmounted". This applies for the dd method above. > > You might prefer to run rpm thus: > rpm --root /mnt ... > > Probably doesn't matter in this case, but this approach doesn't require > rpm to be installed on the target. Doesn't it? I recall reading somewhere that it uses the binary /bin/rpm of the chrooted system for some stuff . I don't recall exactly where, maybe a certain bug report. Maybe you should test this. -- Tzafrir Cohen +---------------------------+ http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend| mailto:[EMAIL PROTECTED] +---------------------------+
