Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Nov 2012 04:32:13 -0500
From:      "Thomas Mueller" <mueller23@insightbb.com>
To:        freebsd-questions@freebsd.org
Cc:        Snow Mountains <snow.mountains.4@gmail.com>
Subject:   Re: Groupping restored partitions into slices
Message-ID:  <15.F0.23131.D19D8905@smtp02.insight.synacor.com>

Next in thread | Raw E-Mail | Index | Archive | Help
> Thomas, thank you for reply! No, it wasn't dangerously dedicated disk.

> However, what is the exact command to add ad4s1 and ad4s3 using
> bsdlabel? Is it possible  at all? I thought I should use fdisk or
> gpart for that.

> Thanks,
> Sergi M

You use fdisk to create what FreeBSD calls slices such as ad4s1, ad4s2, ad4s3
and disklabel to subdivide a slice into FreeBSD partitions such as ad4s1a,
ad4s1b, ad4s1c, etc.  gpart is used to create GPT partitions such as ad4p1,
ad4p2, ad4p3, etc.  Subdividing a slice into FreeBSD partitions is used with
MBR partition/slice table but not recommended with GPT.

The online FreeBSD bsdlabel man page is online at

http://www.freebsd.org/cgi/man.cgi?query=bsdlabel&apropos=0&sektion=0&manpath=FreeBSD+9.0-RELEASE&arch=default&format=html

One example given is

This is an example disk label that uses some of the new partition size
     types such as %, M, G, and *, which could be used as a source file for
     ``bsdlabel -R ad0s1 new_label_file'':

	 # /dev/ad0s1:

	 8 partitions:
	 #	  size	 offset    fstype   [fsize bsize bps/cpg]
	   a:	400M	   16	 4.2BSD     4096 16384	  75	 # (Cyl.    0 - 812*)
	   b:	  1G	    *	   swap
	   c:	   *	    *	 unused
	   e: 204800	    *	 4.2BSD
	   f:	  5g	    *	 4.2BSD
	   g:	   *	    *	 4.2BSD

but you would have to replace the * with actual appropriate numbers.

After you install the disklabel, you could mount each data partition, but not
the swap partition, to see if the directory and file structure looks right.

Tom



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?15.F0.23131.D19D8905>