From owner-freebsd-hackers Wed Nov 6 15:48:42 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FD0537B401 for ; Wed, 6 Nov 2002 15:48:38 -0800 (PST) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9974843E7B for ; Wed, 6 Nov 2002 15:48:37 -0800 (PST) (envelope-from marcolz@stack.nl) Received: from toad.stack.nl (toad.stack.nl [2001:610:1108:5010:202:b3ff:fe17:9e1a]) by mailhost.stack.nl (Postfix) with ESMTP id AC8C558B4; Thu, 7 Nov 2002 00:48:36 +0100 (CET) Received: by toad.stack.nl (Postfix, from userid 333) id 5559096CD; Thu, 7 Nov 2002 00:48:36 +0100 (CET) Date: Thu, 7 Nov 2002 00:48:36 +0100 From: Marc Olzheim To: John-David Childs Cc: freebsd-hackers@freebsd.org Subject: Re: Formatting a large (1.3TB) SCSI disk Message-ID: <20021106234836.GA64058@stack.nl> References: <7ABB1A10-ED15-11D6-BA17-00039349B214@slis.indiana.edu> <20021103110100.GC20256@cicely8.cicely.de> <1036614431.17205.159.camel@lohr.digitalglobe.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline In-Reply-To: <1036614431.17205.159.camel@lohr.digitalglobe.com> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD toad.stack.nl 4.6-STABLE FreeBSD 4.6-STABLE X-URL: http://www.stack.nl/~marcolz/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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