Skip to content

Update 'losetup' parsing and fix ZFS mount options#1052

Merged
cgalibern merged 3 commits into
opensvc:mainfrom
cgalibern:dev
Jun 24, 2026
Merged

Update 'losetup' parsing and fix ZFS mount options#1052
cgalibern merged 3 commits into
opensvc:mainfrom
cgalibern:dev

Conversation

@cgalibern

Copy link
Copy Markdown
Contributor

Summary of Changes

  • Updated the losetup command to replace -J with -O NAME,BACK-FILE for improved compatibility with older RHEL versions.
  • Refactored the parsing logic by removing json.Unmarshal and implementing a manual parsing approach.
  • Simplified InfoEntry structure and changed field types to any to handle mixed value formats.
  • Fixed mountLegacy options for ZFS mounts, correcting option syntax to properly separate values.

    bin/mount -t zfs -o rw relatime xattr posixacl tank
    instead of
    bin/mount -t zfs -o rw,relatime,xattr,posixacl tank
…parsing logic

- Switched `losetup` command options to `-O NAME,BACK-FILE` for compatibility with older RHEL versions.
- Removed `json.Unmarshal` usage in favor of parsing command output manually.
- Simplified `InfoEntry` fields and associated logic for clarity and correctness.
@cgalibern cgalibern closed this Jun 24, 2026
@cgalibern cgalibern reopened this Jun 24, 2026
@cgalibern cgalibern merged commit fbaeeec into opensvc:main Jun 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant