Quantcast

error mounting USB disk: Invalid argument

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

error mounting USB disk: Invalid argument

cbrace

Hi all,

I am having difficulties mounting a USB drive under 7.0-STABLE. Running
sysinstall, I can create a partition and format it. But sysinstall is
unable to mount it:

Error mounting /dev/da0s1d on /media/disk6 : Invalid argument

The same error ocurrs when I try to mount it manually on the command line.
I have tried various mount points, to no avail.

Anyone have any ideas what is going wrong?

Thanks.

--
  Colin Brace
  Amsterdam
  http://lim.nl

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error mounting USB disk: Invalid argument

Roland Smith
On Sat, May 31, 2008 at 08:25:22AM +0200, Colin Brace wrote:

>
> Hi all,
>
> I am having difficulties mounting a USB drive under 7.0-STABLE. Running
> sysinstall, I can create a partition and format it. But sysinstall is
> unable to mount it:
>
> Error mounting /dev/da0s1d on /media/disk6 : Invalid argument
>
> The same error ocurrs when I try to mount it manually on the command line.
> I have tried various mount points, to no avail.
>
> Anyone have any ideas what is going wrong?
Can you show us what is shown in the dmesg output when you plug this
drive in, which devices are then created and the exact command that you
used to mount it?

Roland
--
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

attachment0 (202 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error mounting USB disk: Invalid argument

cbrace

On Sat, 31 May 2008 09:29:55 +0200, Roland Smith <[hidden email]> wrote:

> Can you show us what is shown in the dmesg output when you plug this
> drive in, which devices are then created and the exact command that you
> used to mount it?

dmesg:

[...]
umass0:  on uhub1
da0 at umass-sim0 bus 0 target 0 lun 0
da0:  Fixed Direct Access SCSI-2 device
da0: 1.000MB/s transfers
da0: 194481MB (398297088 512 byte sectors: 255H 63S/T 24792C)

These nodes are created:

# ls -1 /dev/da*
/dev/da0
/dev/da0s1
/dev/da0s1c

Then:

# mount /dev/da0s1c /media/disk6
mount: /dev/da0s1c : Invalid argument

# mount -t ufs /dev/da0s1c /media/disk6
mount: /dev/da0s1c : Invalid argument

Thanks.

--
  Colin Brace
  Amsterdam
  http://lim.nl

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error mounting USB disk: Invalid argument

Roland Smith
On Sat, May 31, 2008 at 10:27:50AM +0200, Colin Brace wrote:

>
> On Sat, 31 May 2008 09:29:55 +0200, Roland Smith <[hidden email]> wrote:
>
> > Can you show us what is shown in the dmesg output when you plug this
> > drive in, which devices are then created and the exact command that you
> > used to mount it?
>
> dmesg:
>
> [...]
> umass0:  on uhub1
> da0 at umass-sim0 bus 0 target 0 lun 0
> da0:  Fixed Direct Access SCSI-2 device
> da0: 1.000MB/s transfers
> da0: 194481MB (398297088 512 byte sectors: 255H 63S/T 24792C)
>
> These nodes are created:
>
> # ls -1 /dev/da*
> /dev/da0
> /dev/da0s1
> /dev/da0s1c
>
> Then:
>
> # mount /dev/da0s1c /media/disk6
> mount: /dev/da0s1c : Invalid argument
This is caused by the nmount system call returning EINVAL. Quoting from
mount(2):

[EINVAL]     The super block for the file system had a bad magic
          number or an out of range block size.

After partitioning and labeling the disk, did you make filesystems on
the partitions with newfs?

Roland
--
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

attachment0 (202 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error mounting USB disk: Invalid argument

cbrace

On Sat, 31 May 2008 11:42:21 +0200, Roland Smith <[hidden email]> wrote:

> After partitioning and labeling the disk, did you make filesystems on
> the partitions with newfs?

Ah, no. According to Absolute FreeBSD, 2nd ed, which I have in front of me,
newfs invoked by sysinstall, which I used to create the slice and partition
it (p 241).

Anyway, I now try running newfs in terminal, but it throws up some errrors:

# newfs /dev/da0s1c
/dev/da0s1c: 194474.3MB (398283416 sectors) block size 16384, fragment size
2048
        using 1059 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
newfs: wtfs: 65536 bytes at sector 160: Invalid argument

# newfs /dev/da0s1c
/dev/da0s1c: 194474.3MB (398283416 sectors) block size 16384, fragment size
2048
        using 1059 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
 160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976,
3387328, 3763680, 4140032,newfs: wtfs: 65536 bytes at sector 4516384:
Invalid argument

I tried it several times; the errors seem kinda random, since they vary
each time I run the command.

Could it be that the chipset of this USB device, JMicron, is not entirely
supported by FreeBSD? The reason I ask is because this appears to be an
issue under Linux; cf, http://www.qbik.ch/usb/devices/showdev.php?id=3751

Yes, I am well aware it is a different OS (!); I only mention it in case
there is overlap in the codebase for this particular chipset.

--
  Colin Brace
  Amsterdam
  http://lim.nl

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error mounting USB disk: Invalid argument

Wojciech Puchar-5
In reply to this post by Roland Smith
>> Then:
>>
>> # mount /dev/da0s1c /media/disk6
>> mount: /dev/da0s1c : Invalid argument

mount_msdosfs ?

>
> This is caused by the nmount system call returning EINVAL. Quoting from
> mount(2):
>
> [EINVAL]     The super block for the file system had a bad magic
>         number or an out of range block size.
>
> After partitioning and labeling the disk, did you make filesystems on
> the partitions with newfs?
>
> Roland
> --
> R.F.Smith                                   http://www.xs4all.nl/~rsmith/
> [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
> pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
>
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error mounting USB disk: Invalid argument

Roland Smith
In reply to this post by cbrace
On Sat, May 31, 2008 at 12:17:57PM +0200, Colin Brace wrote:

>
> On Sat, 31 May 2008 11:42:21 +0200, Roland Smith <[hidden email]> wrote:
>
> > After partitioning and labeling the disk, did you make filesystems on
> > the partitions with newfs?
>
> Ah, no. According to Absolute FreeBSD, 2nd ed, which I have in front of me,
> newfs invoked by sysinstall, which I used to create the slice and partition
> it (p 241).
>
> Anyway, I now try running newfs in terminal, but it throws up some errrors:
>
> # newfs /dev/da0s1c
> /dev/da0s1c: 194474.3MB (398283416 sectors) block size 16384, fragment size
> 2048
> using 1059 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
> super-block backups (for fsck -b #) at:
> newfs: wtfs: 65536 bytes at sector 160: Invalid argument
>
> # newfs /dev/da0s1c
> /dev/da0s1c: 194474.3MB (398283416 sectors) block size 16384, fragment size
> 2048
> using 1059 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
> super-block backups (for fsck -b #) at:
>  160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976,
> 3387328, 3763680, 4140032,newfs: wtfs: 65536 bytes at sector 4516384:
> Invalid argument
>
> I tried it several times; the errors seem kinda random, since they vary
> each time I run the command.
>
> Could it be that the chipset of this USB device, JMicron, is not entirely
> supported by FreeBSD? The reason I ask is because this appears to be an
> issue under Linux; cf, http://www.qbik.ch/usb/devices/showdev.php?id=3751
I've only had trouble with JMicron when using geli(8) encrypted
partitions on a machine that was underpowered. But not when just doing a
newfs.

You could try building a kernel without umass, but with atausb and
atapifd. The disk will be attached as a floppy drive, /dev/afd*

Roland
--
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

attachment0 (202 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error mounting USB disk: Invalid argument

Ian Smith-12
In reply to this post by cbrace
On Sat, 31 May 2008 13:29:26 +0200 (CEST)
  Wojciech Puchar <[hidden email]> wrote:

 > >> Then:
 > >>
 > >> # mount /dev/da0s1c /media/disk6
 > >> mount: /dev/da0s1c : Invalid argument
 >
 > mount_msdosfs ?

Maybe.  But then it'd likely be /dev/da0s1 ..

Even if it's UFS, you wouldn't want to mount the 'c' partition.

Perhaps? 'mount /dev/da0s1a /media/disk6' or da0s1d maybe ..

Colin, what does 'fdisk da0' say?  How about 'bsdlabel da0s1' ?

 > > This is caused by the nmount system call returning EINVAL. Quoting from
 > > mount(2):
 > >
 > > [EINVAL]     The super block for the file system had a bad magic
 > >         number or an out of range block size.
 > >
 > > After partitioning and labeling the disk, did you make filesystems on
 > > the partitions with newfs?
 > >
 > > Roland

cheers, Ian

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error mounting USB disk: Invalid argument

cbrace
In reply to this post by Roland Smith
Hi again,

It seems like a JMicron issue. I can mount a different USB drive, formatted for Linux, without problem:

dmesg:

[...]
umass0: <Myson Century, Inc. USB Mass Storage Device, class 0/0, rev 2.00/b0.08, addr 2> on uhub1
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <  > Removable Direct Access SCSI-2 device
da0: 1.000MB/s transfers
da0: 38154MB (78140160 512 byte sectors: 255H 63S/T 4864C)
GEOM_LABEL: Label for provider da0s1 is ext2fs//.

[root@venus ~]# mount -t ext2fs /dev/da0s1 /media/disk6/

ls /media/disk6
[...]

Works fine.

Roland Smith wrote
You could try building a kernel without umass, but with atausb and
atapifd. The disk will be attached as a floppy drive, /dev/afd*
Thanks for the suggestion, but it isn't really worth my trouble at this point; I'll find a different solution. Somewhere there must be a list of which SATA to USB chipsets are supported by FreeBSD.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error mounting USB disk: Invalid argument

Reid Linnemann
In reply to this post by cbrace
Written by Colin Brace on 05/31/08 05:17>>

> On Sat, 31 May 2008 11:42:21 +0200, Roland Smith <[hidden email]> wrote:
>
>> After partitioning and labeling the disk, did you make filesystems on
>> the partitions with newfs?
>
> Ah, no. According to Absolute FreeBSD, 2nd ed, which I have in front of me,
> newfs invoked by sysinstall, which I used to create the slice and partition
> it (p 241).
>
> Anyway, I now try running newfs in terminal, but it throws up some errrors:
>
> # newfs /dev/da0s1c
> /dev/da0s1c: 194474.3MB (398283416 sectors) block size 16384, fragment size
> 2048
> using 1059 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
> super-block backups (for fsck -b #) at:
> newfs: wtfs: 65536 bytes at sector 160: Invalid argument
>
> # newfs /dev/da0s1c
> /dev/da0s1c: 194474.3MB (398283416 sectors) block size 16384, fragment size
> 2048
> using 1059 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
> super-block backups (for fsck -b #) at:
>  160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976,
> 3387328, 3763680, 4140032,newfs: wtfs: 65536 bytes at sector 4516384:
> Invalid argument

You obviously did not really partition the slice with bsdlabel. The c
partition is invalid for a filesystem. If you look at the label I'm sure
you'll see that the FSTYPE field is 'unused', with a comment that reads
``"raw" part, don't edit``. You should add a partition with bsdlabel,
perhaps partition 'a', with fstype 4.2BSD. You can then newfs this
partition.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error mounting USB disk: Invalid argument [SOLVED]

cbrace
In reply to this post by cbrace
Colin_Brace wrote
I am having difficulties mounting a USB drive under 7.0-STABLE. Running
sysinstall, I can create a partition and format it. But sysinstall is
unable to mount it:

Error mounting /dev/da0s1d on /media/disk6 : Invalid argument

The same error ocurrs when I try to mount it manually on the command line.
I have tried various mount points, to no avail.

Anyone have any ideas what is going wrong?
I am not sure what was going wrong then, but I now have this working, both with a Myson-based chipset device (ATA->USB) as well as a JMicron-based device (SATA->USB).

I am not sure whether this is a factor, but I also added a USB v2 PCI card to the box (it is an older Pentium IV with a motherboard that only supports USB v1.1). The chipset of this card is Via.

For several of the ext3 partitions, I had to run "fsck_ext2fs" first before I could mount them.

Thanks for the various suggestions; they pointed me in the right direction.
 
Loading...