Re: Copy entire /usr

2008-09-12 Thread Mike McCarty
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 eno

Re: Copy entire /usr

2008-09-12 Thread elijah r.
On Fri, Sep 12, 2008 at 1:15 AM, Raven <[EMAIL PROTECTED]> wrote: > Before starting blindly cp'ing files, I would like to hear your advice > on the process and if I have any chance of succeeding (or if you have > another method that would work better) Look into dd_rescue. Use it to make disk image

Re: Copy entire /usr

2008-09-12 Thread Tzafrir Cohen
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. > Every couple days (or more, depends on the www traffic level) scsi drive > sdc fails (with "rejecting I/O to device bla bla bla"). Thi

Re: Copy entire /usr

2008-09-12 Thread Dave Patterson
On Fri, Sep 12, 2008 at 10:30:12AM +0200, François Cerbelle wrote: > Le Ven 12 septembre 2008 10:08, Raven a écrit : > [...] > > It worked! > > Thank you all for your help and especially Francois for providing a very > > fast solution :D > > ;-) ;-) Regards, Dave -- Thasai, Ampoe Meuang |

Re: Copy entire /usr

2008-09-12 Thread François Cerbelle
Le Ven 12 septembre 2008 10:08, Raven a écrit : [...] > It worked! > Thank you all for your help and especially Francois for providing a very > fast solution :D ;-) Fanfan -- http://www.cerbelle.net - http://www.afdm-idf.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "u

Re: Copy entire /usr

2008-09-12 Thread Dave Patterson
On Fri, Sep 12, 2008 at 09:41:30AM +0200, François Cerbelle wrote: > But this solution SHOULD work IN THEORY !!! I never tried it. someone > might have a better idea. I just tried it on a small system here, and it works. You do need to do the reboot at the end, however, or init won't point to

Re: Copy entire /usr

2008-09-12 Thread Raven
On Fri, 2008-09-12 at 09:41 +0200, François Cerbelle wrote: > Le Ven 12 septembre 2008 09:28, Raven a écrit : > [...] > > After I rsync, how do I tell the system to use the new /usr folder > > (since I am not doing the whole "remount" thing)? > > As you seem to be unable to have a physical access

Re: Copy entire /usr

2008-09-12 Thread Paulo Silva
2008/9/12 Raven <[EMAIL PROTECTED]>: > On Fri, 2008-09-12 at 09:49 +0200, François Cerbelle wrote: >> Le Ven 12 septembre 2008 09:36, Paulo Silva a écrit : >> [...] >> > # rsync -av /usr/ /newusr/ >> > # umount /usr >> >> I think he will not be able to do it because of processes running from >> /us

Re: Copy entire /usr

2008-09-12 Thread Dave Patterson
On Fri, Sep 12, 2008 at 08:36:58AM +0100, Paulo Silva wrote: > You can umount the old /usr and move the new directory to it's place: > > # rsync -av /usr/ /newusr/ > # umount /usr > # rmdir /usr > # mv /newusr /usr Or more quickly, after changing /etc/fstab, deleting the /usr mount: # rsync -a

Re: Copy entire /usr

2008-09-12 Thread Raven
On Fri, 2008-09-12 at 09:49 +0200, François Cerbelle wrote: > Le Ven 12 septembre 2008 09:36, Paulo Silva a écrit : > [...] > > # rsync -av /usr/ /newusr/ > > # umount /usr > > I think he will not be able to do it because of processes running from > /usr. And I think he can not stop all processes

Re: Copy entire /usr

2008-09-12 Thread François Cerbelle
Le Ven 12 septembre 2008 09:36, Paulo Silva a écrit : [...] > # rsync -av /usr/ /newusr/ > # umount /usr I think he will not be able to do it because of processes running from /usr. And I think he can not stop all processes by going to runlevel 1 as he seems to only have a network access to its s

Re: Copy entire /usr

2008-09-12 Thread François Cerbelle
Le Ven 12 septembre 2008 09:28, Raven a écrit : [...] > After I rsync, how do I tell the system to use the new /usr folder > (since I am not doing the whole "remount" thing)? As you seem to be unable to have a physical access to the server, I suppose you can not go to single user mode. If you try

Re: Copy entire /usr

2008-09-12 Thread Paulo Silva
Sex, 2008-09-12 às 09:28 +0200, Raven escreveu: > Thanks for the replies. I will definitely use rsync. > Also, I am planning to put the new /usr not on a new partition but on > the same one that currently has / . > After I rsync, how do I tell the system to use the new /usr folder > (since I am not

Re: Copy entire /usr

2008-09-12 Thread Paulo Silva
Sex, 2008-09-12 às 09:05 +0200, François Cerbelle escreveu: > Le Ven 12 septembre 2008 08:15, Raven a écrit : > [...] > > Before starting blindly cp'ing files, I would like to hear your advice > > on the process and if I have any chance of succeeding (or if you have > > another method that would wo

Re: Copy entire /usr

2008-09-12 Thread Raven
On Fri, 2008-09-12 at 14:14 +0700, Dave Patterson wrote: > On Fri, Sep 12, 2008 at 09:05:14AM +0200, François Cerbelle wrote: > > > to do the copy, but as your disk will probably fail during the process, > > rsync is a better choice as it can resume the copy. Thanks for the replies. I will defi

Re: Copy entire /usr

2008-09-12 Thread Dave Patterson
On Fri, Sep 12, 2008 at 09:05:14AM +0200, François Cerbelle wrote: > to do the copy, but as your disk will probably fail during the process, > rsync is a better choice as it can resume the copy. Good point. Regards, Dave -- Because I don't need to worry about finances I can ignore Microsoft

Re: Copy entire /usr

2008-09-12 Thread François Cerbelle
Le Ven 12 septembre 2008 08:15, Raven a écrit : [...] > Before starting blindly cp'ing files, I would like to hear your advice > on the process and if I have any chance of succeeding (or if you have > another method that would work better) Hi, You can use : # ( cd /usr; tar cf - . ) | ( cd /mnt/

Re: Copy entire /usr

2008-09-12 Thread Dave Patterson
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. Sticky indeed. > Every couple days (or more, depends on the www traffic level) scsi drive > sdc fails (with "rejecting I/O to device b