# xfs/mount problem "not permitted"



## demo (Nov 30, 2010)

Hello.

I have been trying to hook up an external drive that has an xfs file-system under FreeBSD 8.1. I read there is "working" read-only support for xfs and thought i mount copy over my music, so far i have had no luck mounting the drive.

After some reading i realized i might need sysutils/xfsprogs, however after installing the port i get the same problem _"Operation not permitted"_ as below:


`# file - < /dev/da1s1`

```
/dev/stdin: SGI XFS filesystem data (blksz 4096, inosz 256, v2 dirs)
```

`# kldstat | grep xfs` 

```
67    1 0xffffffff819cc000 5d91c    xfs.ko
```

`# mount -t xfs /dev/da1s1 /mnt/xfs/`

```
mount: /dev/da1s1 : Operation not permitted
```

`# uname -a`

```
FreeBSD  8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010     
root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
```


Thanks in advance for any help.


----------



## rabfulton (Nov 30, 2010)

If I remember correctly you must mount it as read only by specifying -ro.


----------



## dkburrows (Jan 21, 2011)

*Happens to me too*

I've had this same problem, except I'm trying it with an external usb drive off an i686 netbook. Adding '-r' or '-o ro' still result in operation not permitted. I've wondering if it's a bug and if 8.2 will fix it, or if maybe the code is unmaintained and succumbing to age.

The man page mentioned adding 'option xfs' to the kernel file before recompiling. I took this to be how you'd compile it into the kernel instead of as a module, but I'm wondering if there's something you need to add to the kernel to make xfs.ko work.


----------



## Lexx (Feb 14, 2011)

I'm having the exact same problem. I set up a disk with an xfs partition on Arch Linux, and now I can't mount it under FreeBSD. I have xfsprogs installed and the module loaded in the kernel. This is with FreeBSD 8.1. Even when mounting with -ro option, I get the same message. It looks like the only solution right now is to mount the drive in a Linux environment and copy the information to the new drives I have formatted under FreeBSD.


----------



## rabfulton (Feb 15, 2011)

I've had this working on FreeBSD 8.0 before. I came to FreeBSD from debian and was using xfs there.

Check that the filesystem (XFS) is clean "xfs_repair, xfs_check"
Check that that the xfs kernel module is loaded
Check you are root
Check that the mount directory exists with good permissions
Check that you are specifying the correct partition

Hope the solution is as simple as one of the above... I do remember getting "Operation not permitted" until I got everything just right.


----------

