# 32TB RAID0 Volume Shows Up as 677GB When Mounted



## robegan99 (Jan 20, 2012)

Hello,

I'm using an LSI MegaRAID 9260 controller with 12 x 3TB SAS drives in a hardware RAID0 volume. I'm trying to mount the volume under FreeBSD 8.1, but when I do, it only shows a size of 677GB.

I've tried two methods to get it running: sysinstall, and command line with dd, fdisk, bsdlabel, etc.

Steps with Sysinstall:
1) Go into fdisk, choose the device (it's mfid2 on my system)
2) Select A (use entire disk)
3) Select W and Q to write and finish
4) Go into Disklabel Editor
5) Select the device (now mfid2s1)
6) Hit C for create, use all available space
7) Choose File System (not swap)
8) Hit W to write changes
9) Exit Sysinstall
10) mount the partiton, and run *df -h* to see that it's only 677GB

Steps from the command line:
1) *dd if=/dev/zero of=/dev/mfid2 bs=1k count=1*
2) *fdisk -BI mfid2*
3) *bsdlabel -B -w mfid2s1 auto*
4) *bsdlabel -e mfid2s1*
5) *newfs /dev/mfid2s1*
6) *mount /dev/mfid2s1 /mnt*
7) Run df -h and see that /mnt is 677GB

Can anybody suggest a way to get this to work? MegaCli reports the correct size for the disk group, the physical disks are fine, etc. Any help would be appreciated. Thanks!


----------



## SirDice (Jan 20, 2012)

This is probably due to the limitations of the MBR partitioning scheme. Try using GPT.


----------



## jem (Jan 20, 2012)

What does the following command say about the disk size?
`# diskinfo -v mfid2`


----------



## phoenix (Jan 20, 2012)

SirDice said:
			
		

> This is probably due to the limitations of the MBR partitioning scheme. Try using GPT.



Yeah, that would be it.  MBR partitioning cannot be used for disks over 2 TB in size.  You either need to use GPT (which is cleaner / nicer to use anyway), or some kind of volume manager to split it into 2 TB logical volumes.


----------



## robegan99 (Jan 21, 2012)

The *diskinfo* output is as follows:


```
# diskinfo -v mfid2
mfid2
        512             # sectorsize
        36000415875072  # mediasize in bytes (33T)
        70313312256     # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        4376801         # Cylinders according to firmware.
        255             # Heads according to firmware.
        63              # Sectors according to firmware.
                        # Disk ident.
```
I was able to get it to mount by just doing a [cmd=]dd if=/dev/zero of=/dev/mfid2[/cmd] and [cmd=]newfs /dev/mfid2[/cmd] and then mounting which then shows up as a 29TB partition. What happens to the other 4TB? I'm not familiar with prepping it with GPT. Would this be better? (and yes, I'm a FreeBSD newb).


----------



## jem (Jan 21, 2012)

robegan99 said:
			
		

> What happens to the other 4TB?



UFS reserves 10% of the volume for root by default.

It's not strictly necessary to partition the device, unless you need to.  You've already created a filesystem directly on the device and can use it as-is if you want to.

If you want to partition it with GPT, try the following:


```
# gpart create -s gpt mfid2
# gpart add -t freebsd-ufs mfid2
# newfs /dev/mfid2p1
```

This will create a GPT partition table with a single partition spanning the whole device.

(I'm assuming you won't be wanting to boot from this device)


----------



## robegan99 (Jan 22, 2012)

jem said:
			
		

> UFS reserves 10% of the volume for root by default.
> 
> It's not strictly necessary to partition the device, unless you need to.  You've already created a filesystem directly on the device and can use it as-is if you want to.
> 
> ...



I did exactly as you described above, worked great. Thanks!


----------

