From owner-freebsd-questions@FreeBSD.ORG Wed Feb 6 17:59:06 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 27D05D53 for ; Wed, 6 Feb 2013 17:59:06 +0000 (UTC) (envelope-from prvs=742911f0f=pauls@utdallas.edu) Received: from ip-002.utdallas.edu (ip-002.utdallas.edu [129.110.20.108]) by mx1.freebsd.org (Postfix) with ESMTP id EC36DE20 for ; Wed, 6 Feb 2013 17:59:05 +0000 (UTC) X-Group: None X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtUEAJ6ZElGBbgogVmdsb2JhbABFwGADASICJCeCXgKBYxoTiBEMmwiYIYkKkHhhA4hmoSo X-IronPort-AV: E=Sophos;i="4.84,617,1355119200"; d="scan'208";a="114188130" Received: from zxtm01.utdallas.edu (HELO utd71538.utdallas.edu) ([129.110.10.32]) by ip-002.utdallas.edu with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Feb 2013 11:58:59 -0600 Date: Wed, 06 Feb 2013 11:58:56 -0600 From: Paul Schmehl To: FreeBSD Questions List Subject: How to add unused space to an existing install Message-ID: <47D0E9AD1EEAC6058A534838@utd71538.campus.ad.utdallas.edu> X-Mailer: Mulberry/4.1.0a1 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline; size=2495 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2013 17:59:06 -0000 I have a FreeBSD 8.3 RELEASE box that we recently discovered only has part of the "disk" being used. This box has four 1TB drives in RAID 5, and df only shows 500MB of disk available. fdisk shows this: # fdisk -p # /dev/mfid0 g c364602 h255 s63 p 1 0xa5 63 1562363771 a 1 When I run the fdisk editor in sysinstall I see this: Disk name: mfid0 FDISK Partition Editor DISK Geometry: 364602 cyls/255 heads/63 sectors = 5857331130 sectors (2860024MB) Offset Size(ST) End Name PType Desc Subtype Flags 0 63 62 - 12 unused 0 63 1562363771 1562363833 mfid0s1 8 freebsd 165 1562363834 4294981702 5857345535 - 12 unused 0 I want to capture all that unused space and add it to the server. fstab has this: # cat /etc/fstab # Device Mountpoint FStype Options Dump Pass# /dev/mfid0s1b none swap sw 0 0 /dev/mfid0s1a / ufs rw 1 1 /dev/mfid0s1e /home ufs rw 2 2 /dev/mfid0s1d /tmp ufs rw 2 2 /dev/mfid0s1f /usr ufs rw 2 2 /dev/mfid0s1g /var ufs rw 2 2 /dev/acd0 /cdrom cd9660 ro,noauto 0 0 When I try to create a new slice using fdisk, it doesn't seem to work. If I move to the label editor, I get this: FreeBSD Disklabel Editor Disk: mfid0 Partition name: mfid0s1 Free: 0 blocks (0MB) Part Mount Size Newfs Part Mount Size Newfs ---- ----- ---- ----- ---- ----- ---- ----- mfid0s1a 2000MB * mfid0s1d 65536MB * mfid0s1e 4096MB * mfid0s1b swap 65536MB SWAP mfid0s1f 10240MB * mfid0s1g 601GB * As you can see mfid0s1g is 601GB, and according to fstab that's /var. Yet df -h shows: # df -h Filesystem Size Used Avail Capacity Mounted on /dev/mfid0s1a 1.9G 726M 1.0G 41% / devfs 1.0k 1.0k 0B 100% /dev /dev/mfid0s1e 3.9G 38M 3.5G 1% /home /dev/mfid0s1d 62G 6.6M 57G 0% /tmp /dev/mfid0s1f 9.7G 7.5G 1.4G 84% /usr /dev/mfid0s1g 582G 39G 496G 7% /var So apparently I'm not creating this new slice? It should be /dev/mfid0s1h, correct? How to I "recapture" the remaining 2+TB of space that's not being used? -- Paul Schmehl (pauls@utdallas.edu) Senior Information Security Analyst The University of Texas at Dallas http://www.utdallas.edu/infosecurity/