Error "stdin: fdopen failed: Invalid argument" while running lvreate, lvremove or lvs in a script run using nohup or scheduled in crontab

Bug #1737965 reported by Sistemas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart (Ubuntu)
New
Undecided
Unassigned

Bug Description

Error "stdin: fdopen failed: Invalid argument" while running lvreate, lvremove or lvs in a script run using nohup or scheduled in crontab

When running "/sbin/lvcreate -L10000M -s -n ZimbraBackup /dev/vg_opt-zimbra/lv_opt-zimbra", lvcreate returns these errors:
  stdin: fdopen failed: Invalid argument
  stdin: fclose failed: Invalid argument
  stdin: fdopen failed: Invalid argument

When running "/sbin/lvremove --force /dev/vg_opt-zimbra/ZimbraBackup", lvremove returns these errors:
  stdin: fdopen failed: Invalid argument
  stdin: fclose failed: Invalid argument
  stdin: fdopen failed: Invalid argument

Ubuntu versión is:
#lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty

Version of lvm package is:
# dpkg -l | grep lvm
ii lvm2 2.02.98-6ubuntu2 amd64 Linux Logical Volume Manager

In Ubuntu 16 it works fine, but in Ubuntu 14 it doesn't.

Is it a bug?

Revision history for this message
Sistemas (genos) wrote :

It seems a bug of LVM for Ubuntu 14.

We found the solution thanks to this post:
https://github.com/saltstack/salt/pull/9227

We run the script redirecting "/dev/null" to stdin for the script and now it works:
nohup ./backup_zimbra_lvm.sh </dev/null &

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.