-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
vdev_id.conf slot mapping fails on Debian 7 #2965
Comments
This belong to https://github.com/zfsonlinux/pkg-zfs, where the Debian GNU/Linux packages are managed and not here, which deals with the core software ZFS On Linux. |
Thanks, I wasn't aware. I'll reopen there if necessary. |
ghost
closed this as completed
Dec 17, 2014
ghost
mentioned this issue
Dec 17, 2014
nedbass
added a commit
to nedbass/zfs
that referenced
this issue
Dec 17, 2014
Slot mapping in vdev_id doesn't work on systems using mawk as the 'awk' alternative. A regular expression in map_slot() contains an unquoted empty string following the alternation (|) operator, which results in an "missing operand" error with mawk. The solution is to quote the empty string. Issue zfsonlinux/pkg-zfs#136 Issue openzfs#2965 Signed-off-by: Ned Bass <bass6@llnl.gov>
nedbass
added a commit
to nedbass/zfs
that referenced
this issue
Dec 17, 2014
Slot mapping in vdev_id doesn't work on systems using mawk as the 'awk' alternative. A regular expression in map_slot() contains an unquoted empty string following the alternation (|) operator, which results in an "missing operand" error with mawk. The solution is to rearrange the expression so the alternation has two operands. Issue zfsonlinux/pkg-zfs#136 Issue openzfs#2965 Signed-off-by: Ned Bass <bass6@llnl.gov>
nedbass
added a commit
to nedbass/zfs
that referenced
this issue
Dec 17, 2014
Slot mapping in vdev_id doesn't work on systems using mawk as the 'awk' alternative. A regular expression in map_slot() contains an unquoted empty string following the alternation (|) operator, which results in an "missing operand" error with mawk. The solution is to rearrange the expression so the alternation has two operands. Issue zfsonlinux/pkg-zfs#136 Issue openzfs#2965 Signed-off-by: Ned Bass <bass6@llnl.gov>
behlendorf
pushed a commit
to behlendorf/zfs
that referenced
this issue
Dec 19, 2014
Slot mapping in vdev_id doesn't work on systems using mawk as the 'awk' alternative. A regular expression in map_slot() contains an unquoted empty string following the alternation (|) operator, which results in an "missing operand" error with mawk. The solution is to rearrange the expression so the alternation has two operands. Signed-off-by: Ned Bass <bass6@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes zfsonlinux/pkg-zfs#136 Closes openzfs#2965
dajhorn
added a commit
to zfsonlinux/pkg-zfs
that referenced
this issue
Dec 20, 2014
Commit: openzfs/zfs@2d9d57b From: Ned Bass <bass6@llnl.gov> Date: Wed, 17 Dec 2014 11:01:42 -0800 Subject: vdev_id: use mawk-compatible regular expression Slot mapping in vdev_id doesn't work on systems using mawk as the 'awk' alternative. A regular expression in map_slot() contains an unquoted empty string following the alternation (|) operator, which results in an "missing operand" error with mawk. The solution is to rearrange the expression so the alternation has two operands. Signed-off-by: Ned Bass <bass6@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #136 Closes openzfs/zfs#2965
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After a ZFS upgrade on a Debian 7 server, my JBOD slot mappings defined in /etc/zfs/vdev_id.conf were broken. When I ran the vdev_id script manually on a device, I got the following:
The device should actually be mapped to A10 (linux slot 9 mapped to A10), but the awk error prevents the mapping and so the bay_identifier value is used instead. I have an older ZFS version installed on CentOS, and I copied it to this same Debian server, and that scripted worked fine. It appears the change for issue #2056 introduced this problem (specifically this diff: nedbass@533d96a#diff-081bd452e1418e3d0dfab42b86a44142L115). I did a bit more investigation and noticed that the versions of awk are different between Debian and CentOS, the former being "mawk" while the latter is "gawk". Apparently the new syntax is not portable between them. After I installed gawk on the Debian server, the error is gone and my mappings are correct again:
I would have suggested adding a gawk dependency to the Debian package, but not sure that will fly. I have found some similar issues that avoided doing so: #76 (gawk dependency was removed) and #259 (awk usage was replaced)
The text was updated successfully, but these errors were encountered: