Can I Rebuild / and /usr Remotely? Ideas?

Gayn Winters gayn.winters at bristolsystems.com
Tue Sep 20 11:42:32 PDT 2005



> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org 
> [mailto:owner-freebsd-questions at freebsd.org] On Behalf Of 
> Drew Tomlinson
> Sent: Tuesday, September 20, 2005 10:01 AM
> To: FreeBSD Questions
> Subject: Can I Rebuild / and /usr Remotely? Ideas?
> 
> 
> I have a system running 5.4-STABLE.  I created a geom_stripe disk for 
> /usr.  It works fine except that upon reboot, the stripe attempts to 
> load itself twice and thus fails.  Therefore, since I have no 
> /usr, the 
> system comes up in single user mode.  At that point I can do 
> 'kldunload 
> geom_stripe' and then 'kldload geom_stripe' to get the stripe 
> built and 
> finish booting my system.  I sent a problem report describing this 
> behavior.  http://www.freebsd.org/cgi/query-pr.cgi?pr=83521  
> Please see 
> it for details.
> 
> Based upon the information in the pr, the commiter suggests 
> clearing all 
> metadata on the stripe providers and starting over.
> 
> When I built this system, I configured the disks using sysinstall.  I 
> used the "dangerously dedicated"mode just as I had when I ran the 4.x 
> series.  I suspect my problems occur because geom_stripe doesn't get 
> along well with disks that are "dangerously dedicated". 
> 
> Anyway, my system has 2 9gb drives (da0 and da1) that I wish 
> to use for 
> the main system.   I want a 500mb slice as /dev/da0s1a for 
> '/', a 500mb 
> slice as /dev/da1s1b for swap, and the rest of each drive as 
> /dev/daXs1d.  I will build my stripe with /dev/da0s1d and /dev/da1s1d 
> and mount it at /usr.  Other directories such as /var, /home, 
> etc. will 
> be symlinked to /usr/var, /usr/home, etc.
> 
> I have remote console access to this machine and want to attempt to 
> rebuild the system remotely.  If I mess up, it's not too difficult to 
> physically get to the box but I would like to avoid it if 
> possible.  I 
> have another disk on the system (ad0) that is available and 
> large enough 
> to hold the contents of both da0 and da1.  Can I backup my system, do 
> the needed operations on da0 and da1, restore da0 and da1, 
> reboot, and 
> still have a working system?  I've never used fdisk, bsdlabel, newfs, 
> and whatever else I might need from the command line.  
> Besides the man 
> pages, are there any guides for what I want to do?  Even a 
> simple "first 
> this, then this, then this" type of guide will help me get started.
> 
> I'd appreciate any help or suggestions on the best way to accomplish 
> this task.  I would also appreciate any second opinions 
> regarding other 
> ways to get geom_stripe working properly on this box.
> 
> Thanks,
> 
> Drew
> 

Drew,

I tend to doubt the "dangerosly dedicated" is your problem.  I'd go with
the committer's comments.  In particular, be sure to clear out the last
sector of each disk as well as the first.  The geom software uses the
last sector for its metadata.  With all my thumbs, I've gotten that last
sector corrupted before.  You can clear it using the geom tools or with
dd, but be sure to clear it!  (on both disks)

-gayn




More information about the freebsd-questions mailing list