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

Saving LVM layout on VBOX oracle linux VM fails #611

Closed
ibnabbas opened this issue Jul 6, 2015 · 5 comments
Closed

Saving LVM layout on VBOX oracle linux VM fails #611

ibnabbas opened this issue Jul 6, 2015 · 5 comments
Assignees

Comments

@ibnabbas
Copy link

ibnabbas commented Jul 6, 2015

Saving LVM layout on VBOX oracle linux VM fails. Below is the error as shown in rear.log

2015-07-06 15:21:47 Including layout/save/GNU/Linux/21_raid_layout.sh
2015-07-06 15:21:47 Including layout/save/GNU/Linux/22_lvm_layout.sh
2015-07-06 15:21:47 Saving LVM layout.
  stdin: fdopen failed: Invalid argument
  stdin: fclose failed: Invalid argument
  stdin: fdopen failed: Invalid argument
  stdin: fdopen failed: Invalid argument
  stdin: fclose failed: Invalid argument
  stdin: fdopen failed: Invalid argument
  stdin: fdopen failed: Invalid argument
  stdin: fclose failed: Invalid argument
  stdin: fdopen failed: Invalid argument
2015-07-06 15:21:47 Including layout/save/GNU/Linux/23_filesystem_layout.sh
2015-07-06 15:21:47 Begin saving filesystem layout
2015-07-06 15:21:47 Saving filesystem layout (using the findmnt command).

My rear version is rear-1.17.0-1.el6.noarch

lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: OracleServer
Description:    Oracle Linux Server release 6.4
Release:        6.4
Codename:       n/a

Recovery was failing and the disklayout.conf did not have any directives to create LVs on the new disk.

@gdha gdha self-assigned this Jul 6, 2015
@gdha
Copy link
Member

gdha commented Jul 6, 2015

could you run rear -vD savelayout and check the rear.log around the location where the errors happened. We should know which command was executing.

@ibnabbas
Copy link
Author

ibnabbas commented Jul 6, 2015

This is from the debug I ran some time back:

++ echo '2015-07-06 17:25:46 Saving LVM layout.'
2015-07-06 17:25:46 Saving LVM layout.
++ lvm pvdisplay -c
++ read line
  stdin: fdopen failed: Invalid argument
  stdin: fclose failed: Invalid argument
  stdin: fdopen failed: Invalid argument

When I run the above command manually it works fine for me:

lvm pvdisplay -c
  /dev/sdb:vg_oracle:125829120:-1:8:8:-1:4096:15359:0:15359:6VAxOe-m7NM-w8eS-5NDH-FaqS-dqoF-RLsc4z
  /dev/sdc:vg_oracle:125829120:-1:8:8:-1:4096:15359:0:15359:dB2cEo-fcmh-rfa8-a6mV-gpHQ-Kvqr-9IGiPB
  /dev/sdd:vg_oracle:122880000:-1:8:8:-1:4096:14999:10358:4641:YHT3Wx-VCsw-vfNR-W9Rs-K4ZH-Zvf2-yA8yg4
  /dev/sda2:vg_system:61888512:-1:8:8:-1:4096:7554:0:7554:HJRHnt-YQLC-pK5Z-Er7F-GU41-CNNW-H5M9TU

@ibnabbas
Copy link
Author

ibnabbas commented Jul 6, 2015

Interestingly, when I run just the savelayout, there is no error

[root layout]# rear -vD savelayout
Relax-and-Recover 1.17.0 / Git
Using log file: /var/log/rear/rear-dev.log
Creating disk layout
Excluding Volume Group vg_oracle
Excluding component fs:/u01/product
Excluding component fs:/u01/admin
[root layout]#

++ echo '2015-07-06 17:41:57 Saving LVM layout.'
2015-07-06 17:41:57 Saving LVM layout.
++ lvm pvdisplay -c
++ read line
+++ echo /dev/sdb:vg_oracle:125829120:-1:8:8:-1:4096:15359:0:15359:6VAxOe-m7NM-w
8eS-5NDH-FaqS-dqoF-RLsc4z
+++ cut -d : -f 1
++ pdev=/dev/sdb
++ '[' dev/sdb = /dev/sdb ']'

I can see directives for PV and VG creation in the disktodo.conf. Previously there were no LVM related indicators in this file.

[root layout]# more /var/lib/rear/layout/disktodo.conf |grep todo
todo /dev/sda disk
todo /dev/sda1 part
todo /dev/sda2 part
todo pv:/dev/sda2 lvmdev
todo /dev/vg_system lvmgrp
todo /dev/mapper/vg_system-lv_root lvmvol
todo /dev/mapper/vg_system-lv_swap lvmvol
todo fs:/ fs
todo fs:/boot fs
todo swap:/dev/mapper/vg_system-lv_swap swap

@gdha
Copy link
Member

gdha commented Jul 9, 2015

@ibnabbas
Copy link
Author

Thanks for pointing out the bug in lvm. Looks like it only affects nohup commands. So switched to screen for workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants