You are not logged in.

#1 2016-04-30 22:40:09

JoKoT3
Member
Registered: 2013-04-23
Posts: 3

zfs mount gives EPERM

Hi,

I'm facing an issue with zfs, I'm unable to mount one filesystem and I don't get why.
I'm using the following version :
zfs-linux 0.6.5.6_4.5.1_1-5 (and dependencies) from archzfs-linux repository
linux 4.5.1-1

I have one pool :

NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
tank  6.34T  4.04T  2.30T         -     3%    63%  1.00x  ONLINE  -

that is online and healthy :

  pool: tank
 state: ONLINE
  scan: scrub repaired 0 in 35h47m with 0 errors on Tue Apr 26 12:24:15 2016
config:

        NAME                                                STATE     READ WRITE CKSUM
        tank                                                ONLINE       0     0     0
          raidz1-0                                          ONLINE       0     0     0
            ata-SAMSUNG_HD204UI_S2H7J90B615388-part1        ONLINE       0     0     0
            ata-WDC_WD20EZRX-00DC0B0_WD-WMC301615003-part1  ONLINE       0     0     0
            ata-WDC_WD20EZRX-00DC0B0_WD-WMC1T3122977-part1  ONLINE       0     0     0
            ata-ST1000DM005_HD103SJ_S246JX0CB01166-part1    ONLINE       0     0     0
          raidz1-1                                          ONLINE       0     0     0
            ata-SAMSUNG_HD204UI_S2H7J90B615388-part2        ONLINE       0     0     0
            ata-WDC_WD20EZRX-00DC0B0_WD-WMC301615003-part2  ONLINE       0     0     0
            ata-WDC_WD20EZRX-00DC0B0_WD-WMC1T3122977-part2  ONLINE       0     0     0

errors: No known data errors

In this pool there is 2 filesystems :

NAME         USED  AVAIL  REFER  MOUNTPOINT
tank        2.83T  1.47T   145K  /tank
tank/media  2.83T  1.47T  2.83T  /tank/media

but only tank is mounted. I can't mount the second one "tank/media".
the mount command gives :

# zfs mount tank/media
filesystem 'tank/media' can not be mounted due to error 1
cannot mount 'tank/media': Invalid argument

I straced the command and it show an EPERM error on the mount command

[pid  3548] mount("tank/media", "/tank/media", "zfs", MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_MANDLOCK|MS_NOATIME, "rw,noatime,nodev,noexec,nosuid,m"...) = -1 EPERM (Operation not permitted)

The issue appeared very recently, but I don't recall a particular change that could cause such issue.

I tried the following :
- make sure "canmount" was "on" on the filesystem
- unmount / mount all zfs filesystems (zfs umount -a ; zfs mount -a)
- regenerate zpool.cache (zpool set cachefile=/etc/zfs/zpool.cache tank)
- reboot.
- try both zfs-linux and zfs-linux-git packages
- make sure no process were using /tank/media (lsof | grep media), and disabled any service that may use this directory (kodi and deluged)

the filesystems configuration :

# zfs get all
NAME        PROPERTY              VALUE                  SOURCE
tank        type                  filesystem             -
tank        creation              Sat Jul 13 20:19 2013  -
tank        used                  2.83T                  -
tank        available             1.47T                  -
tank        referenced            145K                   -
tank        compressratio         1.00x                  -
tank        mounted               yes                    -
tank        quota                 none                   default
tank        reservation           none                   default
tank        recordsize            128K                   default
tank        mountpoint            /tank                  default
tank        sharenfs              off                    local
tank        checksum              on                     default
tank        compression           off                    default
tank        atime                 on                     default
tank        devices               on                     default
tank        exec                  on                     default
tank        setuid                on                     default
tank        readonly              off                    default
tank        zoned                 off                    default
tank        snapdir               hidden                 default
tank        aclinherit            restricted             default
tank        canmount              on                     default
tank        xattr                 on                     default
tank        copies                1                      default
tank        version               5                      -
tank        utf8only              off                    -
tank        normalization         none                   -
tank        casesensitivity       sensitive              -
tank        vscan                 off                    default
tank        nbmand                off                    default
tank        sharesmb              off                    default
tank        refquota              none                   default
tank        refreservation        none                   default
tank        primarycache          all                    default
tank        secondarycache        all                    default
tank        usedbysnapshots       0                      -
tank        usedbydataset         145K                   -
tank        usedbychildren        2.83T                  -
tank        usedbyrefreservation  0                      -
tank        logbias               latency                default
tank        dedup                 off                    default
tank        mlslabel              none                   default
tank        sync                  standard               default
tank        refcompressratio      1.00x                  -
tank        written               145K                   -
tank        logicalused           2.85T                  -
tank        logicalreferenced     35K                    -
tank        filesystem_limit      none                   default
tank        snapshot_limit        none                   default
tank        filesystem_count      none                   default
tank        snapshot_count        none                   default
tank        snapdev               hidden                 default
tank        acltype               off                    default
tank        context               none                   default
tank        fscontext             none                   default
tank        defcontext            none                   default
tank        rootcontext           none                   default
tank        relatime              on                     temporary
tank        redundant_metadata    all                    default
tank        overlay               off                    default
tank/media  type                  filesystem             -
tank/media  creation              Sun Jul 14  5:44 2013  -
tank/media  used                  2.83T                  -
tank/media  available             1.47T                  -
tank/media  referenced            2.83T                  -
tank/media  compressratio         1.00x                  -
tank/media  mounted               no                     -
tank/media  quota                 none                   default
tank/media  reservation           none                   default
tank/media  recordsize            128K                   default
tank/media  mountpoint            /tank/media            default
tank/media  sharenfs              off                    local
tank/media  checksum              on                     default
tank/media  compression           lzjb                   local
tank/media  atime                 off                    local
tank/media  devices               off                    local
tank/media  exec                  off                    local
tank/media  setuid                off                    local
tank/media  readonly              off                    default
tank/media  zoned                 off                    default
tank/media  snapdir               hidden                 default
tank/media  aclinherit            restricted             default
tank/media  canmount              on                     local
tank/media  xattr                 on                     default
tank/media  copies                1                      default
tank/media  version               5                      -
tank/media  utf8only              off                    -
tank/media  normalization         none                   -
tank/media  casesensitivity       mixed                  -
tank/media  vscan                 off                    default
tank/media  nbmand                on                     local
tank/media  sharesmb              on                     local
tank/media  refquota              none                   default
tank/media  refreservation        none                   default
tank/media  primarycache          all                    default
tank/media  secondarycache        all                    default
tank/media  usedbysnapshots       0                      -
tank/media  usedbydataset         2.83T                  -
tank/media  usedbychildren        0                      -
tank/media  usedbyrefreservation  0                      -
tank/media  logbias               latency                default
tank/media  dedup                 off                    default
tank/media  mlslabel              none                   default
tank/media  sync                  standard               default
tank/media  refcompressratio      1.00x                  -
tank/media  written               2.83T                  -
tank/media  logicalused           2.85T                  -
tank/media  logicalreferenced     2.85T                  -
tank/media  filesystem_limit      none                   default
tank/media  snapshot_limit        none                   default
tank/media  filesystem_count      none                   default
tank/media  snapshot_count        none                   default
tank/media  snapdev               hidden                 default
tank/media  acltype               off                    default
tank/media  context               none                   default
tank/media  fscontext             none                   default
tank/media  defcontext            none                   default
tank/media  rootcontext           none                   default
tank/media  relatime              off                    default
tank/media  redundant_metadata    all                    default
tank/media  overlay               off                    default

I don't get where this EPERM come from.

Regards,
John

Offline

#2 2016-05-03 03:38:52

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: zfs mount gives EPERM

You shouldn't have to mount your dataset tank/media, it should be automatically available when your pool tank is mounted. I just switched over from Ubuntu to Arch for my server (should have gone with Arch in the first place but I never actually knew about the stable kernel until recently), and it was pretty painless. I just had to install the kernel modules and then load them and boom my pools were mounted in the same place that they were under Ubuntu (/mnt).

for example, here's my safekeeping pool

 [root@nas ~]# zfs list
NAME                         USED  AVAIL  REFER  MOUNTPOINT
safekeeping                  635G   264G    96K  /mnt/safekeeping
safekeeping/backups         5.87G   264G  5.87G  /mnt/safekeeping/backups
safekeeping/misc             629G   264G   629G  /mnt/safekeeping/misc

when you do a ls /tank|grep media it doesn't show anything?

Have you tried scrubbing your pool?

Last edited by brando56894 (2016-05-03 03:39:30)

Offline

#3 2016-05-04 17:36:49

fuzzy2
Member
Registered: 2016-04-16
Posts: 7

Re: zfs mount gives EPERM

brando56894 wrote:

You shouldn't have to mount your dataset tank/media, it should be automatically available when your pool tank is mounted.

He did (although subtly) mention that this isn’t the case on his machine.

It is also visible in the zpool status output that be scrubbed recently.


@OP: Do you have any mount options set in /etc/fstab?

Offline

Board footer

Powered by FluxBB