Re: How to find disk slice layout



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@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: moving to larger drive
    ... >> Use fdisk to slice and do the mbr. ... fdisk writes the main label that makes the slices on the disk. ... which divides the slice up in to as many as 8 partitions ...
    (freebsd-questions)
  • SUMMARY: Mirroring Questions Part 1 & 2
    ... If you use two diffrent size hard drives to mirror you can reclaim the un-used space on the larger of the two drives, this seems to not be recommended because you will take a performance hit. ... If I mirror with drives of different sizes, root disk being the smallest and the mirror being the largest, will I suffer performance problems? ... Both disks have identical partions setup when looking thru the format command expect slice 2. ... If you have only a few partitions that could be considered actual boot ...
    (SunManagers)
  • Recovering bsdlabel / disklabel with scan_ffs
    ... bsdlabel / disklabel though... ... primary and the previous disk as secondary), ... exactly remember the size and layout of the partitions on that machine. ... If you can't remember the SLICE coordinates, ...
    (freebsd-questions)
  • Re: Using a hard drive without partitions
    ... > What are the ramifications, good or bad, of not using partitions on a ... You can also bsdlabel either a disk or a slice or a regular file, ... I haven't tried to bsdlabel a disk, ...
    (freebsd-questions)
  • Re: Trying to recover data from FreeBSD 4.11 system
    ... Use fdisk to find out how it sees the drive. ... Then use bsdlabel to look at what partitions are defined in any ... define the whole slice to the system ... Then create a mount point and try to mount it. ...
    (freebsd-questions)