format /dev/ad10 or /dev/ad10s0 for getting the whole Disk as one volume in hammer

Siju George sgeorge.ml at gmail.com
Wed Dec 8 02:44:16 PST 2010


On Sat, Nov 20, 2010 at 7:47 AM, Matthew Dillon
<dillon at apollo.backplane.com> wrote:
>    's0' is the dummy slice for drives which do not have slice tables on
>    them.  I usually format a slice table with fdisk.
>
>    e.g. (note: this completely destroys/reformats the hd):
>
>    fdisk -IB /dev/ad8
>    disklabel64 -r -w /dev/ad8s1 auto
>    disklabel64 -e /dev/ad8s1
>    (add 'd' partition covering the whole disk)
>    (newfs_hammer -L LABEL /dev/ad8s1d)
>
>

Thanks a million Matt :-)
I got it done this way

dfly-bkpsrv# fdisk -IB /dev/ad8
******* Working on device /dev/ad8 *******
fdisk: invalid fdisk partition table found
Warning: ending cylinder wraps, using all 1's
dfly-bkpsrv# disklabel64 -r -w /dev/ad8s1 auto
dfly-bkpsrv# disklabel64 -e /dev/ad8s1

# /dev/ad8s1:
#
# Informational fields calculated from the above
# All byte equivalent offsets must be aligned
#
# boot space:    1044992 bytes
# data space:  488385523 blocks # 476938.99 MB (500106776064 bytes)
#
# NOTE: If the partition data base looks odd it may be
#       physically aligned instead of slice-aligned
#
diskid: bd17ba53-02b4-11e0-b134-011617202aa6
label:
boot2 data base:      0x000000001000
partitions data base: 0x000000100200
partitions data stop: 0x007470bfd000
backup label:         0x007470bfd000
total size:           0x007470bfe200    # 476939.99 MB
alignment: 4096
display block size: 1024        # for partition display only

16 partitions:
#          size     offset    fstype   fsuuid
# EXAMPLE
#a:          4g          0    4.2BSD
#a:          *           *    4.2BSD
d: * * HAMMER
~
~

:wq
/tmp/EdDk.7GFS5BsOrI: 27 lines, 806 characters.
dfly-bkpsrv# disklabel64 /dev/ad8s1
# /dev/ad8s1:
#
# Informational fields calculated from the above
# All byte equivalent offsets must be aligned
#
# boot space:    1044992 bytes
# data space:  488385523 blocks # 476938.99 MB (500106776064 bytes)
#
# NOTE: If the partition data base looks odd it may be
#       physically aligned instead of slice-aligned
#
diskid: bd17ba53-02b4-11e0-b134-011617202aa6
label:
boot2 data base:      0x000000001000
partitions data base: 0x000000100200
partitions data stop: 0x007470bfd000
backup label:         0x007470bfd000
total size:           0x007470bfe200    # 476939.99 MB
alignment: 4096
display block size: 1024        # for partition display only

16 partitions:
#          size     offset    fstype   fsuuid
  d:  488385520          0    HAMMER    #  476938.984MB
  d-stor_uuid: f9fde1cd-02b4-11e0-b134-011617202aa6

dfly-bkpsrv# newfs_hammer -L Backup3 /dev/ad8s1d
Volume 0 DEVICE /dev/ad8s1d     size 465.76GB
initialize freemap volume 0
initializing the undo map (480 MB)
---------------------------------------------
1 volume total size 465.76GB version 4
boot-area-size:       64.00MB
memory-log-size:       1.00GB
undo-buffer-size:    480.00MB
total-pre-allocated: 496.00MB
fsid:                652066f3-02b5-11e0-b134-011617202aa6

NOTE: Please remember that you may have to manually set up a
cron(8) job to prune and reblock the filesystem regularly.


--Siju






More information about the Users mailing list