# Can't mount USB HDD (FreeBSD 7.2)



## Thoht (Aug 13, 2009)

I've got a 512 GB (external) USB HDD that I'd like to use for backup of my FreeBSD installation. I've got one 80 GB HDD for the system itself, and mounted a 1 TB HDD to the _*/home*_ directory where users will put their websites and stuf (which will be RAID/ZFS for backup later once I've learnt more). I connected the USB HDD to one of the USB ports.

Output of dmesg:

```
umass0: <Western Digital My Book, class 0/0, rev 2.00/1.65, addr 2> on uhub4
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <WD 5000AAV External 1.65> Fixed Direct Access SCSI-4 device 
da0: 40.000MB/s transfers
da0: 476940MB (976773168 512 byte sectors: 255H 63S/T 60801C)
GEOM_LABEL: Label for provider da0p1 is msdosfs/EFI.
```

Output of df:

```
# df
Filesystem  1K-blocks    Used     Avail Capacity  Mounted on
/dev/ad0s1a   4520150  146860   4011678     4%    /
devfs               1       1         0   100%    /dev
/dev/ad2s1d 946031670      22 870349116     0%    /home
/dev/ad0s1e    507630      12    467008     0%    /tmp
/dev/ad0s1f  67634226 1006448  61217040     2%    /usr
/dev/ad0s1d   3019406   87534   2690320     3%    /var
```

Output of camcontrol devlist:

```
# camcontrol devlist
<WD 5000AAV External 1.65>         at scbus0 target 0 lun 0 (da0,pass0)
```

I followed the instructions on adding disks using _*sysinstall*_, chosing to use the entire disk, and all looks well until step 4. I _*cd*_ to _*/dev*_ and _*ls*_:


```
acd0            ata             dcons           lpt0            ppi0            ttyv2           urandom
acd0t01         atkbd0          devctl          lpt0.ctl        ptyp0           ttyv3           usb
acpi            audit           devstat         mdctl           ptyp1           ttyv4           usb0
ad0             bpf0            dgdb            mem             random          ttyv5           usb1
ad0s1           console         fd              msdosfs         stderr          ttyv6           usb2
ad0s1a          consolectl      fido            net             stdin           ttyv7           usb3
ad0s1c          ctty            geom.ctl        net1            stdout          ttyv8           usb4
ad0s1d          cuad0           io              net2            sysmouse        ttyv9           xpt0
ad0s1e          cuad0.init      iso9660         net3            ttyd0           ttyva           zero
ad0s1f          cuad0.lock      kbd0            network         ttyd0.init      ttyvb
ad2             da0             kbd1            nfs4            ttyd0.lock      ttyvc
ad2s1           da0p1           kbdmux0         nfslock         ttyp0           ttyvd
ad2s1c          da0p2           klog            null            ttyp1           ttyve
ad2s1d          da0s1           kmem            pass0           ttyv0           ttyvf
agpgart         da0s1c          log             pci             ttyv1           ufsid
```

So I _*ee /etc/fstab*_ and edit it to include da0s1c:


```
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad0s1a             /               ufs     rw              1       1
/dev/ad2s1d             /home           ufs     rw              2       2
/dev/ad0s1e             /tmp            ufs     rw              2       2
/dev/ad0s1f             /usr            ufs     rw              2       2
/dev/ad0s1d             /var            ufs     rw              2       2
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
/dev/da0s1c             /backup         ufs     rw              0       0
```

I save and exit, whereafter I try to mount it:


```
# mount -a
mount: /dev/da0s1c : Invalid argument
```

I don't understand what that means, where'd I go wrong?


----------



## SirDice (Aug 13, 2009)

You forgot to newfs it. Don't use sysinstall, follow the procedure on doing it on the commandline.


----------



## Thoht (Aug 13, 2009)

Okey, using commandline instead.


```
# dd if=/dev/zero of=/devda0 bs=1k count=1
1+0 records in
1+0 records out
1024 bytes transferred in 0.000056 secs (18276457 bytes/sec)
```


```
# fdisk -BI da0
******* Working on device da0 *******
fdisk: Geom not found: "da0"
```
Is this a bad thing? I continued anyway.

```
# bsdlabel -B -w da0s1 auto
```


```
# bsdlabel -e da0s1
```
This opens the editor:
	
	



```
# /dev/da0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: 976767986       16    unused        0     0
  c: 976768002        0    unused        0     0         # "raw" part, don't edit
```

I'm not sure what to enter here. The handbook didn't explain any further.


----------



## Thoht (Aug 13, 2009)

Found it, entered *4.2BSD* instead of *unused*, then ran the rest of the commands and mounted it to _*/backup*_.


----------



## fender0107401 (Aug 14, 2009)

Seems the "c" partition designates the entire disk, you should mount one("d", "e" or something) of the partitions instead of the entire disk.


----------



## Bormental (Aug 20, 2009)

example for msdos file systems
mount_msdosfs /dev/da0p1 /mnt
GEOM_LABEL: Label for provider da0p1 is msdosfs/EFI
NOT ufs
or format disk in ufs


----------



## Bunyan (Aug 20, 2009)

```
newfs -L EFI /dev/da0s1
```
Then mount it.


----------

