On Wed, 08 Nov 2000 04:30:19 jean-philippe wrote:
> 
> 
> pgeorges wrote:
> > 
> > "David M. Kufta" a �crit :
> > >
> > > I have a clients machine that curently has a /usr mount point of
> /dev/hdb1
> > > /dev/hdb1             2.0G  1.5G  527M  74% /usr
> > > This client has a partition /dev/hdc1 which is currently mounted as
> /home2
> > > /dev/hdc1             7.9G   32M  7.8G   0% /home2
> > >
> > > I would like to use /dev/hdc1 as /usr and know there is a cpio
> command
> > > syntax that will allow me to move his current /usr from hdb1 to hdc1
> which
> > > has more available space and would better suit his needs, however the
> > > command line syntax escapes me.
> > 
> > What about (logged as root) :
> > 
> > cp -a /usr /home2/
> > mv /usr /usr.bak
> > ln -svf /home2/usr /usr
> > rm -rf /usr.bak
> 
> It is not a good idea to do it with cp. All the files permitions and
> ownership would be lost.
> Beside, non regular files would also cause trouble. I would do it like
> this :
> 
> first make a backup of /home2 in /home/old.home2.tgz and clean /home2
>    tar cvzpf /home/old.home2.tgz /home2
>    rm -rf *
> 
> then transfer files from /usr to /home2
>   (cd /usr && tar cpf - .) | (cd /home2 && tar xvpf -)
> 
> mount the partitions as they should be mounted
>    umount /home2 /usr
>    mount /dev/hdc1 /usr
> 
> And then modify your /etc/fstab
> 
> And maybe it would not be a bad idea to do it in runlevel 1.
> 
> 
> HTH
> Flupke
> 

why not do:

cp -dpR /usr/* /home2

???

I always alias cp with '-p' for root because I usually want to preserve
permissions when copying files.  I have never had a problem with it not
keeping the old permissions.  Should I expect that they could be lost in
some cases?

.. HH

> -- 
>       << There's no place like ~! >>
> 
> 
> Keep in touch with http://mandrakeforum.com: 
> Subscribe the "[EMAIL PROTECTED]" mailing list.
> 



Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.

Reply via email to