From owner-freebsd-questions@FreeBSD.ORG Sun May 2 02:11:20 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3CDE11065670 for ; Sun, 2 May 2010 02:11:20 +0000 (UTC) (envelope-from jontheil@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 92DD98FC1C for ; Sun, 2 May 2010 02:11:19 +0000 (UTC) Received: by fxm15 with SMTP id 15so1387345fxm.13 for ; Sat, 01 May 2010 19:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=XiSPQ4xhR8AAUSXqOZOa8vGjs8URbGY/yQTcj5X/FHM=; b=Bvmq4XWqdVyygHp4C761ZF1MB4uB66grV4pYxqjUOiZW0/pQ904nYPUjWjkgwu7Kel b+qT5eb83xo+l9CrAwlIcBqqCppbssIRN9+jkR7clIPfnve4mNKH4GAF5oWX3tRxe+HY 6MgFXkruWiPbTAT0MKkh1y1l+dd2kgd5ao6Ug= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=hPPBvbOH6rPAXEhBJAQwyPXMTyKxlOcOKqbMQRcLz+g6LmQu8iX0IrIoW3bdLJE+2z ot+spT2qF3KdNyrFLTZ+TfP9VUsy8rxb3+0DeSOoOoBMW8XakA2CLe72UaGIr+q4Dom5 3gnf88i6YGO9c3R9usPAs7FymXNfKaymvBuMk= Received: by 10.223.20.216 with SMTP id g24mr2391637fab.63.1272766275103; Sat, 01 May 2010 19:11:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.118.68 with HTTP; Sat, 1 May 2010 19:10:55 -0700 (PDT) In-Reply-To: <4BDC794B.2060009@cam.ac.uk> References: <4BDC794B.2060009@cam.ac.uk> From: Jon Theil Nielsen Date: Sun, 2 May 2010 04:10:55 +0200 Message-ID: To: Christopher Key Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: User Questions Subject: Re: More than 8 partitions 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: Sun, 02 May 2010 02:11:20 -0000 2010/5/1 Christopher Key > Jon Theil Nielsen wrote: > > Hi > > > > I'm running 8.0-Release on an external usb hard drive. and have dual-boot > > with FreeBSD on da0s2 and Windows XP on da0s1. I made a setup via > Sysinstall > > with 7 partitions: > > > > /dev/da0s2a on / (ufs, local) > > /dev/da0s2b (swap) > > /dev/da0s2d on /var (ufs, local, soft-updates) > > /dev/da0s2e on /tmp (ufs, local, soft-updates) > > /dev/da0s2f on /usr (ufs, local, soft-updates) > > /dev/da0s2h on /var/log (ufs, local, soft-updates) > > /dev/da0s2g on /home (ufs, local, soft-updates) > > > > I have about 660 GB left unused on da0s2 that I would like to use for > > backups. But I can't figure out how to create one more partition. > > If i create a file for bsdlabel like > > > > # size offset fstype > > i: * 0 4.2BSD > > > > I get the following error message: "line 2: partition name out of range > a-h: > > i" > > I have also tried with gpart: > > > > gpart add -s 500G -t freebsd -f x da0s2 > > > > I get something like "gpart: index '9': No space left on device" > > > > I thought that 8.0 should support more than 8 partitions. Maybe it does, > but > > then I don't know how to do. > > Any ideas? > > > > > I believe that FreeBSD does support more than 8 partitions on a disk > (apparently up to 20 using gpart), but that you need sufficient entries > for these partitions to be created in the disklabel, viz. > > gpart create -n 20 ... > > Some testing seems to indicate that you can manually override this by > changing by byte 0x28a of the disk from 0x08 to 0x14, and that bsdlabel > / gpart will then allow you to create further partitions on the disk. > > > > Kind regards, > > Christopher Key Thanks Christopher I am not sure if I understand all of if. And I wouldn't like to wipe the drive to test if is possible to "mass produce" partitions like that. Could be useful in another situation, though. My knowlodge of GEOM and its utilities is very limited. Since I have succeded in creating the two slices with fdisk and subsequently populate them with bsdlabel, my only problem is how to create the last partition from the unpartioned space on da0s2. As mentioned in the beginning of this post, I have tried with both bsdlabel (from a file) and by issuing the gpart add command. With no luck. Would it be any help to give more specific about the drive/slice? The output of df -h | grep dev/da0 is: /dev/da0s2a 3.9G 630M 2.9G 17% / /dev/da0s2g 97G 160K 89G 0% /home /dev/da0s2e 3.9G 129M 3.4G 4% /tmp /dev/da0s2f 48G 6.6G 38G 15% /usr /dev/da0s2d 9.7G 151M 8.8G 2% /var /dev/da0s2h 3.9G 1.5M 3.6G 0% /var/log and of gpart show da0: => 0 1759551255 da0s2 BSD (839G) 0 1048576 - free - (512M) 1048576 8318064 2 freebsd-swap (4.0G) 9366640 7303168 - free - (3.5G) 16669808 8388608 1 freebsd-ufs (4.0G) 25058416 20971520 4 freebsd-ufs (10G) 46029936 8388608 5 freebsd-ufs (4.0G) 54418544 104857600 6 freebsd-ufs (50G) 159276144 209715200 7 freebsd-ufs (100G) 936891344 8388608 8 freebsd-ufs (4.0G) 377379952 1382171303 - free - (659G) and, finaly, of bsdlabel da0s2: # /dev/da0s2: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 8388608 16669808 4.2BSD 0 0 0 b: 8318064 1048576 swap c: 1759551255 0 unused 0 0 # "raw" part, don't edit d: 20971520 25058416 4.2BSD 0 0 0 e: 8388608 46029936 4.2BSD 0 0 0 f: 104857600 54418544 4.2BSD 0 0 0 g: 209715200 159276144 4.2BSD 0 0 0 h: 8388608 368991344 4.2BSD 0 0 0 In my desparate effort to understand these informations/data, i have put them into a spreadsheet and rearranged them - including some of my own calculations and assumptions. bsdlabel output - sorted by sector offset: # size offset (GB*) c 1.759.551.255 0 839 b 8.318.064 1.048.576 4 a 8.388.608 16.669.808 4 d 20.971.520 25.058.416 10 e 8.388.608 46.029.936 4 f 104.857.600 54.418.544 50 g 209.715.200 159.276.144 100 h 8.388.608 368.991.344 4 gpart show output - sorted by sector offset: (#) (size) (offset) (GB) (offset*) (GiB*) (i) 1.048.576 0 0,5 0 1 free b 8.318.064 1.048.576 4 1.048.576 4 2 7.303.168 9.366.640 3,5 9.366.640 3 free a 8.388.608 16.669.808 4 16.669.808 4 1 d 20.971.520 25.058.416 10 25.058.416 10 4 e 8.388.608 46.029.936 4 46.029.936 4 5 f 104.857.600 54.418.544 50 46.029.936 50 6 g 209.715.200 159.276.144 100 159.276.144 100 7 1.382.171.303 377.379.952 659 368.991.344 659 free h 8.388.608 936.891.344 4 1.759.551.255 4 8 In the first place, I wondered why gpart would not let me add anoter partiotion. There *should *be lots of free space left. But on closer inspection, it seems that the 659 somehow is '"squezzed'" in. Don't really know what all this is about. Allthough this might be a vaste of time, since I kan copy, reslice/repartition and copy back, any more comments are welcome. Regards, -- Jon