Other mount: ext2 operation not permited

The ouput of
Code:
 gpart list
is
Code:
Geom name: diskid/DISK-00400539BC5BBDC1873D005A
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 60768255
first: 63
entries: 4
scheme: MBR
Providers:
1. Name: diskid/DISK-00400539BC5BBDC1873D005As2
   Mediasize: 31112298496 (29G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1048576
   Mode: r0w0e0
   rawtype: 131
   length: 31112298496
   offset: 1048576
   type: linux-data
   index: 2
   end: 60768255
   start: 2048
Consumers:
1. Name: diskid/DISK-00400539BC5BBDC1873D005A
   Mediasize: 31113347072 (29G)
   Sectorsize: 512
   Mode: r0w0e0
 
So, i tried with
Code:
 mount -t ext2fs /dev/da1s2 /mnt/usb32
But always shows me that error.
 
How do we know that the "gpart list" output you showed above really applies to disk da1? It gives disk IDs, but not device names. I also see only one disk drive in there, which may be da0. Suggestion: Try looking at "gpart show da0" and "gpart show da1". The output from "show" is more concise and easier to interpret.

About "not permitted": Are you root?
If yes, can you do a "ls -l /dev/daXsY" (for the right X and Y) and look at the permissions? It would be unusual that they get screwed up, but it's possible. Also do that type of ls on your mount point /mnt/usb32.
Last ditch measure: I vaguely remember that there is a crazy corner case in which you can't mount a file system on a directory, because something in that directory is busy. Don't remember the details though. Just in case, try this: create a new mount point /mnt/temp, and immediately (before something can make it busy) mount on it. If that starts working and mounting on /mnt/usb32 does not, then we can try to debug that.
 
ralphbsz
Code:
root@hostfreebsd:~ # ls -l /dev/da1s2
crw-r-----  1 root  operator  0x90 Mar  2 20:10 /dev/da1s2
 
How do we know that the "gpart list" output you showed above really applies to disk da1? It gives disk IDs, but not device names. I also see only one disk drive in there, which may be da0.

So you want to see the entire output of
Code:
 gpart list
?
 
Permissions on the device are fine. If you are root when mounting, it should work, from that viewpoint.

Start with "gpart show", instead of "list", for both disks. The output is smaller and easier to read.
 
Hello,

Have you checked the directory /mnt/usb32 with lsof? There may be a processes using it.

Also there is one other possibility - I've seen intel software RAID, or a gmirror/geom RAID, or even a Solaris Volume Manager metadata placed on a drive.

Then the drive becomes part of a RAID array and it cannot be mounted directly, you need to assemble the entire array and mount it on.
This is just a wild guess, but I had the same issue before. The solution would be full zeroing the entire drive and format it again.

Or if you can't delete it's data then you can look for kernel modules and devices popping under /dev different than daX as soon as the drive is plugged in.
Also you can check the dmesg for any events related.

Hope this helps : )
 
Have you checked the directory /mnt/usb32 with lsof? There may be a processes using it.
FreeBSD doesn't have lsof so using fuser(1) or fstat(1) is a better idea, but another thing to consider is that processes can only hinder the dismounting of filesystems, not mounting them:
Code:
root@unicron:/home/peter # fuser temp
temp: 76656c 76594c
root@unicron:/home/peter # fstat temp
USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME
peter    vi         76656   wd /home      1479 drwxr-xr-x       6  r  temp
peter    ksh        76594   wd /home      1479 drwxr-xr-x       6  r  temp
root@unicron:/home/peter # mount_nullfs /etc temp
root@unicron:/home/peter # mount | grep temp
/etc on /home/peter/temp (nullfs, local)
root@unicron:/home/peter # fuser temp
temp: 76656c 76594c
See?
 
So, i tried with
Code:
 mount -t ext2fs /dev/da1s2 /mnt/usb32
But always shows me that error.
Are you actually root? Because only the root user can mount filesystems. Also: does /mnt/usb32 exist and how did you provide support for the ext2 filesystem? (edit: so does kldstat actually show ext2fs.ko because if it doesn't then that's part of your problem).

Also try using sysctl kern.disks or gpart show to ensure you got the right disks. Usually show is a better idea than list.

My suggestion would be to rely on sysutils/fusefs-ext2 for this. So eventually leading up to the command # fuse-ext2 /dev/da1s2 /mnt/usb32.
 
ShelLuser
I am an strange guy. I'm starting first with what you have commented (it say, i am beggining from the end XD)
 
ShelLuser
You need to see this:
Code:
checking for llseek... no
checking for lseek64... no
checking for library containing sem_post... none required
checking for library containing fuse_main... no
configure: error: Can't find libfuse, please install it
===>  Script "configure" failed unexpectedly.
Please report the problem to ehaupt@FreeBSD.org [maintainer] and attach the
"/usr/ports/sysutils/fusefs-ext2/work/fuse-ext2-0.0.10/config.log" including
the output of the failure of your make command. Also, it might be a good idea
to provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/fusefs-ext2
Sorry but i can't post the entire output. I think that it would be too much for you. I'm not saying that you can't read and understand it. But it's more than the double or triple of what i have posted. Any way, if you want that i post the whole output, just tell me.
I want to ask to you: why sometimes make gets me error? For example: i think that it was yesterday. I was trying to compile a program, and make fails. So, because i get tired, i opted for compile and install another program. And it was successful.
 
ShelLuser
Code:
root@hostfreebsd:~ # fuse-ext2 /dev/da1s2 /mnt/usb1 
Mounting /dev/da1s2 Read-Only.
Use 'force' or 'rw+' options to enable Read-Write mode
How should i write the "rw+"? This way:
Code:
root@hostfreebsd:~ # fuse-ext2 rw+ /dev/da1s2 /mnt/usb1

fuse-ext2 0.0.9 29 - FUSE EXT2FS Driver

Copyright (C) 2008-2015 Alper Akcan <alper.akcan@gmail.com>
Copyright (C) 2009 Renzo Davoli <renzo@cs.unibo.it>

Usage:    fuse-ext2 <device|image_file> <mount_point> [-o option[,...]]

Options:  ro, force, allow_others
          Please see details in the manual.

Example:  fuse-ext2 /dev/sda1 /mnt/sda1

http://github.com/alperakcan/fuse-ext2/
 
Because if i do
Code:
 ls
for see what's in the partition, it shows:
Code:
root@hostfreebsd:/mnt/usb1 # ls
ls: .: No such file or directory
And if i try with the file explorer, I get a message like this:
Code:
Failed to open directory "usb1".
Error opening directory '/mnt/usb1': No such file or directory.
 
Are you actually root? Because only the root user can mount filesystems. Also: does /mnt/usb32 exist and how did you provide support for the ext2 filesystem? (edit: so does kldstat actually show ext2fs.ko because if it doesn't then that's part of your problem).
Of course I'm root.

In case you need it, i post the output of
Code:
 kldstat
Code:
root@hostfreebsd:/mnt/usb1 # kldstat
Id Refs Address    Size     Name
 1   33 0xc0400000 183fe94  kernel
 2    2 0xc1c41000 63e94    linux.ko
 3    3 0xc1ca5000 4bcfc    vboxdrv.ko
 4    1 0xc1cf1000 ee08     fuse.ko
 5    1 0xc8808000 8000     linprocfs.ko
 6    1 0xc810f000 3000     fdescfs.ko
 7    1 0xc8a18000 5000     ums.ko
 8    1 0xc8a24000 4000     uhid.ko
 9    2 0xc8a5a000 5000     vboxnetflt.ko
10    2 0xc887b000 d000     netgraph.ko
11    1 0xc8a6d000 4000     ng_ether.ko
12    1 0xc8a73000 6000     vboxnetadp.ko
root@hostfreebsd:/mnt/usb1 #
Note:
Code:
 /mnt/usb32
it's now
Code:
 /mnt/usb1
, because i think that it would be more clear. At least for me. Anyways, it doesn't matter because it fulfills the same function. It is only a change of name, because of ease of ubication and so.
 
Hello,

Have you checked the directory /mnt/usb32 with lsof? There may be a processes using it.

Also there is one other possibility - I've seen intel software RAID, or a gmirror/geom RAID, or even a Solaris Volume Manager metadata placed on a drive.

Then the drive becomes part of a RAID array and it cannot be mounted directly, you need to assemble the entire array and mount it on.
This is just a wild guess, but I had the same issue before. The solution would be full zeroing the entire drive and format it again.

Or if you can't delete it's data then you can look for kernel modules and devices popping under /dev different than daX as soon as the drive is plugged in.
Also you can check the dmesg for any events related.

Hope this helps : )

Yes, this was some helpful. Now if i do
Code:
 ls
after i unplug the USB, i saw that there were one disk that its name it's
Code:
 da1
Now i am more confused. But at least i know that this device *must be*
Code:
 da1
or
Code:
 da1s2
You know what it's the difference between both? I think that "s2" it's the "slice", or I'm wrong?
 
First, please try to condense your messages a bit. Instead of writing a few dozen limit it to two of three at most, because having to wade through all that is quite annoying and will severely reduce your chances of people staying interested to help out. Don't forget that there's an edit function ;)

You already noticed the dependency I assume, sometimes ports need others to build. In this case you also need sysutils/fusefs-libs. Options are explained in manual pages. So just check fuse-ext2(1) which should be sufficient (so: issue the command man fuse-ext2). As such it's either rw+, or rw,force. As always care needs to be taken.

Since kldstat didn't list the kernel module it is possible that this caused your initial problems. So you could also try to use # kldload ext2fs, then try to your first mount command again to see if that works.

Still, considering the errors you might want to verify that you're using the right slices. linux-data is pretty general, so it could be ext2 but for all we know it's also possible that ext3 is in effect. Might want to make sure: # file -s /dev/da1s2.
 
Probably a moderator should say this, but I will too. Please read this regarding forming your posts and stick to the topic.

https://forums.freebsd.org/forums/forum-rules-and-guidelines-required-reading.49/

And now back to the topic - when you plug your drive what do you see in dmesg?

And if you are using fuse-ext2 you must have the fuse module with kldload and then you must be able to see the module loaded with kldstat.

One other thing to say - if you can't install a package from ports and you are not willing to spend time with investigating you may always install the pre-compiled packages with pkg.
 
One other thing to say - if you can't install a package from ports and you are not willing to spend time with investigating you may always install the pre-compiled packages with pkg.
That's not the best of ideas. Do not "just" mix ports with binary packages because it's a sure way to cause severe problems over time. This might be a good read on that.
 
So?
Should i install packages with
Code:
 pkg
or not?
ShelLuser
So windows have a package manager, too? I haven't been realized in all the years that i have been using it. I just think it just it was "download-install".
 
ShelLuser
I think that it was in the first thread that i have posted.
Yes, it was.
There you had recommended me the handbook. But you don't said from where should i start reading it. So i must read from beginning to the end, or read the specific section that i need? Or both?
And about books, there are another books about this OS that are useful?
 
Another strange question: where it's taught about this?

For example: two years ago, i did a course about introduction to informatic. When i finished it, i did a course about Word, Excel, Powerpoint. Programs of windows.

But now, for a trouble with the horary of my school, i can't make the third level: it's about database Acces.

The point it's: where can i found more information about this or receive a teaching on this type of systems? In a university? I'm not meaning that the handbook and the books are useless. I just hope that you can understand what i mean.

The help that you and the others members and moderators gave to me is good. But there are so much things about which i don't have the remotely idea, honestly. Isn't hard when someone or something told you which command use. But if you know what commands you have to use, added to the help that other people with knowing gives to you, it is much less harder to solve your problems.
 
Back
Top