[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Copy entire /usr



Dave Patterson wrote:
On Fri, Sep 12, 2008 at 08:15:04AM +0200, Raven wrote:
Hi all.
I am in a sticky situation. I run remotely a server and one of the disks
is starting to fail.

[...]


Example: assume /usr is the only thing on /dev/sdc1,
/dev/sdd1 (or some partition on another disk) has enough space available for
the /usr directory, and is formatted.

Do: ~# mount /dev/sdd1 /mnt
    ~# mkdir /mnt/usr
    ~# cp -ax /usr/* /mnt/usr/
    ~# umount /dev/sdd1

This is a good first start, but not adequate, I think. This
needs to be done when the file system is static. Also,
you don't want a partition named usr on the new partition,
because then when you mount under /usr it comes out as
/usr/usr

I would reboot to single user mode, then...

# mount -o remount,ro /usr
# mount /dev/sdd1 /mnt
# rsync -a /usr/ /mnt
# umount /mnt

I didn't check the rest, which I presume is good.

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!


Reply to: