简介
A
ab
accept
ack
ag
alias
apachectl
apk
apropos
apt-get
aptitude
apt-key
apt-sortpkgs
ar
arch
arj
arp
arpd
arping
arptables
arpwatch
as
at
atop
atq
atrm
awk
axel
B
badblocks
base64
basename
batch
bc
bg
bind
blkid
blockdev
bmodinfo
break
builtin
bunzip2
bye
bzcat
bzcmp
bzdiff
bzgrep
bzip2
bzip2recover
bzless
bzmore
C
cal
cancel
cat
cd
cdrecord
chage
chattr
chcon
chfn
chgrp
chkconfig
chmod
chown
chpasswd
chroot
chsh
cksum
clear
clock
clockdiff
cmp
col
colrm
column
comm
command
compress
consoletype
continue
convertquota
cp
cpio
createrepo
crontab
csplit
cu
cupsdisable
cupsenable
curl
cut
D
date
dc
dd
declare
depmod
df
dhclient
dhcpd
dhcrelay
diff
diff3
diffstat
dig
dircolors
dirname
dirs
disown
dmesg
dmidecode
dnf
dnsdomainname
docker
domainname
dos2unix
dpkg-deb
dpkg-divert
dpkg-preconfigure
dpkg-query
dpkg-reconfigure
dpkg-split
dpkg-statoverride
dpkg-trigger
dpkg
dris
dstat
du
dump
E
e2fsck
e2label
echo
ed
edquota
egrep
eject
elinks
elm
emacs
enable
env
ethtool
ex
exec
exit
expand
export
exportfs
expr
F
false
fc
fdisk
fg
fgrep
file
find
findfs
finger
firewall-cmd
fishshell
fmt
fold
fping
free
fsck
ftp
ftpcount
ftpshut
ftptop
ftpwho
fuser
G
gcc
gcov
gdb
get_module
getenforce
getent
getsebool
git
gpasswd
gpm
grep
groupadd
groupdel
groupmems
groupmod
groups
grpck
grpconv
grpunconv
grub
grub2-mkconfig
grub2-set-default
gunzip
gzexe
gzip
H
halt
hcitool
hdparm
head
help
hexdump
history
host
hostid
hostname
hostnamectl
hping3
htdigest
htop
htpasswd
hwclock
I
iconv
id
ifcfg
ifconfig
ifdown
ifstat
iftop
ifup
indent
info
init
inotifywait
insmod
install
iostat
iotop
ip
ip6tables-restore
ip6tables-save
ip6tables
ipcalc
ipcrm
ipcs
iperf
iptables-restore
iptables-save
iptables
iptraf
iptstate
iscsiadm
ispell
J
jed
jobs
joe
join
journalctl
jq
jwhois
K
kernelversion
kexec
kill
killall
L
last
lastb
lastlog
ld
ldconfig
ldd
less
let
lftp
lftpget
lha
lilo
ln
lnstat
local
locate
logger
login
logname
logout
logrotate
logsave
logwatch
look
losetup
lp
lpadmin
lpc
lpq
lpr
lprm
lpstat
ls
lsattr
lsb_release
lsblk
lscpu
lsmod
lsof
lspci
lsusb
ltrace
lvcreate
lvdisplay
lvextend
lvreduce
lvremove
lvresize
lvscan
lynx
M
mail
mailq
mailstat
make
man
mapfile
md5sum
mesg
mii-tool
mkbootdisk
mkcert
mkdir
mke2fs
mkfs
mkinitrd
mkisofs
mknod
mkswap
mktemp
modetest
modprobe
more
mount
mpstat
mtools
mtr
mv
mysql
mysqladmin
mysqldump
mysqlimport
mysqlshow
N
named-checkzone
nano
nc
ncftp
neofetch
nethogs
netstat
newusers
nfsstat
ngrep
nice
nisdomainname
nl
nm
nmap
nmcli
nohup
nologin
nproc
nslookup
ntpdate
ntsysv
O
objdump
od
openssl
P
pacman
parted
partprobe
passwd
paste
patch
pathchk
perl
pfctl
pgrep
php
pico
pidof
pidstat
pigz
ping
ping6
pip
pkexec
pkill
pmap
popd
poweroff
ppp-off
pr
printf
protoize
prtstat
ps
pssh
pstack
pstree
pushd
pv
pvchange
pvck
pvcreate
pvdisplay
pvremove
pvs
pvscan
pwck
pwconv
pwd
pwdx
pwunconv
Q
quota
quotacheck
quotaoff
quotaon
R
rcconf
rcp
read
readelf
readonly
reboot
reject
rename
renice
reposync
repquota
resize
restore
restorecon
return
rev
rexec
rlogin
rm
rmdir
rmmod
route
rpm
rpm2cpio
rpmbuild
rpmdb
rpmquery
rpmsign
rpmverify
rsh
rsync
runlevel
S
sar
scp
screen
script
scriptreplay
sed
seinfo
semanage
sendmail
seq
service
sesearch
set
setfacl
setpci
setsebool
setsid
sftp-server
sftp
sh
sha256sum
shift
shopt
showmount
shuf
shutdown
skill
slabtop
sleep
slocate
smartmontools
smbclient
smbpasswd
sort
source
speedtest-cli
spell
split
squid
squidclient
ss
ssh-add
ssh-agent
ssh-copy-id
ssh-keygen
ssh-keyscan
ssh
sshd
sshpass
startx
stat
strace
strings
stty
su
sudo
sum
supervisord
suspend
swapoff
swapon
sync
sysctl
syslog
systemctl
systool
T
tac
tail
tailf
talk
tar
tcpdump
tcpreplay
tee
telinit
telnet
tempfile
test
tftp
time
timedatectl
times
tload
tmux
top
touch
tput
tr
tracepath
traceroute
trap
tree
true
tty
type
U
ulimit
umask
umount
unalias
uname
unarj
uncompress
unexpand
uniq
unlink
unprotoize
unrar
unset
unzip
updatedb
uptime
useradd
userdel
usermod
usernetctl
users
uucico
uupick
uuto
V
vdfuse
vgchange
vgconvert
vgcreate
vgdisplay
vgextend
vgreduce
vgremove
vgrename
vgscan
vi
vmstat
volname
W
w
wait
wall
watch
wc
wget
whatis
whereis
which
who
whoami
write
X
xargs
xauth
xclip
xhost
xinit
xlsatoms
xlsclients
xlsfonts
xrandr
xset
xz
Y
yes
ypdomainname
yum
Z
zcat
zfore
zip
zipinfo
zipsplit
znew
其他
7z
pvcreate - Linux命令大全 - 笔下光年
网站首页
pvcreate
将物理硬盘分区初始化为物理卷 ## 补充说明 **pvcreate命令** 用于将物理硬盘分区初始化为物理卷,以便LVM使用。 ### 语法 ```shell pvcreate(选项)(参数) ``` ### 选项 ```shell -f:强制创建物理卷,不需要用户确认; -u:指定设备的UUID; -y:所有的问题都回答“yes”; -Z:是否利用前4个扇区。 ``` ### 参数 物理卷:指定要创建的物理卷对应的设备文件名。 ### 实例 查看磁盘信息: ```shell [root@localhost ~]# fdisk -l Disk /dev/hda: 41.1 GB, 41174138880 bytes 255 heads, 63 sectors/track, 5005 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks id System /dev/hda1 * 1 13 104391 83 Linux /dev/hda2 14 1288 10241437+ 83 Linux /dev/hda3 1289 1925 5116702+ 83 Linux /dev/hda4 1926 5005 24740100 5 Extended /dev/hda5 1926 2052 1020096 82 Linux swap / Solaris /dev/hda6 2053 2235 1469916 8e Linux LVM /dev/hda7 2236 2418 1469916 8e Linux LVM /dev/hda8 2419 2601 1469916 8e Linux LVM /dev/hda9 2602 2784 1469916 8e Linux LVM ``` 检查有无 PV 在系统上,然后将`/dev/hda6`到`/dev/hda9`建立成为PV格式 ```shell [root@localhost ~]# pvscan No matching physical volumes found #找不到任何的 PV 存在! ``` 将6-9分区转成pv,注意大括号的用途: ```shell [root@localhost ~]# pvcreate /dev/hda{6,7,8,9} Physical volume "/dev/hda6" successfully created Physical volume "/dev/hda7" successfully created Physical volume "/dev/hda8" successfully created Physical volume "/dev/hda9" successfully created ``` 这就分別表示每个 PV 的信息与系统所有 PV 的信息: ```shell [root@localhost ~]# pvscan PV /dev/hda6 lvm2 [1.40 GB] PV /dev/hda7 lvm2 [1.40 GB] PV /dev/hda8 lvm2 [1.40 GB] PV /dev/hda9 lvm2 [1.40 GB] Total: 4 [5.61 GB] / in use: 0 [0 ] / in no VG: 4 [5.61 GB] ``` 更详细的列示出系统上面每个 PV 信息: ```shell [root@localhost ~]# pvdisplay "/dev/hda6" is a new physical volume of "1.40 GB" --- NEW Physical volume --- PV Name /dev/hda6 #实际的 partition 分区名称 VG Name #因为尚未分配出去,所以空白! PV Size 1.40 GB #就是容量说明 Allocatable NO #是否已被分配,结果是 NO PE Size (KByte) 0 #在此 PV 內的 PE 大小 Total PE 0 #共分割出几个 PE free PE 0 #沒被 LV 用掉的 PE Allocated PE 0 #尚可分配出去的 PE 数量 PV UUID Z13Jk5-RCls-UJ8B-HzDa-Gesn-atku-rf2biN ....(底下省略).... ``` 删除物理卷: ```shell [root@localhost ~]# pvremove /dev/sdb2 Labels on physical volume "/dev/sdb2" successfully wiped ``` 修改物理卷属性: ```shell [root@localhost ~]# pvchange -x n /dev/sdb1 #禁止分配指定物理卷上的PE Physical volume "/dev/sdb1" changed 1 physical volume changed / 0 physical volumes not changed ```
上一篇:
pvck
下一篇:
pvdisplay