Slices / Partitions

Hello

I've installed freebsd on a 250 gb disk, however I made only 1 slice. I have there 8 partitions now, and I cannod add more. So my current partitions are about 50 GB, and I have about 200 GB free space.

So I have two options:
1. Change the slice size, so I can make second ant third slices with their partitions and I'll use all the space of the disk

2. Tune the system so I can make more than 8 partitions in one slice.

I am searching about the issue now, but I cannot find information about the problem.

I saw phoenix wrote about new limit of the partitions count - 26, but my sistem add new partitions as "X".

I'll be gladfull if someone can help me with this issue. You can point me some utilities for changing the slice size "on the fly" or to increase the partitions limit per slice. Both works for me.

Last chance for me is to dd the partitions on some removeable media (this is laptop), resetup the disk with correct slice options and move back the data, which is a little bit hard for me right now.

Thank you in advance!
 
Supply the version of FreeBSD you are using. IIRC the partitioning scheme changed between certain versions and it could be you are still using the 'old' way.
 
uname -a
Code:
FreeBSD gruh.mazeto.net 7.2-STABLE FreeBSD 7.2-STABLE #0: Tue Sep 15 20:36:32 UTC 2009     root@gruh:/usr/obj/usr/src/sys/GENERIC  amd64

fdisk

Code:
fdisk /dev/ad4
******* Working on device /dev/ad4 *******
parameters extracted from in-core disklabel are:
cylinders=484521 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=484521 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 488397105 (238475 Meg), flag 80 (active)
	beg: cyl 0/ head 1/ sector 1;
	end: cyl 1023/ head 15/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

disklabel
Code:
disklabel /dev/ad4s1
# /dev/ad4s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: 10485760        0    4.2BSD        0     0     0 
  b:  1024000 10485760      swap                    
  c: 488397105        0    unused        0     0         # "raw" part, don't edit
  d:  1024000 11509760    4.2BSD        0     0     0 
  e: 10485760 12533760    4.2BSD        0     0     0 
  f: 20971520 23019520    4.2BSD        0     0     0 
  g: 10485760 43991040    4.2BSD        0     0     0 
  h: 20971520 54476800    4.2BSD        0     0     0

The easiest way I see is to remove one of the partitions and recreate it using all the remaining free space.
 
As far as I recall, FreeBSD 8 supports more than 8 disklabel slices (ie. slices above "h"). I don't know if the change was ever merged to FreeBSD 7.
 
Thank you aragon!

Does this mean, that upgrading to freebsd 8 will allow me to add more partitions? Or once formatted using the old style, the disk will contain only 8 partitions? :stud
 
You can create a second(or even a third or fourth) FreeBSD slice in the MBR.

Each slice (ad4s2, ad4s3, ad4s4) will give you in theory 8 partitions/labels of which label c is reserved.
 
Yes J65nko, you are right. Unfortunately I have already setup my system. ad4s1 uses all the disk space.
I have no experience with disk management tools under freebsd so I have no clue how I can resize the slice without touching the partitions inside, without reinstalling the system and so on.
 
Hello J65nko

Yes, this is solution. I've upgraded to FreeBSD 8-RC1 this morning. I've tried creating more partitions, but again the old scenario - the next partitions after 'h' appear as X.

I am working on the problem, I'll post the results. Have a nice day :)
 
You will need to use GUID Partition Tables (gpt) to be able to use more then 8 partitions.

You should be able to convert your MBR to GPT with the gpt migrate command. I've never tried it though so I'm not sure how this works. More info can be found in gpt(8).
 
holala said:
Does this mean, that upgrading to freebsd 8 will allow me to add more partitions? Or once formatted using the old style, the disk will contain only 8 partitions? :stud

Unfortunately I've never tried so I don't know. I just recall seeing someone talk about having committed the change in the mailing lists. :)

If you are using sysinstall to create the partitions, don't. Use bsdlabel.
 
Hello people,

After I rebuild the system to 8-RC1 I tried using GPT. However after some time I gave up (gpt migrate errors).

I made dump of the file systems, put the files in the server (ftp), then recreate the slices with freebsd bootable disk and freebsd fixit cd.

Thank everyone for the support :)
 
Back
Top