Date: Mon, 18 Sep 2000 14:42:28 -0400 (EDT) From: Marc Tardif <intmktg@CAM.ORG> To: "Daniel C. Sobral" <dcs@newsguy.com> Cc: freebsd-hackers@FreeBSD.ORG, freebsd-fs@FreeBSD.ORG Subject: Re: device naming convention Message-ID: <Pine.LNX.4.10.10009181358450.1921-100000@Gloria.CAM.ORG> In-Reply-To: <39C63ACD.441658CC@newsguy.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[ snip ] > > Assuming /dev/wd0s2 contains a few blocks, ie /dev/wd0s1 > > doesn't span to the end of disk: > > 4. If I want to use /dev/wd0s2 as a raw slice for reading > > and writing, what are the steps to follow? > > None. You just use it. > This is what I have in fdisk (from /stand/sysinstall): Offset Size End Name PType Desc Subtype Flags 0 63 62 - 6 unused 0 63 1937565 1937627 wd0s1 3 freebsd 165 C 1937628 191268 2128895 - 6 unused 0 At this point, the second slice does not exist yet so I can't use it. For problems in defining a slice, see next question. > > 4a. Do I need to format the partition as any type? If so > > is there a recommended type (perhaps one which won't > > be recognised by the bootloader would be preferable)? > > No, you don't need to format it, nor do you need to worry about it's > type. Just make sure the slice does exist. > When I define a slice, I need to specify what fdisk (from sysinstall) calls a "partition type". In the case of my FreeBSD slice, I selected "165". In the case of a slice I will use for raw io, is there any reason I should use one partition type rather than another? > > 4b. Should I then be using /dev/rwd0s2 or /dev/rwd0s2a > > for reading and writing (of course, this is assuming > > block i/o of multiples of 512 bytes)? > > Nope, using raw devices is almost always wrong, and we even got rid of > raw device in latter versions of FreeBSD. A "raw" device is an > _unbuffered_ device. It has nothing to do with formats or types. > Got rid of raw devices in later versions of FreeBSD? What if I purposely want unbuffered io? There are instances, such as with databases, where the buffer cache is useless. I understand that in many cases, databases using the raw device practically reinvent the wheel by programming what is effectively another filesystem (which, by the way, is most likely slower than bsd's ffs). Even Oracle, which used to be one of the "you gotta use a raw partition if you want any speed at all" type, has moved into the "use a normal partitoin or regular file unless you do things like sharing a RAID between two hosts" camp. Yet, there are still isolated cases where raw io can be beneficial. What should I do for raw io in later versions of FreeBSD? > Anyway, you should be using /dev/wd0s2. Unless you partition the slice, > and want to use the "a" partition. > If I will be storing a few tables in /dev/wd0s2 of a predefined block aligned size, would it be advisable to use the 165 partition type for /dev/wd0s2 and create labels which will effectively become my tables? If this actually makes sense (fat chance), is there any reason I should be creating mount points? Or, if it would be better to define the labels as swap (assuming I already have a swap label in /dev/wd0s1), could FreeBSD inadvertently use those swap partitions and overwrite my data? Marc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10009181358450.1921-100000>