|
There are another approaches to this, but I'm using gpart.
# gpart create -s GPT ad1
gpart: provider 'ad1': Invalid argument
Oh. Yes, wrong name. Let's try this:
# gpart create -s GPT ada0
#
Now let's see what we have:
# gpart show ada0
=> 34 3907029101 ada1 GPT (1.8T)
34 3907029101 - free - (1.8T)
#
From the above, we can see one partition of 3907029101 sectors, starting
at sector 34.
Each sector is 512 bytes as can be seen here (in bold):
# camcontrol identify ada0
pass0: <Hitachi HDS722020ALA330 JKAOA28A> ATA-8 SATA 2.x device
pass0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
protocol ATA/ATAPI-8 SATA 2.x
device model Hitachi HDS722020ALA330
firmware revision JKAOA28A
serial number JK1131YAHLJWLV
WWN 5000cca221d68596
cylinders 16383
heads 16
sectors/track 63
sector size logical 512, physical 512, offset 0
LBA supported 268435455 sectors
LBA48 supported 3907029168 sectors
PIO supported PIO4
DMA supported WDMA2 UDMA6
media RPM 7200
Feature Support Enable Value Vendor
read ahead yes yes
write cache yes yes
flush cache yes yes
overlap no
Tagged Command Queuing (TCQ) no no
Native Command Queuing (NCQ) yes 32 tags
SMART yes yes
microcode download yes yes
security yes no
power management yes yes
advanced power management yes no 0/0x00
automatic acoustic management yes no 254/0xFE 128/0x80
media status notification no no
power-up in Standby yes no
write-read-verify no no 0/0x0
unload no no
free-fall no no
data set management (TRIM) no
I plan to leave 200MB free at the end of each HDD. Thus, the gpart commend to
add a new partition is:
gpart add -b 2048 -s 3906824301 -t freebsd-zfs -l disk00 ada0
Please note that the above math is incorrect, but only slightly. It leaves some 99MB free, which is
completely acceptable for this effort. The correct math is:
gpart add -b 2048 -s 3906617453 -t freebsd-zfs -l disk00 ada0
where:
- -b 2048 - starts the partition 2048 sectors in from the start of the disk (leaving 1MB free)
- the start is also on a 4KB boundary, which will give better performance on some HDD
- -s 3906824301 leaves us 200MB free at the end of the HDD (note incorrect math).
- -l disk00 creates a label which you can use when adding this device to the pool
|