Bug 676404

Summary: Improve supportability by adding lvm command symlinks into rescue shell to avoid having to preface command with "lvm"
Product: Red Hat Enterprise Linux 6 Reporter: Dave Wysochanski <dwysocha>
Component: anacondaAssignee: Martin Gracik <mgracik>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team>
Severity: low Docs Contact:
Priority: medium    
Version: 6.0CC: ablum, atodorov, dmach, dwysocha, lvm-team, rwilliam
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-13.21.132-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 676405 (view as bug list) Environment:
Last Closed: 2011-12-06 10:30:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 676405, 705163    
Attachments:
Description Flags
lvm commands/links on an installed RHEL 6.2 latest nightly
none
lvm commands/links on an installed RHEL 6.2 latest nightly
none
lvm commands/links from RHEL 6.2 latest nightly rescue mode none

Description Dave Wysochanski 2011-02-09 18:31:39 UTC
When running in the rescue shell, the normal lvm command symlinks are not present as in a normal environment or even in the chrooted / filesystem environment.  Because of this, users recovering their systems by booting into the rescue shell have to type "lvm" to preface each command, for example, "lvm pvs" instead of just "pvs".  It should be a simple fix to add these symlinks into the rescue shell.

Note this is in the rescue environment's shell (rather than the chroot-ed / filesystem).  If you choose 'skip' on the options to mount linux filesystems then you will not be able to run pv/vg/lv commands without prefacing them with "lvm ".

Below are probably all the symlinks needed.  Note that this was taken from a booted RHEL6.0 system.  The only difference from a rescue environment I think should be the symlinks should be in /usr/sbin in the rescue shell.

# ls -l /sbin | grep lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvchange -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvconvert -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvcreate -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvdisplay -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvextend -> lvm
-r-xr-xr-x. 1 root root  794824 Dec  9 10:46 lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvmchange -> lvm
-r-xr-xr-x. 1 root root    6691 Dec  9 10:46 lvmconf
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvmdiskscan -> lvm
-r-xr-xr-x. 1 root root    5854 Dec  9 10:46 lvmdump
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvmsadc -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvmsar -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvreduce -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvremove -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvrename -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvresize -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvs -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 lvscan -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 pvchange -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 pvck -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 pvcreate -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 pvdisplay -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 pvmove -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 pvremove -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 pvresize -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 pvs -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 pvscan -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgcfgbackup -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgcfgrestore -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgchange -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgck -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgconvert -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgcreate -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgdisplay -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgexport -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgextend -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgimport -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgmerge -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgmknodes -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgreduce -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgremove -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgrename -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgs -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgscan -> lvm
lrwxrwxrwx. 1 root root       3 Jan  3 11:18 vgsplit -> lvm

Comment 1 Dave Wysochanski 2011-02-10 15:38:27 UTC
Note that this was an RFE from Andy Blum, which came up as I gave a presentation on LVM in RHEL6.  Discussion is here:
https://docspace.corp.redhat.com/docs/DOC-57450#comment-22876

Here is discussion from IRC yesterday:

13:26 < dwysocha_wfh> dlehman: ping
13:26 -!- You're now known as dwysocha
13:28 < dlehman> dwysocha: pong
13:28 < dwysocha> dlehman: got a question about the rescue shell, from "linux rescue" mode
13:29 < dwysocha> if I wanted to request something of the rescue env, which component would I file this under bz?
13:29 < dwysocha> is this anaconda?
13:30 < dlehman> yes
13:30 < dwysocha> it is specifically the rescue shell
13:30 < dwysocha> ok
13:31 < dlehman> the shell environment in rescue mode? like adding a utility or similar?
13:31 < dwysocha> oh, no, it is simple
13:31 < dwysocha> some of the support guys would like to avoid having to use "lvm" as a preface to an lvm command
13:31 < pjones> so you want the symlinks?
13:32 < dwysocha> so RFE is to add symlinks in the rescue env /usr/sbin
13:32 < dwysocha> yes
13:32 < dwysocha> pjones: does that seem reasonable to you?
13:32 < pjones> yeah
13:32 < dwysocha> ok, will file the RFE
13:32 < dlehman> dwysocha: for rawhide that would be lorax. for all other products it will be anaconda. (I think)
13:33 < dwysocha> dlehman: ok, will file for both, thx
13:34 < dlehman> np

Comment 5 Alexander Todorov 2011-08-18 14:51:05 UTC
Created attachment 518886 [details]
lvm commands/links on an installed RHEL 6.2 latest nightly

This is the output of
# ls -l /sbin/ | grep lvm 

which shows 45 items.

Comment 6 Alexander Todorov 2011-08-18 14:51:56 UTC
Created attachment 518887 [details]
lvm commands/links on an installed RHEL 6.2 latest nightly

upload the correct file

Comment 7 Alexander Todorov 2011-08-18 14:53:51 UTC
Created attachment 518888 [details]
lvm commands/links from RHEL 6.2 latest nightly rescue mode

This list is from 
# ls -l /usr/sbin | grep lvm

in rescue mode where I selected to Skip searching for existing disks. The list contains 7 items. Way less than the previous list.

Comment 8 Alexander Todorov 2011-08-18 14:54:45 UTC
Above is with anaconda-13.21.130 and clearly the links are not there. Moving back to ASSIGNED.

Comment 10 Alexander Todorov 2011-08-25 14:48:11 UTC
Fixed in anaconda-13.21.136, all 45 symlinks/files are there.

Comment 11 errata-xmlrpc 2011-12-06 10:30:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1565.html