Date: Wed, 01 Nov 2000 13:12:54 -0700 From: Warner Losh <imp@village.org> To: Matt Dillon <dillon@earth.backplane.com> Cc: Randell Jesup <rjesup@wgate.com>, obrien@FreeBSD.ORG, arch@FreeBSD.ORG Subject: Re: Like to commit my diskprep as a port Message-ID: <200011012012.NAA98466@harmony.village.org> In-Reply-To: Your message of "Wed, 01 Nov 2000 11:56:19 PST." <200011011956.eA1JuJO30728@earth.backplane.com> References: <200011011956.eA1JuJO30728@earth.backplane.com> <200011011753.eA1HrCV29435@earth.backplane.com> <ybuy9z3iom7.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net> <20001031132945.B28476@dragon.nuxi.com> <200010311747.KAA80353@harmony.village.org> <200011010341.eA13fCV42009@billy-club.village.org> <200011011735.KAA54300@harmony.village.org> <200011011812.LAA97417@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[[ just fyi, i've desided to make diskprep a port for now ]] In message <200011011956.eA1JuJO30728@earth.backplane.com> Matt Dillon writes: : automatically allocate the remaining free space in an existing dos : partition table into a new slice, that sounds like a relatively trivial : job for fdisk to accomplish. Disklabel could then be used to label the : new slice. The hog concept has nothing to do with DOS slices. It is a flexible BSD partition that grows or shrinks as other partitions take place. Its final size isn't known until all the other partitions are sized. There can be only one hog partition. In the previous example: disk size: 301M 291M 311M slice / da0s1a 32M 32M 32M swap da0s1b 64M 64M 64M all da0s1c 300M 290M 310M /usr da0s1d 172M 162M 182M /var da0s1e 32M 32M 32M fdisk -I da0 would be used in all cases to create da0s1 of 300M, 290M and 310M repsectively since 1M would be reserved for the MBR, just for the sake of easy math. diskprep lets you create config files that would look like: $hog_part = 'd'; $part{a}{type} = "4.2BSD"; $part{a}{size} = 32*1024; $part{b}{type} = "swap"; $part{b}{size} = 64*1024; $part{d}{type} = "4.2BSD"; $part{e}{type} = "4.2BSD"; $part{e}{size} = 32*1024; It will also do a newfs on these partitions (if 4.2BSD) and has some hooks to do minor fs tuning (minfree and the like). It is a more complete tool for preparing a disk for use than disklabel, especially in an environment where you have to deal with lots of different geometries and disk sizes. We have 10 different CF parts in production right now with 8 different sizes. Some of the sizes are different by a few blocks, while others are different by several megabytes (we have 32M, 45, 48M and 64M CF parts from 5 different MFGs and only two pairs of them have the same exact size). One big drawback is that it isn't interactive, nor does it have a nice gui. However, one could layer a simple curses or X interface on top of it very easily. The user interacts with the pretty pictures, hits do it. The UI writes out a file like above and calls diskprep with it. At the present time, I've not had a need for a UI beyond the config file, so I've just kept it simple. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011012012.NAA98466>