Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 May 2007 10:53:26 -0400
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Jeffrey Goldberg <jeffrey@goldmark.org>
Cc:        questions@freebsd.org
Subject:   Re: How to find disk slice layout
Message-ID:  <20070528145326.GC24417@gizmo.acns.msu.edu>
In-Reply-To: <4532A9C5-9AA1-42B6-BC29-1FCB98EBC054@goldmark.org>
References:  <4532A9C5-9AA1-42B6-BC29-1FCB98EBC054@goldmark.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, May 27, 2007 at 10:34:52PM -0500, Jeffrey Goldberg wrote:

> For backup reasons I would like to get a statement of the slices on a  
> disk.  fdisk only tells me about classic partitions.  Is there some  
> command I can use to remind me of how I sliced that partition?

I am guessing that you have your terminology scrambled, so lets straighten
that first.    

The primary divisions that FreeBSD recognizes and fdisk handles are slices.
there can be up to 4 slices (named 1-4) on a disk.   
MS- calls these primary partitions.

Within each slice, FreeBSD can create partitions named a-h, with 'c' 
reserved to give information about the whole slice.  The bsdlabel(8)
utility takes care of this.   Just type  bsdlabel adNsX   replacing
the 'N' and 'X' with appropriate drive and slice identifiers
eg  first drive and first slice would be:   bsdlabel ad0s1
If you are dual-booted and FreeBSD is second (a common occurance
then it might be 'bsdlabel ad0s2'

Note you do not back up the swap partition which is normally 'b'
and don't do anything to the 'c' partition which is there only to
describe the slice to the system and is not a true partition.
You can probably skip backing up your /tmp also.
> 
> The best (and a poor approximation it is) I can come up with is to  
> use df to tell me the sizes of my non-swap slices.  There must be a  
> simple way to do this.

Anyway, using 'df -k' or maybe 'df -m' is a good way to deal with planning 
backups because in almost all cases you will only back up partitions that 
you have mounted.   After all, they are the only ones you are actively 
using and housing data to back up.   In addition, when you do a backup, 
the relevant size is the amount used, or possibly the usable capacity as 
given by df rather than the size as divided.

////jerry

> 
> -j
> 
> -- 
> Jeffrey Goldberg                        http://www.goldmark.org/jeff/
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070528145326.GC24417>