FreeBSD 8 drive free space issue

This gave me some grief today, but I got it working in the end and figured I'd post my method here for your reference. The label editor in sysinstall was not detecting my free space correctly (displaying 1.6TB instead of 3.6TB) and I was getting an error in "/var/log/messages" to this effect:

Code:
Jan  4 17:16:51 samba kernel: GEOM: aacd1: partition 1 does not end on a track boundary.


First up, I'm running a clean install of FreeBSD 8 AMD64. Noteworthy hardware in use is my Adaptec 5805 SATA RAID controller, configured in this way:

2x 500GB drives in RAID 1 (/dev/aacd0) for FreeBSD system
6x 1TB drives in RAID 50 (/dev/aacd1) for data


The system was installed using the "Standard" sysinstall method. I later discovered that one of my labels (on /dev/aacd1) was missing a few terabytes of space. I attempted to resolve this in sysinstall with fdisk, which showed the correct amount of space and label editor, which struggled to get the right amount of space. In the end, I gave up on sysinstall and used gpart instead.

The problem was with /dev/aacd1, my other array was working fine. Please note, this is not my system drive or boot drive, just a drive for additional data.


So I took these steps to destroy any leftovers of what sysinstall was trying to do, then rebuild the slice:

Code:
# gpart destroy aacd1
# gpart create -s GPT aacd1

I used the GPT scheme because the BSD one also had problems reporting the correct amount of space.

Now I wanted to create a partition 1.5TB (1536GB) in size:

Code:
# gpart add -s 1536G -t freebsd-ufs aacd1


Then the remaining space in the second partition (I suppose if you only want one partition, skip the previous command):

Code:
# gpart add -t freebsd-ufs aacd1


To check your slices, run this command:

Code:
# gpart show aacd1

...which gave me this output:
Code:
=>        34  7809785789  aacd1  GPT  (3.6T)
          34  3221225472      1  freebsd-ufs  (1.5T)
  3221225506  4588560317      2  freebsd-ufs  (2.1T)


To create the filesystem on the partitions, I checked /dev to see what my partitions were called and then ran this command to format each one:

Code:
# newfs -U /dev/aacd1p1
# newfs -U /dev/aacd1p2


Lastly, you'll need to mount these and most likely place entries in /etc/fstab for each one. I created two folders /store1 and /store2, as mount points, then ran:

Code:
# mount /dev/aacd1p1 /store1
# mount /dev/aacd1p2 /store2


...and added these two lines to my /etc/fstab, so it persists after reboot:

Code:
/dev/aacd1p1            /store1         ufs     rw			    2       2
/dev/aacd1p2            /store2         ufs     rw              2       2

With any luck, it all works.


Now I don't pretend to be an expert at this. In fact, most of the above information I pieced together from various tidbits of information, much of it from this forum. If you have any suggestions, criticisms, whatever, please share them.
 
Back
Top