Date: Mon, 25 Sep 2000 16:11:16 +0930 From: Greg Lehey <grog@lemis.com> To: Alistair M <tlli@hotmail.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: raid1 on vinum Message-ID: <20000925161116.K3948@wantadilla.lemis.com> In-Reply-To: <LAW2-F56vnCexGFzdV300002fe4@hotmail.com>; from tlli@hotmail.com on Mon, Sep 25, 2000 at 03:33:46PM -0500 References: <LAW2-F56vnCexGFzdV300002fe4@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, 25 September 2000 at 15:33:46 -0500, Alistair M wrote: > Hi there, > I am trying to mirror the whole OS onto a second disk I have on my machine. > The two disks are exactly the same. I am currently running with FreeBSD 4.1. > > This is my config file: > > drive d1 device /dev/ad2a > drive d2 device /dev/ad2e > drive d3 device /dev/ad2f > drive d4 device /dev/ad2g > drive d5 device /dev/ad3e > drive d6 device /dev/ad3f > drive d7 device /dev/ad3g > drive d8 device /dev/ad3h This is a waste of time and space. What you need is: > drive d1 device /dev/ad2h Move /dev/ad3 to /dev/ad1. You'll nearly double write performance. > drive d2 device /dev/ad1h Make sure that the partitions cover all the space you want to use for Vinum. > *This is my disklabel configuration for the two disks: > > /dev/ad2 > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 12582912 0 vinum 1024 8192 16 # (Cyl. 0 - 783*) > b: 2283960 37748736 swap # (Cyl. 2349*- 2491*) > c: 40032696 0 unused 0 0 # (Cyl. 0 - 2491*) > e: 6291456 12582912 vinum 1024 8192 16 # (Cyl. 783*- 1174*) > f: 6291456 18874368 vinum 1024 8192 16 # (Cyl. 1174*- 1566*) > g: 12582912 25165824 vinum 1024 8192 16 # (Cyl. 1566*- 2349*) Change this to: /dev/ad2 b: 2283960 37748736 swap # (Cyl. 2349*- 2491*) c: 40032696 0 unused 0 0 # (Cyl. 0 - 2491*) h: 37748736 0 vinum 1024 8192 16 /dev/ad1 c: 40032696 0 unused 0 0 # (Cyl. 0 - 2491*) h: 40032696 0 vinum 1024 8192 16 # Set up volumes and mirrored plexes volume root plex org concat setupstate sd length 12582912s drive d1 plex org concat sd length 12582912s drive d2 volume root_home setupstate plex org concat sd length 6291456s drive d1 plex org concat sd length 6291456s drive d2 volume var setupstate plex org concat sd length 6291456s drive d1 plex org concat sd length 6291456s drive d2 volume usr setupstate plex org concat sd length 12582912s drive d1 plex org concat sd length 12582912s drive d2 > * Please note for /dev/ad3, I did not create any partitions, I simply did a > disklabel and added the partitions shown, so that they match (in size) > /dev/ad2. That's how you create partitions. > I am expecting that when mirroring a filesystem or partition (eg. > /usr) you don't need to actually copy the data across. vinum(8) > stated that I would need to start a volumes subdisks: > > "When you create a volume with multiple plexes, vinum does not automatically > initialize the plexes...In order to synchronize them with the first plex, > you must start their subdisks, which causes vinum to copy the data from a > plex which is in the up state." It also continues: In practice, people aren't too interested in what was in the plex when it was created, and other volume managers cheat by setting them up anyway. vinum provides two ways to ensure that newly created plexes are up: o Create the plexes and then synchronize them with vinum start. o Create the volume (not the plex) with the keyword setupstate, which tells vinum to ignore any possible inconsistency and set the plexes to be up. I've already done the second way in the example above. > This is the output from doing the vinum "create -f /etc/vinum.cfg" command: > > <snip> > > * Why does my volumename.p1's say faulty? You've quoted the part of the man page which explains that. > * If I can ignore the 'faulty' states, do I now do a: > vinum init -w root_home.p1 No. To quote your own message: >> In order to synchronize them with the first plex, you must start >> their subdisks, which causes vinum to copy the data from a plex >> which is in the up state." > > and then edit rc.conf and add the disks to "vinum_drives", No. To quote the man page: 6. The vinum read command has a particularly emetic syntax. Once it was the only way to start vinum, but now the preferred method is with vinum start. vinum read should be used for maintenance purposes only. Note that its syntax has changed, and the arguments must be disk slices, such as /dev/da0, not partitions such as /dev/da0e. vinum_drives is no longer in the latest rc.conf. > and start_vinum="YES"? You'd want that anyway, but it's not the issue here. > I am not sure where to go from here. Start again with the parameters I show above. Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply. For more information, see http://www.lemis.com/questions.html Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers 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?20000925161116.K3948>