Solved Mounting external hard drive question

Hi everyone,

I've created a new UFS partition on my external drive, and I'm a bit confused as to why I need to mount the drive using /dev/da0 instead of the partition itself (/dev/da0p1).

gpart output:

root@freebsd:/media # gpart list da0 Geom name: da0 modified: false state: OK fwheads: 255 fwsectors: 63 last: 1953525127 first: 40 entries: 128 scheme: GPT Providers: 1. Name: da0p1 Mediasize: 1000204845056 (932G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 efimedia: HD(1,GPT,093d256f-811d-11ec-95ec-6805ca2e33ac,0x28,0x74706d60) rawuuid: 093d256f-811d-11ec-95ec-6805ca2e33ac rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 1000204845056 offset: 20480 type: freebsd-ufs index: 1 end: 1953525127 start: 40 Consumers: 1. Name: da0 Mediasize: 1000204885504 (932G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0

Here is what I get when I try to mount the partition:

root@freebsd:/media # mount /dev/da0p1 /media/backup/ mount: /dev/da0p1: No such file or directory

/dev/da0p1 does exist, though:

root@freebsd:/media # ls /dev/da0* /dev/da0 /dev/da0p1

As I said before, mounting /dev/da0 works fine. To make sure, I created a directory on the drive, unmounted /dev/da0, mounted it again and the directory was still there.

I'm pretty new to FreeBSD, so sorry in advance if this gets asked a lot.

Thank you for your time.
 
I think that it's because it's usb-mounted, I've a thumbdrive similar, and the commands you used to initially prepare the disk were/are similar to what I used, whatever those were.
 
… I've created a new UFS partition …

Welcome to FreeBSD Forums.

I guess, you created the partition but (then) not the intended file system. I mean, not in the intended place. …

Postscript

… mounting /dev/da0 works fine. …

… I mean, that's easily reproducible if I accidentally-on-purpose add the file system to the device (instead of its partition), however I can not yet reproduce the No such file or directory symptom for the partition – please see below.
 
Yes you have defiantly done something wrong here. Maybe you formatted da0 I dunno.
Here is the steps to make an external drive usable.
gpart create -s gpt da0
gpart add -t freebsd-ufs da0
newfs -U /dev/da0p1
That did the trick. Not sure what I did wrong... I probably ran newfs on /dev/da0 instead of the partition itself.
Thanks!
 
Back
Top