Date: Fri, 16 May 2008 08:39:09 +0200 From: "Daniel Eriksson" <daniel_k_eriksson@telia.com> To: <freebsd-questions@freebsd.org> Cc: oliverj@spider-networks.net Subject: RE: raid6 on freebsd7 only showing 61GB instead of 4TB Message-ID: <4F9C9299A10AE74E89EA580D14AA10A61A1922@royal64.emp.zapto.org> In-Reply-To: <PM.23495.1210849978@hmweb-8.uk1.bibliotech.net> References: <PM.23495.1210849978@hmweb-8.uk1.bibliotech.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F9C9299A10AE74E89EA580D14AA10A61A1922>