# Adding another harddrive...?



## jigglywiggly (Dec 22, 2009)

So I just got back a rma'd hd. BIOS sees it fine. So now I just boot into FreeBSD as normal, and I go into gnome and it doesn't see the 1.5tb hd. I tried doing fdisk -l execpt it says that's an invalid argument, I know in Linux it displays all my disks if I did that. I'ma be confused, oh and sorry for making like 5000 threads.


----------



## vivek (Dec 22, 2009)

Run sysinstall to install new hard disk i.e. partition and formatting the hard disk. A step-by-step howto:
http://www.cyberciti.biz/faq/freebsd-adding-second-hard-disk-howto/


----------



## jigglywiggly (Dec 22, 2009)

Ok I am really confused, I got one of them working, but I have two left...

So here is what I did:
I typed:
sysinstall > went to configure > fdisk > ad10 I select
Then I hit a, and it makes a freebsd partition. Then I select w to write out all the changes. Then I select no boot manager.
Then I hit q to get out of that screen.

I press tab and hit ok.
Then I arrow key up to the exit button.
Then I hit tab and hit exit install.
Then I do sysinstall again and go to configure > label, I selected ad10, and hit c but I got "You can only do this i na master partition (see top of screen).

Same thing happens to other hd. Any ideas?

EDIT: I booted off the ubuntu lived cd and tried to delete the info on those 1500gig hds, and it won't let me... I am confused what's going on. Don't bother responding until I figure it out first lol.


----------



## SirDice (Dec 22, 2009)

vivek said:
			
		

> Run sysinstall to install new hard disk i.e. partition and formatting the hard disk.


Ok.. Just a tip.. Don't use sysinstall for anything but the initial install.


Handbook: 18.3 Adding Disks


----------



## crsd (Dec 22, 2009)

I find it easier to manage disks using `gpart` nowadays. Here's an example: http://old.nabble.com/gpart-micro-how-to-td22846615.html


----------



## jigglywiggly (Dec 22, 2009)

Ok I did a few things: I have a usb hd cage so I just put all 3 hds in it. Then I formatted them with NTFS quick on a different desktop that runs Windows.

So then I did sysinstall (I tried this before reading your guys's new comments) and I looked at ad10, it said there were no existing partitions or anything... Ooook. Then I tried making a new one again, and then I tried to labeled and I got that rediculous""You can only do this in a master partition"

So then I went back to ad8 which worked before, and it saw the NTFS partition. 
And of course it worked.

Then I saw you guys mention gpart, I wrote gpart create -s mbr ad10
Then I wrote gpart add -b 63 -s 2830277168 -t freebsd ad10

It then gave me: ad10s1

So then I want to label it with sysinstall.
I go to label, and hit c and all seems well I hit w to write... and:


```
Error mounting /dev/ad10s1d on /disk4 : No such file or directory (100%)
```

This is driving me bonkers.


----------



## crsd (Dec 22, 2009)

Uh, try:

```
gpart create -s bsd ad10s1 # create empty bsdlabel on ad10s1
gpart add -i 4 -b 16 -t freebsd-ufs ad10s1 # i = 4 for 'd' partition, not specifiying size to use whole slice (with 16 byte offset)
```


----------



## jigglywiggly (Dec 22, 2009)

I tried gpart -s bsd ad10s1 and it says 'ad10s1' File exists


----------



## crsd (Dec 22, 2009)

Skip this step then, and please show `# gpart show` output.


----------



## jigglywiggly (Dec 22, 2009)

Gimmie a minute, but I just tried something anyway, so I put them all again back into that usb enclose and formatted them all as ntfs. I booted off an ubuntu live cd just to see if it was just something (super unlikely) to do with *nix in general. It isn't the hds work fine in ubuntu.

Since everything is now deleted off of the 1.5tb hds, there probably won't be anything in gpart show, but I will do let me restart it.


----------



## jigglywiggly (Dec 22, 2009)

Ok here is the output: (in this output I think it's only showing 2x1.5 tb hds, I really have 3... BIOS sees 3, so did ubuntu)

```
# gpart show
=>       63  586072305  ad6  MBR  (279G)
         63  586072305    1  freebsd  [active]  (279G)

=>        0  586072305  ad6s1  BSD  (279G)
          0    1048576      1  freebsd-ufs  (512M)
    1048576    8316480      2  freebsd-swap  (4.0G)
    9365056    6254592      4  freebsd-ufs  (3.0G)
   15619648    1048576      5  freebsd-ufs  (512M)
   16668224  569404081      6  freebsd-ufs  (272G)

=>        63  2930277105  ad8  MBR  (1.4T)
          63        1985       - free -  (993K)
        2048  2930272256    1  !7  (1.4T)
  2930274304        2864       - free -  (1.4M)

=>       63  586072242  ar0  MBR  (279G)
         63  586072305    1  freebsd  [active]  (279G)

=>        0  586072305  ar0s1  BSD  (279G)
          0    1048576      1  freebsd-ufs  (512M)
    1048576    8316480      2  freebsd-swap  (4.0G)
    9365056    6254592      4  freebsd-ufs  (3.0G)
   15619648    1048576      5  freebsd-ufs  (512M)
   16668224  569404081      6  freebsd-ufs  (272G)

#
```
]


----------



## crsd (Dec 22, 2009)

Looks like you just deleted any partition information on ad10. Just start over with what you have done in #6


----------



## phoenix (Dec 22, 2009)

vivek said:
			
		

> Run sysinstall to install new hard disk i.e. partition and formatting the hard disk. A step-by-step howto:
> http://www.cyberciti.biz/faq/freebsd-adding-second-hard-disk-howto/



Don't use sysinstall for anything except installing the OS.  

Use sade() instead.  This gives you the same interface as the disk slicer/labeller in sysinstall, but without all the extra cruft.

Or, install the sfdisk port and use that.


----------



## jigglywiggly (Dec 22, 2009)

Yeah I just tried using sade, and I still get that Error mounting /dev/ad10s1d on /disk5: No such file or directory... I mean what the hell?

I really don't want to back to Debian < I do like FreeBSD but this is being a pain for something what I'd call simple 

And what is weird in sysinstall, is that: I go to fdisk, I create all ,my partions I hit w to write them out. And then once I finish and exit sysinstall... I go back to sysinstall and look at the hard drive, and no changes have even been made! FreeBSD is hating on me


----------



## mickey (Dec 22, 2009)

jigglywiggly said:
			
		

> /dev/ad10s1d on /disk5: No such file or directory... I mean what the hell?



Just to make sure ... you did create an empty directory _/disk5_ before executing that mount command, didn't you?


----------



## jigglywiggly (Dec 22, 2009)

How can I create an empty directory on disk5 if I can't see it in FreeBSD :?

I thought you have to label it first to go into it.

I didn't have to do that on disk ad8, which works amazingly well... And is the exact same model HD as these.

I'll use recordmydesktop(I got gnome on) to show you guys exactly what I am doing give me a second.


----------



## mickey (Dec 22, 2009)

jigglywiggly said:
			
		

> How can I create an empty directory on disk5 if I can't see it in FreeBSD :?



uh? You need to create an empty directory in your filesystem, which serves as the mountpoint to mount the filesystem on.

You cannot simply say:
`# mount /dev/ad10s1d /disk5`

when the directory _/disk5_ doesnt yet exist. In that case it would explain, why you get _No such file or directory_.


----------



## jigglywiggly (Dec 22, 2009)

Well right before I do that, I have gnome running and I do the same thing on disk ad8.

I run fdisk I create the freebsd partition I write out the changes, then instantly gnome launches a folder pointing to the disk where I can write too.

Nothing happens for ad10 or ad14


----------



## jigglywiggly (Dec 22, 2009)

Anyway here is that video, I kind of fuddled around too much with it, but just view the beggining and near the end where I try ad8. Ignore me trying to label constantly...

http://home.comcast.net/~oh071193/videos/fdisk.ogv

Sorry for making you guys download, but if I put it on youtube, I bet you couldn't read the text.
Which reminds me, sorry about the giant res, I just hooked this box temporarily to my desktop monitor with a res of 1920x1080


----------



## jb_fvwm2 (Dec 22, 2009)

Re post #6:
I also had errors with not enough /dev 's on
new installs (v8 vs v7) unless 
geom_bsd.ko, geom_label.ko and geom_mbr.ko were
loaded (search those maybe).  Though I only skimmed
this entire thread...
I have those in /boot/loader.conf (one can also 
mount them at the escape to loader prompt.)  Others
have posted that only two of the three were 
needed.


----------



## jigglywiggly (Dec 22, 2009)

jb_fvwm2 said:
			
		

> Re post #6:
> I also had errors with not enough /dev 's on
> new installs (v8 vs v7) unless
> geom_bsd.ko, geom_label.ko and geom_mbr.ko were
> ...



Wait could you explain more in depth exactly what you did? Though I gather 7.2 worked perfectly? But I am not a fan of legacy stuff D:


----------



## jigglywiggly (Dec 22, 2009)

I think that worked, except I am not totally sure yet, now fdisk does not complain ant all, I added

```
geom_bsd_load="YES"
geom_label_load="YES"
geom_mbr_load="YES"
```

Though I am getting a bit funny behavior so I am not concluded... yet.


----------



## Beastie (Dec 22, 2009)

The funny behavior being...?


----------



## jigglywiggly (Dec 23, 2009)

On each bootup, I get two error windows saying, DISK cannot be mounted, however I can put files on all three of the hds... so I guess it works?


----------

