Date: Thu, 7 Nov 2002 00:48:36 +0100 From: Marc Olzheim <marcolz@stack.nl> To: John-David Childs <jdc@nterprise.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Formatting a large (1.3TB) SCSI disk Message-ID: <20021106234836.GA64058@stack.nl> In-Reply-To: <1036614431.17205.159.camel@lohr.digitalglobe.com> References: <7ABB1A10-ED15-11D6-BA17-00039349B214@slis.indiana.edu> <20021103110100.GC20256@cicely8.cicely.de> <1036614431.17205.159.camel@lohr.digitalglobe.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Nov 06, 2002 at 01:27:10PM -0700, John-David Childs wrote: > On Sun, 2002-11-03 at 04:01, Bernd Walter wrote: > > > > 1T disks and bigger are not supported under -stable. > > Perhaps that should be > 1TB disks are not supported under stable...I > have a 1TB RAID Array (Qlogic 2200 FC Copper, Chaparrel RAID > Controller)...although I have to admit that losing 200G of it sucks hard > > /dev/da0c 1011G 834G 96G 90% /ftp > > tunefs: soft updates: (-n) disabled > tunefs: maximum contiguous block count: (-a) 3 > tunefs: rotational delay between contiguous blocks: (-d) 0 ms > tunefs: maximum blocks per file in a cylinder group: (-e) 8192 > tunefs: average file size: (-f) 16384 > tunefs: average number of files in a directory: (-s) 64 > tunefs: minimum percentage of free space: (-m) 8% > tunefs: optimization preference: (-o) time > > Performance also isn't up to par...I'm only able to get ~ 14MB/sec. With some minor modifications to disklabel, you can label a 2 Tb disk. We've done it with a 1.4Tb disk: Filesystem Size Used Avail Capacity Mounted on /dev/da20a 669G 246G 370G 40% /rapraid0 /dev/da20e 669G 499G 117G 81% /rapraid1 Patch attached (Don't mind the code, it's a quick hack) Zlo --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="disklabel.patch" --- /usr/src/sbin/disklabel/disklabel.c Mon Aug 26 21:43:04 2002 +++ /usr/src/sbin/disklabel/disklabel.c Wed Oct 23 11:37:25 2002 @@ -927,6 +927,32 @@ return (NULL); } +unsigned int +atoui(const char *cp, char **end_p) +{ + unsigned int res, prev; + + res = 0; + prev = 0; + while (*cp) + { + if (!isdigit(*cp)) + { + if (end_p) + *end_p = cp; + return res; + } + res = (res * 10) + (*cp - '0'); + if (res < prev) + return 0; + prev = res; + cp++; + } + if (end_p) + *end_p = cp; + return res; +} + /* * Read an ascii label in from fd f, * in the same format as that put out by display(), @@ -1074,13 +1100,14 @@ continue; } if (streq(cp, "sectors/unit")) { - v = atoi(tp); - if (v <= 0) { + unsigned int uv; + uv = atoui(tp, NULL); + if (uv <= 0) { fprintf(stderr, "line %d: %s: bad %s\n", lineno, tp, cp); errors++; } else - lp->d_secperunit = v; + lp->d_secperunit = uv; continue; } if (streq(cp, "rpm")) { @@ -1178,7 +1205,7 @@ return (1); \ } else { \ cp = tp, tp = word(cp); \ - (n) = atoi(cp); \ + (n) = atoui(cp, NULL); \ } \ } while (0) @@ -1190,7 +1217,7 @@ } else { \ char *tmp; \ cp = tp, tp = word(cp); \ - (n) = strtol(cp,&tmp,10); \ + (n) = atoui(cp,&tmp); \ if (tmp) (w) = *tmp; \ } \ } while (0) @@ -1205,7 +1232,7 @@ struct partition *pp; char *cp; char **cpp; - int v; + unsigned int v; pp = &lp->d_partitions[part]; cp = NULL; --YZ5djTAD1cGYuMQK-- 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?20021106234836.GA64058>