Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZFS Breaks Install Scripts with Permission Error (Root on EXT4) #13113

Closed
Beeblebrox-BSD opened this issue Feb 17, 2022 · 7 comments
Closed

ZFS Breaks Install Scripts with Permission Error (Root on EXT4) #13113

Beeblebrox-BSD opened this issue Feb 17, 2022 · 7 comments
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@Beeblebrox-BSD
Copy link

System information

Distribution Name | Debian
Distribution Version | Buster
Kernel Version | 4.19.0-18
Architecture | amd64
OpenZFS Version | 2.0.3-9~bpo10+1

Command to find OpenZFS version:
zpool -V

Commands to find kernel version:
uname -r # Linux

Describe the problem you're observing

HARDWARE: On-Premise AMD Athlon-II X3 460, 4 GB RAM + 4GB swap, SATA-II motherboard, SATA3 60 GB SSD as ext4 on (/), SATA3 1 TB HDD as ZFS. I/O speed is limited to 3 GBs due to motherboard.

(/) resides on ext4 SSD while ZFS mounts to /home and Zpool is ashift=12

I install (Debian Buster based) Yunohost on the SSD, then mount ZFS. I then begin installing Apps from YNH and they fail mostly with permission problems (ie not allowed). If I do a clean install and do not mount the ZFS dataset, Apps installations complete normally.

Describe how to reproduce the problem

Install Apps w/o ZFS mounted vs install Apps with ZFS mounted

Include any warning/errors/backtraces from the system logs

I don't have these

Could the error be due to aclmode/aclinherit? The ZFS dataset properties (redacted):

quota                 none                   default
reservation           none                   default
recordsize            128K                   default
mountpoint            /home                  local
sharenfs              off                    default
checksum              on                     default
compression           lz4                    inherited from tank0
atime                 on                     default
devices               on                     default
exec                  on                     default
setuid                on                     default
readonly              off                    default
zoned                 off                    default
snapdir               hidden                 default
aclmode               discard                default
aclinherit            restricted             default
xattr                 on                     default
version               5                      -
utf8only              off                    -
normalization         none                   -
casesensitivity       sensitive              -
vscan                 off                    default
nbmand                off                    default
sharesmb              off                    default
refquota              none                   default
refreservation        none                   default
refcompressratio      1.49x                  -
acltype               off                    default
context               none                   default
fscontext             none                   default
defcontext            none                   default
rootcontext           none                   default
relatime              off                    default
redundant_metadata    all                    default
overlay               on                     default
encryption            off                    default```
@Beeblebrox-BSD Beeblebrox-BSD added the Type: Defect Incorrect behavior (e.g. crash, hang) label Feb 17, 2022
@Beeblebrox-BSD
Copy link
Author

I made a mistake - should have posted the issue on zfsonlinux . Please close/delete if wrong repo.

@szubersk
Copy link
Contributor

szubersk commented Feb 17, 2022

@Beeblebrox-BSD this is a right group, thanks for reporting the bug.

Would you mind sharing the output of

zfs get all -s local -r poolname

?

Most likely you want to set acltype property to posix and xattr to sa for Linux storage.

@Beeblebrox-BSD
Copy link
Author

Currently the pool is in exported state, not using until this problem is sorted out.

# zfs get all -s local -r tank0

NAME           PROPERTY              VALUE                  SOURCE
tank0          compression           lz4                    local
tank0          canmount              off                    local
tank0/home     mountpoint            /home                  local

# zpool get all tank0

NAME   PROPERTY                       VALUE                          SOURCE
tank0  size                           928G                           -
tank0  capacity                       0%                             -
tank0  altroot                        -                              default
tank0  health                         ONLINE                         -
tank0  version                        -                              default
tank0  bootfs                         -                              default
tank0  delegation                     on                             default
tank0  autoreplace                    off                            default
tank0  cachefile                      -                              default
tank0  failmode                       wait                           default
tank0  listsnapshots                  off                            default
tank0  autoexpand                     off                            default
tank0  dedupratio                     1.00x                          -
tank0  free                           928G                           -
tank0  allocated                      50.7M                          -
tank0  readonly                       off                            -
tank0  ashift                         12                             local
tank0  comment                        -                              default
tank0  expandsize                     -                              -
tank0  freeing                        0                              -
tank0  fragmentation                  0%                             -
tank0  leaked                         0                              -
tank0  multihost                      off                            default
tank0  checkpoint                     -                              -
tank0  autotrim                       on                             local
tank0  feature@async_destroy          enabled                        local
tank0  feature@empty_bpobj            active                         local
tank0  feature@lz4_compress           active                         local
tank0  feature@multi_vdev_crash_dump  enabled                        local
tank0  feature@spacemap_histogram     active                         local
tank0  feature@enabled_txg            active                         local
tank0  feature@hole_birth             active                         local
tank0  feature@extensible_dataset     active                         local
tank0  feature@embedded_data          active                         local
tank0  feature@bookmarks              enabled                        local
tank0  feature@filesystem_limits      enabled                        local
tank0  feature@large_blocks           enabled                        local
tank0  feature@large_dnode            enabled                        local
tank0  feature@sha512                 enabled                        local
tank0  feature@skein                  enabled                        local
tank0  feature@edonr                  enabled                        local
tank0  feature@userobj_accounting     active                         local
tank0  feature@encryption             enabled                        local
tank0  feature@project_quota          active                         local
tank0  feature@device_removal         enabled                        local
tank0  feature@obsolete_counts        enabled                        local
tank0  feature@zpool_checkpoint       enabled                        local
tank0  feature@spacemap_v2            active                         local
tank0  feature@allocation_classes     enabled                        local
tank0  feature@resilver_defer         enabled                        local
tank0  feature@bookmark_v2            enabled                        local
tank0  feature@redaction_bookmarks    enabled                        local
tank0  feature@redacted_datasets      enabled                        local
tank0  feature@bookmark_written       enabled                        local
tank0  feature@log_spacemap           active                         local
tank0  feature@livelist               enabled                        local
tank0  feature@device_rebuild         enabled                        local
tank0  feature@zstd_compress          enabled                        local

@Beeblebrox-BSD
Copy link
Author

Most likely you want to set acltype property to posix and xattr to sa for Linux storage.

Any ideas on how to test whether this works (other than going through a complete install cycle)?

@szubersk
Copy link
Contributor

szubersk commented Feb 17, 2022

Honestly not. You could try reproducing the problem by using setfacl/getfacl command and see if changing attributes solves the problem.

@Beeblebrox-BSD
Copy link
Author

  • I tarred the existing pristine /home, deleted the contents, then mounted the empty zfs dataset, then pushed the pristine home.tar onto zfs.
  • I then removed the problematic app (Nextcloud) and re-installed it. Went fine, no problems.

Although I can't be 100% certain, the settings you advised seem to have solved the problem.
Thanks for your help.

@szubersk
Copy link
Contributor

@Beeblebrox-BSD I'm glad we could help! If you hit ZFS problem feel free to check the documentation at https://openzfs.github.io/, then Issues history here, if it doesn't help create a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

2 participants