Back-up on remote machine
jerrymc at clunix.cl.msu.edu
Thu Aug 5 07:05:49 PDT 2004
> I've been playing with this for a while. I need to add a small (4 GB) hard
> drive to one of my servers. Partly because I need more storage space,
> partly because I think there's something wrong with the present hard drive
> -- I get page faults while in kernel mode (fatal signal 12, I think it is)
> and spontaneous reboots when I try to build world on this drive (or make
> index, or upgrade some ports, etc.).
> What I want to do is copy my whole /usr/home directory tree to another Free
> BSD machine down the hall, pull the current hard drive (4 GB) out, put the
> new hard drive with a fresh build of Free BSD in the box as the master
> drive, reformat the old drive, and finally, copy the /usr/home directory
> tree back to the old hard drive and mount it separately as /usr/home.
I note that someone else has posted helpful suggestions on how to do
what you say you want. But, I wonder if that is what you really want.
First, a comment: A page fault is not a problem with your disk. It
is just the system discovering that the piece of memory it wants to
access next is not really in memory but paged out on disk - FreeBSD
uses the swap space for this.
But, having said that, a signal 12 can mean that it is having some
hardware problem reading that disk (or some other hardware problem),
If it is getting hard errors reading that disk, then it very likely
means the disk is on its last legs and would be a very bad place to
put your /usr/home directory back on. Modern disks have their own
spare sectors to which they map bad sectors automatically. Once you
start actually seeing unrecovered errors from a disk, it tends to
mean that all the spare sectors are used up and the disk is heading
for a total failure.
So, check the var/log/messages file and see if there are errors
pointing to the disk and if so, get it replaced as soon as possible
and don't bother trying to reuse it. In checking for errors in
the messages file, you may discover the signal 12 errors are not from
the disk, but something else. In that case, you have some other
hardware problem to solve - controller, motherboard, whatever.
> I've found directions that almost fit my needs, but not quite. What I would
> like to do is tar the directory tree and pipe it to either scp or ssh. What
> I don't want to do, because I don't think I have enough room, is make a tar
> file on the old machine. One example I found on the WWW is: tar -czf -
> /some/file | ssh host.name tar -xzf - -C /destination.
> That's not quite what I want, because I don't see any need to untar
> everything at the far end, but I can't send a file without using some
> command to ssh. I thought tar -czf - /some/file | scp -
> name at remotehost:somefile.tar.gz, but it doesn't seem to work. Can anyone
> point out where I'm going wrong? I guess if I have to I can untar the
> directory tree to some temporary place on the remote host -- that one has
> plenty of room on it, but it seems like an inelegant solution. That's
> really my only objection to it.
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions