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!


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Disk Label Problem
    ... The disks are different sizes. ... > partition and the third to mount at /usr then when writing the changes ... this generated an error that it couldn't write label. ...
    (freebsd-questions)
  • Re: Accessing FAT32 Partitions
    ... partition mountpoint fstype options dump fsck_pass ... If you have sata or scsi disks: ... The directory in which you mount the partition. ... "Section 2.4.3.5 AWNS. ...
    (comp.os.linux.misc)
  • Re: gid option on ext3 in fstab
    ... But then i remembered the gid option in fstab. ... I use the same option on my laptop (mounting vfat partition), ... The gid and uid mount options only work with file systems such ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Problem booting RAID1/mdadm system when one disk is unplugged
    ... My System has 2x120GB IDE disks with the an up-to-date Sarge install, running kernel 2.6.8-3 and configured for mirroring. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ... Trouble? ... I would make sure you are booting from the /dev/md* partition. ...
    (Debian-User)
  • RE: Disk Full issue: SOLVED
    ... was written to the partition since a mount point was down... ... > because the disk is full. ... To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". ...
    (Debian-User)