fdisk problems with 2TB drive

I have some new Samsung 2TB SATA drives, and wish to use them for data only, one large partition on each drive. The drives are on a 3ware controller. If I run

fdisk /dev/da0

it tells me that the first slice ends at cylinder 1023 (out of 243151) and is 1907334 Meg. Both can't be true! If I run

fdisk -i /dev/da0

and accept the defaults for editing that slice, it promts:

Code:
Default size[-388746544]:

which (being negative) is a sure sign that something is wrong. I have some WD 2TB drives on anohter system (also FreeBSD 8.0), and did not have any trouble with them - could it be the drive? Is this a symptom of the new larger SATA blocksize?

Daniel Feenberg
 
feenberg said:
I have some new Samsung 2TB SATA drives, and wish to use them for data only, one large partition on each drive.
You shouldn't need a BIOS partition on them then. You can write a BSD label directly to the disk, or even newfs the disk without a BSD label.
 
fdisk (well, actually, MBR partitioning) cannot handle drives larger than 2 TB (it's actually close to 1.8 TB, whatever 2^32 * 512 bytes is).

You need to switch to GPT partitioning in order to use partitions/drives that large.
 
feralape said:

I followed that tutorial, and the Samsung drive seems to work fine. It does seem odd that one has to do all the arithmetic oneself, though. I ended up with a datadrive.cfg file of:

Code:
  a: 3906174976 1 4.2BSD

and then did:

Code:
  bsdlabel -R /dev/da2 datadrive.cfg
  newfs /dev/da2 
  mount /dev/da2a /mnt

I didn't bother with the other parameters, since I didn't know if they would be helpful compared to the defaults - it would be nice to have some documentation discussing why one might want to change the block size.

I also tried:

Code:
  bsdlabel -w /dev/da2
  mount /dev/da2a /mnt
and that worked too. There was no difference in write speed, so I am guessing that the drive does not have 4096 byte sectors, since the defaults for bsdlabel presumably don't
take that into account (or maybe it doesn't matter if there is no partition table?)

I like the idea of just newfs'ing the bare drive:

Code:
  newfs /dev/da2
  mount /dev/da2 /mnt

which also worked fine. I am glad to be free of the bsdlabel nonsense.

Now I worry about my other system with 2TB Western Digital drives, though. Why didn't fdisk fail on them? Or did it fail and is my data there in danger, or is the MBR irrelevant to the filesystem?

Thanks to all.

Daniel Feenberg
 
Depends on the actual number of physical sectors. If the number of 512 byte sectors is under 2^32 then you are ok. If it's close to that, then fdisk will have issues.
 
Back
Top