LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   LVM commands not found (http://www.linuxquestions.org/questions/linux-software-2/lvm-commands-not-found-743062/)

fizeelinux 07-27-2009 07:21 AM

LVM commands not found
 
Hi all,

I am trying to work around LVM commands in CENTOS 5.3.But when i type pvdisplay vgdisplay or pvdisplay none of the commands are working.i installed lvm2 package also but still no result in favour.i also installed gui utility.Typing system-config-lvm goes to a window which displays my harddisk partition but i am not able to do anything.Have i missed anything.Does lvm requires any package.Please help me on this.Thanks in advance

zQUEz 07-27-2009 07:38 AM

This may be a silly question, but are you trying to run the lvm commands as root?
If not, you need to.

colucix 07-27-2009 07:39 AM

You need root privileges to run lvm commands. Regarding the lvm dependencies, if you have installed it through yum, it should have taken care of them automatically. Anyway, here is a list from my CentOS box:
Code:

# yum deplist lvm2 | grep provider | sort -u
  provider: bash.i386 3.2-24.el5
  provider: device-mapper-event.i386 1.02.28-2.el5
  provider: device-mapper.i386 1.02.28-2.el5
  provider: glibc.i386 2.5-34
  provider: glibc.i686 2.5-34
  provider: libselinux.i386 1.33.4-5.1.el5
  provider: libsepol.i386 1.15.2-1.el5
  provider: lvm2.i386 2.02.40-6.el5
  provider: ncurses.i386 5.5-24.20060715
  provider: readline.i386 5.1-1.1


fizeelinux 07-27-2009 11:18 PM

Quote:

Originally Posted by colucix (Post 3621588)
You need root privileges to run lvm commands. Regarding the lvm dependencies, if you have installed it through yum, it should have taken care of them automatically. Anyway, here is a list from my CentOS box:
Code:

# yum deplist lvm2 | grep provider | sort -u
  provider: bash.i386 3.2-24.el5
  provider: device-mapper-event.i386 1.02.28-2.el5
  provider: device-mapper.i386 1.02.28-2.el5
  provider: glibc.i386 2.5-34
  provider: glibc.i686 2.5-34
  provider: libselinux.i386 1.33.4-5.1.el5
  provider: libsepol.i386 1.15.2-1.el5
  provider: lvm2.i386 2.02.40-6.el5
  provider: ncurses.i386 5.5-24.20060715
  provider: readline.i386 5.1-1.1



Thanks for the reply

I run the command what you have specified and the result is the same

[root@bugs guest]# yum deplist lvm2 | grep provider | sort -u
provider: bash.i386 3.2-24.el5
provider: device-mapper-event.i386 1.02.28-2.el5
provider: device-mapper.i386 1.02.28-2.el5
provider: glibc.i386 2.5-34
provider: glibc.i686 2.5-34
provider: libselinux.i386 1.33.4-5.1.el5
provider: libsepol.i386 1.15.2-1.el5
provider: lvm2.i386 2.02.40-6.el5
provider: ncurses.i386 5.5-24.20060715
provider: readline.i386 5.1-1.1

[root@bugs guest]# which pvdisplay
/usr/bin/which: no pvdisplay in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/guest/bin)

[root@bugs guest]# which lvdisplay
/usr/bin/which: no lvdisplay in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/guest/bin)

[root@bugs guest]# pvdisplay
bash: pvdisplay: command not found

I am trying as root only.Any ideas.

tequilatram 07-28-2009 12:03 AM

I don't see /sbin in your search path.
I think that is where you will find the LVM utilities ...

-Tram

colucix 07-28-2009 01:37 AM

Quote:

Originally Posted by fizeelinux (Post 3622462)
/usr/bin/which: no pvdisplay in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/guest/bin)

This is not the root's PATH. Have you used
Code:

su -
to login as root? If you omit the - sign, the environment of the current user is preserved.

Edit: Sorry for redundancy, I didn't see the post from tequilatram!

fizeelinux 07-28-2009 04:00 AM

Quote:

Originally Posted by colucix (Post 3622579)
This is not the root's PATH. Have you used
Code:

su -
to login as root? If you omit the - sign, the environment of the current user is preserved.

Edit: Sorry for redundancy, I didn't see the post from tequilatram!

Problem got solved..Thank you very much.Problem is i typed su instead of su -....Thanks a lot

fizeelinux 07-28-2009 04:01 AM

Quote:

Originally Posted by tequilatram (Post 3622500)
I don't see /sbin in your search path.
I think that is where you will find the LVM utilities ...

-Tram

Thanks for the reply .


All times are GMT -5. The time now is 11:25 AM.