Date: Wed, 7 Aug 2002 12:02:27 -0400 From: Rob Ellis <rob@web.ca> To: Danny Pansters <danny@ricin.com> Cc: shooverfbn@442spot.com, freebsd-questions@freebsd.org Subject: Re: Questions about vinum and failure of root partition Message-ID: <20020807160227.GB53552@web.ca> In-Reply-To: <200208071628.27577.danny@ricin.com> References: <200208070101.g7711iU06306@clunix.cl.msu.edu> <005e01c23dcb$061acbb0$6602a8c0@swbell.net> <20020807132232.GA47309@web.ca> <200208071628.27577.danny@ricin.com>
next in thread | previous in thread | raw e-mail | index | archive | help
the advantage of using a slice for the freebsd system partitions is just that you can copy it with dd. otherwise you need a script to mount, dump|restore, and unmount the backup partitions (because you don't want them in /etc/fstab). it occurred to me that putting swap on the boot slice isn't such a good idea -- better to put it on the data slice. i'm not sure about putting /usr on the vinum mirror as i've seen recommended -- you often want /usr in single user mode. maybe symlink off /usr/home /usr/src /usr/obj /usr/ports /usr/local to a vinum partition, which leaves you with more or less (?) static files in /usr. - rob On Wed, Aug 07, 2002 at 04:28:27PM +0200, Danny Pansters wrote: > On Wednesday 07 August 2002 15:22, Rob Ellis wrote: > > one workaround for having to have a non-mirrored boot > > partition with 2 disks is to put 2 slices on each > > disk -- one for fbsd system partitions, and one for > > mirrored data... > > > > ad0s1, ad2s1 -> small bootable slices for os partitions > > ad0s2, ad2s2 -> rest of the disk for mirrored data partitions > > > > install fbsd on ad0s1, with partitions for / and swap > > and maybe tmp. partition ad2s1 the same way. create > > your vinum mirror using partitions on ad0s2 and ad2s2 > > and symlink /var and whatever else you want to directories > > on the mirror. > > More than one slice per drive can be used but are not needed. If using only > slice 1 on both disks, give both of them an daN(s1)a partition and dump or > copy da0a to da1a. Make da1a bootable and keep both in sync (IMHO a daily > dump should suffice). Keep the backup root partition unmounted except when > dumping/copying/synching data. Mirror other partitions (d and up) through > vinum. > > root@server.ricin.net [/root] # df > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/da0s1a 508143 80898 386594 17% / > /dev/vinum/vinum0 1016170 23130 911747 2% /var > /dev/vinum/vinum1 2032490 1195426 674465 64% /usr > /dev/vinum/vinum2 13318721 5576 12247648 0% /home > procfs 4 4 0 100% /proc > > If da1a gets mounted df also has: > /dev/da1a 508143 163535 303957 35% /backup_root > (used size differs because I don't let the the original dump and > restoresymtable be deleted) > > > > > then create a backup of the fbsd partitions on > > the first disk, copying everything from ad0s1 to ad2s1: > > > > dd if=/dev/ad0s1 of=/dev/ad2s1 bs=102400 > > > > fsck the newly copied filesystems: > > > > # a, e... are partitions > > for i in a e f g h ; do fsck -y /dev/ad2s1$i ; done > > > > install ad0's master boot record to ad2 > > > > fdisk -B /dev/ad2 > > > > and now the second disk is a bootable copy of the > > first; if the first disk fails, you swap the cables > > Exactly. BUT you wouldn't swap cables or disks. If disk0 doesn't boot but > instead disk1 has to, by that time your former disk1 *becomes* disk0 :) > Otherwise, both root partitions would need different fstabs. I have only > tested this by unplugging disk0 on reboot but I would expect hardware failure > to have the same result, only perhaps after hours of getting sicker and > sicker until it reboots itself... > > > on the disks (make the secondary the primary) > > and reboot -- the os and vinum come back up. > > > > - rob > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > Sorry for not CC'ing list. It doesn't like my mailserver on local network and > I don't like changing that ;-) Feel free to quote if useful. > > > -- > DaN > > Shut up & listen. http://stations.mp3s.com/stations/180/ricin_radio.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020807160227.GB53552>