Re: What's best way to copy a filesystem? [was: Re: slight emergency here...]

2007-10-30 Thread Derek Ragona

At 08:45 PM 10/28/2007, Gary Kline wrote:

On Sun, Oct 28, 2007 at 06:34:22PM -0500, Jon Hamilton wrote:
 Gary Kline [EMAIL PROTECTED], said on Sun Oct 28, 2007 [03:02:03 PM]:

 }At any rate, how do i as root, single user, cp -rp all of /var to
 }elsewhere (/storage) and rmdir /var, them mkdir /var and copy
 }everything back?? I've forgotten the cpio magic command.
 } 
 } The nutshelll of this posting could be: What's the best tool
 } to copy a /FILESYSTEM to /storage/FILESYSTEM?

 The best tool is the one you use successfully.  If you're really 
talking about

 a whole filesystem, dump and restore may contain the least surprises in
 unusual situations:

 $ newfs /dev/whatever
 $ mount /dev/whatever /mnt
 $ cd /dev/whatever
 $ dump 0af - /old_filesystem | restore -rf -

 Then delete /mnt/restoresymtable when it's all done.

 Of course you can use tar, cpio, cpdup if you have it, or even cp.  At
 different points in time historically some of those have had problems with
 some situations like sparse files, extra hard links, symlinks, etc.



Seems like I'm running into inode problems I finally
tar'd  /var to a /temp fs, then forgot to do the newfs.  So now
I've got a fs panic.

Hope it isn't a bad drive.

thanks.

gary


I would run the manufacturer's diagnostics on the drive to be sure.  Often 
drives will have a media issue SMART doesn't catch.


-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


What's best way to copy a filesystem? [was: Re: slight emergency here...]

2007-10-28 Thread Gary Kline
On Sun, Oct 28, 2007 at 01:54:54PM -0800, Gary Kline wrote:
   Guys,
 
 
   I think I've found the reason for the intermittent rashes.
   Part of /var is bad, and fsck cannot allocate inoinfo to repair
   the damage.
 
   At any rate, how do i as root, single user, cp -rp all of /var to
   elsewhere (/storage) and rmdir /var, them mkdir /var and copy
   everything back?? I've forgotten the cpio magic command. 
 
The nutshelll of this posting could be: What's the best tool 
to copy a /FILESYSTEM to /storage/FILESYSTEM?


-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix
  http://jottings.thought.org   http://transfinite.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


{Disarmed} Re: What's best way to copy a filesystem? [was: Re: slight emergency here...]

2007-10-28 Thread Derek Ragona

At 06:02 PM 10/28/2007, Gary Kline wrote:

On Sun, Oct 28, 2007 at 01:54:54PM -0800, Gary Kline wrote:
   Guys,


   I think I've found the reason for the intermittent rashes.
   Part of /var is bad, and fsck cannot allocate inoinfo to repair
   the damage.

   At any rate, how do i as root, single user, cp -rp all of /var to
   elsewhere (/storage) and rmdir /var, them mkdir /var and copy
   everything back?? I've forgotten the cpio magic command.

The nutshelll of this posting could be: What's the best tool
to copy a /FILESYSTEM to /storage/FILESYSTEM?




I don't know if this is the best way, but is one I've done for years . . .

cd srcdir ; tar -cf - . | (cd destdir ; tar -xpf -)
which for your example would be:
cd /FILESYSTEM; tar -cf - . | (cd /storage/FILESYSTEM ; tar -xpf -)

then you would

rm -rf /FILESYSTEM
ln -s  /storage/FILESYSTEM /FILESYSTEM

-Derek





--
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix
  http://jottings.thought.org   http://transfinite.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: What's best way to copy a filesystem? [was: Re: slight emergency here...]

2007-10-28 Thread Jon Hamilton
Gary Kline [EMAIL PROTECTED], said on Sun Oct 28, 2007 [03:02:03 PM]:

}  At any rate, how do i as root, single user, cp -rp all of /var to
}  elsewhere (/storage) and rmdir /var, them mkdir /var and copy
}  everything back?? I've forgotten the cpio magic command. 
}  
}   The nutshelll of this posting could be: What's the best tool 
}   to copy a /FILESYSTEM to /storage/FILESYSTEM?

The best tool is the one you use successfully.  If you're really talking about
a whole filesystem, dump and restore may contain the least surprises in 
unusual situations:

$ newfs /dev/whatever
$ mount /dev/whatever /mnt
$ cd /dev/whatever
$ dump 0af - /old_filesystem | restore -rf -

Then delete /mnt/restoresymtable when it's all done.

Of course you can use tar, cpio, cpdup if you have it, or even cp.  At 
different points in time historically some of those have had problems with 
some situations like sparse files, extra hard links, symlinks, etc. 

-- 

   Jon Hamilton 
   [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: What's best way to copy a filesystem? [was: Re: slight emergency here...]

2007-10-28 Thread Gary Kline
On Sun, Oct 28, 2007 at 06:34:22PM -0500, Jon Hamilton wrote:
 Gary Kline [EMAIL PROTECTED], said on Sun Oct 28, 2007 [03:02:03 PM]:
 
 }At any rate, how do i as root, single user, cp -rp all of /var to
 }elsewhere (/storage) and rmdir /var, them mkdir /var and copy
 }everything back?? I've forgotten the cpio magic command. 
 }  
 } The nutshelll of this posting could be: What's the best tool 
 } to copy a /FILESYSTEM to /storage/FILESYSTEM?
 
 The best tool is the one you use successfully.  If you're really talking about
 a whole filesystem, dump and restore may contain the least surprises in 
 unusual situations:
 
 $ newfs /dev/whatever
 $ mount /dev/whatever /mnt
 $ cd /dev/whatever
 $ dump 0af - /old_filesystem | restore -rf -
 
 Then delete /mnt/restoresymtable when it's all done.
 
 Of course you can use tar, cpio, cpdup if you have it, or even cp.  At 
 different points in time historically some of those have had problems with 
 some situations like sparse files, extra hard links, symlinks, etc. 
 


Seems like I'm running into inode problems I finally 
tar'd  /var to a /temp fs, then forgot to do the newfs.  So now 
I've got a fs panic.

Hope it isn't a bad drive.  

thanks.

gary


 -- 
 
Jon Hamilton 
[EMAIL PROTECTED]

-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix
  http://jottings.thought.org   http://transfinite.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]