您的位置:首页 > 其它

系统最小化安装后,使用命令时提示“command not found”

2012-09-28 15:08 507 查看
虚拟机新加块硬盘,分区时,提示 " command not found".

直接yum也无法安装... ...

[root@Cacti ~]# fdisk -l

Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a1889

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          66      524288   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              66         588     4194304   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3             588       13055   100137984   83  Linux

Disk /dev/sdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table
[root@Cacti ~]# pvcreate /dev/sdb
-bash: pvcreate: command not found
You have new mail in /var/spool/mail/root
[root@Cacti ~]# pvdisplay
-bash: pvdisplay: command not found
[root@Cacti ~]# yum install pvdisplay
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Setting up Install Process
No package pvdisplay available.

很郁闷吧,本来就菜,想办法吧!于是登录到一台完整安装的系统上。

[root@localhost localhost]# pvdispaly
-bash: pvdispaly: command not found
[root@localhost localhost]# pvcreate
Please enter a physical volume path
Run `pvcreate --help' for more information.
[root@localhost localhost]# which pvcreate
/sbin/pvcreate
[root@localhost localhost]# rpm -qf /sbin/pvcreate
lvm2-2.02.72-8.el6_0.4.x86_64

找到了,就是这个了,lvm2

[root@Cacti ~]# yum install lvm2-2.02.72-8.el6_0.4.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Setting up Install Process
No package lvm2-2.02.72-8.el6_0.4.x86_64 available.
Error: Nothing to do
[root@Cacti ~]# yum install lvm2
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Setting up Install Process
Resolving Dependencies
......................................                                                                                                                                                       576 kB/s | 1.8 MB     00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libudev-147-2.42.el6.x86_64                                                                                                                                             1/7
Installing : device-mapper-libs-1.02.74-10.el6.x86_64                                                                                                                                2/7
Installing : device-mapper-1.02.74-10.el6.x86_64                                                                                                                                     3/7
Installing : device-mapper-event-libs-1.02.74-10.el6.x86_64                                                                                                                          4/7
Installing : device-mapper-event-1.02.74-10.el6.x86_64                                                                                                                               5/7
Installing : lvm2-libs-2.02.95-10.el6.x86_64                                                                                                                                         6/7
Installing : lvm2-2.02.95-10.el6.x86_64                                                                                                                                              7/7

Installed:
lvm2.x86_64 0:2.02.95-10.el6

Dependency Installed:
device-mapper.x86_64 0:1.02.74-10.el6     device-mapper-event.x86_64 0:1.02.74-10.el6     device-mapper-event-libs.x86_64 0:1.02.74-10.el6     device-mapper-libs.x86_64 0:1.02.74-10.el6
libudev.x86_64 0:147-2.42.el6             lvm2-libs.x86_64 0:2.02.95-10.el6

Complete!
You have new mail in /var/spool/mail/root
[root@Cacti ~]# pvcreate /dev/sdb
Writing physical volume data to disk "/dev/sdb"
Physical volume "/dev/sdb" successfully created
[root@Cacti ~]# pvdisplay
"/dev/sdb" is a new physical volume of "20.00 GiB"
--- NEW Physical volume ---
PV Name               /dev/sdb
VG Name
PV Size               20.00 GiB
Allocatable           NO
PE Size               0
Total PE              0
Free PE               0
Allocated PE          0
PV UUID               Li76jc-Hbq2-9TsD-Fcui-3XZA-YDxS-Ma6bN5

[root@Cacti ~]#

看到了吧,可以用了!!
本文出自 “虫子的博客” 博客,请务必保留此出处http://xlogin.blog.51cto.com/3473583/1009229
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐