From owner-freebsd-questions@FreeBSD.ORG Fri May 16 07:48:38 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48AC7106566C for ; Fri, 16 May 2008 07:48:38 +0000 (UTC) (envelope-from daniel_k_eriksson@telia.com) Received: from pne-smtpout1-sn1.fre.skanova.net (pne-smtpout1-sn1.fre.skanova.net [81.228.11.98]) by mx1.freebsd.org (Postfix) with ESMTP id 02B728FC23 for ; Fri, 16 May 2008 07:48:37 +0000 (UTC) (envelope-from daniel_k_eriksson@telia.com) Received: from royal64.emp.zapto.org (195.198.193.168) by pne-smtpout1-sn1.fre.skanova.net (7.3.129) id 47A9795001FBD508; Fri, 16 May 2008 08:39:11 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.5.7235.2 Date: Fri, 16 May 2008 08:39:09 +0200 Message-ID: <4F9C9299A10AE74E89EA580D14AA10A61A1922@royal64.emp.zapto.org> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: raid6 on freebsd7 only showing 61GB instead of 4TB thread-index: Aci2f5qPKkrEVQAoRuGyC8BsIwDlwAAnRhaw References: From: "Daniel Eriksson" To: Cc: oliverj@spider-networks.net Subject: RE: raid6 on freebsd7 only showing 61GB instead of 4TB X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2008 07:48:38 -0000 Oliver Howe wrote: > I bought a new storage server and installed freebsd7 onto it.=20 > it came with two raid partitions, one of 32GB which i used=20 > for the o/s and one of 4.7TB which i am planning to use as a=20 > nfs partition. everything went fine during the install, fdisk=20 > said that there was 4.7TB on the second partition which i=20 > labelled "/export". but when the machine booted up and i did=20 > df -h it said that that partition only has 61GB and not 4.7TB As others have pointed out, fdisk is not able to handle partitions this big. You need to: 1. umount /export 2. dd if=3D/dev/zero of=3D/dev/da1 bs=3D64k count=3D1 3. gpt create /dev/da1 4. gpt add /dev/da1 5. newfs -O2 -U /dev/da1p1 6. edit your /etc/fstab and change /dev/da1s1d to /dev/da1p1 7. mount /export 8. be happy! The GENERIC kernel comes with GEOM_PART_GPT support so there is no need to load any kernel modules or recompile your kernel to get this to work. (Step #2 above is probably overkill. It erases the old disklabel so that your /dev/da1?? devices disappear.) Beware that running fsck on a 4.7TB partition will take a REALLY long time. If you run FreeBSD 7 in 64 bit mode (amd64), and you really should with 16 GB of memory, then I would recommend using ZFS instead of UFS. For ZFS you would do something like this: 1. umount /export 2. dd if=3D/dev/zero of=3D/dev/da1 bs=3D64k count=3D1 3. zpool create tank /dev/da1 4. edit /boot/loader.conf and add something like this: vm.kmem_size=3D"1024M" vm.kmem_size_max=3D"1024M" vfs.zfs.arc_max=3D"512M" vfs.zfs.prefetch_disable=3D1 5. edit /etc/rc.conf and add zfs_enable=3D"YES" 6. reboot 7. be happy! (With 16 GB memory you can probably use larger values for slightly better performance in step #4 above.) /Daniel Eriksson