CARVIEW |

- accept
- accton
- acpid
- addftinfo
- addpart
- addr2line
- adduser
- agetty
- alias
- alternatives
- amtu
- anacron
- animate
- anvil
- apachectl
- apm
- apmd
- apmsleep
- appletviewer
- apropos
- apt
- ar
- arbitron
- arch
- arp
- arping
- as
- aspell
- at
- atd
- atq
- atrm
- atrun
- attr
- audispd
- auditctl
- auditd
- aulast
- aulastlog
- aureport
- ausearch
- ausyscall
- authconfig
- autoconf
- autofs
- automount
- autoreconf
- autoscan
- autoupdate
- autrace
- avcstat
- avctrl
- awk
- B
- badblocks
- base64
- basename
- bash
- bashbug
- batch
- bc
- bccmd
- bg
- bind
- bison
- blkid
- blockdev
- bmp2tiff
- booleans
- bounce
- break
- builtin
- builtins
- bunzip2
- bzcat
- bzcmp
- bzdiff
- bzgrep
- bzip2
- bzless
- bzmore
- C
- c++filt
- cal
- callback
- cancel
- case
- cat
- cd
- chage
- chat
- chattr
- chcat
- chcon
- checkmodule
- checkpolicy
- chfn
- chgrp
- chkconfig
- chmod
- chown
- chpasswd
- chroot
- chrt
- chsh
- chvt
- ciphers
- ciptool
- cjpeg
- cksum
- cleanlinks
- cleanup
- clear
- clockdiff
- clusterdb
- cmp
- col
- colcrt
- colrm
- column
- combinediff
- comm
- command
- compare
- compgen
- compile_et
- complete
- composite
- conjure
- conman
- conmand
- continue
- convert
- convertquota
- cp
- cpan
- cpio
- cpp
- cpuspeed
- crash
- createdb
- createlang
- createuser
- cron
- crond
- crontab
- cryptsetup
- csh
- csplit
- ctags
- cupsctl
- cupsd
- curl
- cut
- cvs
- cvsbug
- cyradm
- cytune
- D
- date
- dc
- dd
- deallocvt
- debugfs
- declare
- defer
- deliver
- delpart
- depmod
- df
- dfutool
- dgst
- diff
- diffstat
- dig
- dir
- dircolors
- dirname
- dirs
- discard
- disown
- display
- distcache
- djpeg
- dmesg
- dmidecode
- dmraid
- dmsetup
- dnsdomainname
- dnsmasq
- doexec
- domainname
- dos2unix
- dosfsck
- doxygen
- doxytag
- dprofpp
- dropdb
- droplang
- dropuser
- dsa
- dsaparam
- du
- dump
- dund
- dvipdf
- E
- ec
- echo
- ecparam
- ed
- editdiff
- edquota
- egrep
- eject
- elinks
- emacs
- enable
- enc
- env
- envsubst
- eqn
- error
- errstr
- esd
- esdcat
- esdctl
- esddsp
- esdfilt
- esdloop
- esdmon
- esdplay
- esdrec
- esdsample
- espdiff
- etags
- ethtool
- eval
- eventlogadm
- ex
- exec
- execstack
- exit
- expand
- export
- exportfs
- expr
- extcheck
- F
- factor
- faillog
- false
- fancontrol
- fastjar
- fax2ps
- fax2tiff
- fbset
- fc
- fdformat
- fdisk
- fetchmail
- fg
- fgconsole
- fgrep
- file
- filefrag
- filterdiff
- find
- find2perl
- findchip
- findfs
- findsmb
- finger
- fixcvsdiff
- fixfiles
- flipdiff
- flock
- floppy
- flush
- fmt
- fold
- font2c
- fonttosfnt
- formail
- free
- fsadm
- fsck
- ftp
- fud
- funzip
- fuser
- G
- g++
- gawk
- gcc
- gccmakedep
- gcj
- gcjh
- gcov
- gctags
- gdb
- gdbserver
- gdbtui
- gendiff
- gendsa
- genhomedircon
- genhostid
- genrsa
- geqn
- getenforce
- getent
- getfacl
- getfattr
- getkey
- getkeycodes
- getopt
- getopts
- getsebool
- gettext
- gfdl
- ghostscript
- gif2tiff
- gij
- gindxbib
- gjnih
- glookbib
- gnroff
- gpasswd
- gpg
- gpg.ru
- gpgv
- gpic
- gpm
- gprof
- grefer
- grep
- grepdiff
- grepjar
- grmic
- grmiregistry
- grn
- grodvi
- groff
- groffer
- grohtml
- grolbp
- grolj4
- grops
- grotty
- groupadd
- groupdel
- groupmod
- groups
- grpck
- grpconv
- grpunconv
- grub
- grubby
- gs
- gtroff
- gunzip
- gzexe
- gzip
- H
- hald
- halt
- hash
- hcid
- hcitool
- hdparm
- head
- help
- hexdump
- history
- host
- hostid
- hostname
- htdbm
- htdigest
- htpasswd
- httpd
- hwclock
- I
- icclink
- iconv
- id
- identify
- idmapd
- ifconfig
- ifnames
- ifrename
- igawk
- imake
- imapd
- import
- imtest
- indxbib
- info
- infocmp
- infokey
- infotocap
- init
- initdb
- initlog
- innochecksum
- insmod
- install
- installsieve
- instmodsh
- interdiff
- intro
- ionice
- ip
- ip6tables
- ipcalc
- ipcclean
- ipcrm
- ipcs
- iptables-restore
- iptables-save
- iptables
- iptstate
- ipurge
- irattach
- irdadump
- irdaping
- irnetd
- irpsion5
- irqbalance
- isadump
- isaset
- isosize
- J
- jade
- jarsigner
- java
- javac
- javadoc
- javah
- javap
- javaws
- jconsole
- jdb
- jinfo
- jmap
- jobs
- join
- jpegicc
- jpegtran
- jps
- jsadebugd
- jstack
- jstat
- jstatd
- jwhois
- L
- last
- lastb
- lastcomm
- lastlog
- lchage
- lchfn
- lchsh
- ld
- ldconfig
- ldd
- less
- lessecho
- lesskey
- let
- lftp
- lftpget
- libnetcfg
- lid
- link
- links
- lkbib
- lmtp
- lmtpd
- lmtptest
- ln
- lndir
- lnewusers
- loadkeys
- loadunimap
- local
- locale
- localedef
- locate
- lockd
- lockfile
- logger
- login
- logname
- logout
- logresolve
- logrotate
- logsave
- logwatch
- look
- lookbib
- losetup
- lp
- lpadmin
- lpasswd
- lpc
- lpinfo
- lpmove
- lpoptions
- lppasswd
- lpq-cups
- lpq
- lpr
- lprm
- lpstat
- ls
- lsattr
- lsdiff
- lshal
- lsmod
- lsof
- lspci
- lspcmcia
- lsusb
- ltrace
- lwresd
- M
- m4
- mac2unix
- mailq
- make
- makedepend
- makeg
- makestrs
- makewhatis
- man
- man2html
- manpath
- map
- mapscrn
- master
- matchpathcon
- mattrib
- mbadblocks
- mbchk
- mbexamine
- mbpath
- mcat
- mcd
- mclasserase
- mcookie
- mcopy
- md5sum
- mdadm
- mdassemble
- mdeltree
- mdir
- mdmpd
- mdu
- mergelib
- mesg
- mev
- mformat
- mgetty
- minfo
- mingetty
- mkbootdisk
- mkdir
- mkdirhier
- mkdosfs
- mke2fs
- mkfifo
- mkfontdir
- mkfontscale
- mkfs.ext2
- mkfs.ext3
- mkfs
- mkhtmlindex
- mkinitrd
- mklost+found
- mkmanifest
- mkmapfile
- mknod
- mkswap
- mktemp
- mlabel
- mmd
- mmount
- mmove
- modinfo
- modprobe
- mogrify
- montage
- more
- mount
- mountd
- mountpoint
- mpartition
- mrd
- mren
- msgattrib
- msgcat
- msgcmp
- msgcomm
- msgconv
- msgen
- msgexec
- msgfilter
- msgfmt
- msggrep
- msginit
- msgmerge
- msgunfmt
- msguniq
- mshowfat
- msql2mysql
- mtools
- mtoolstest
- mtr
- mtype
- multipath
- multipathd
- mupdatetest
- mutt
- mv
- mysql
- mysqlaccess
- mysqladmin
- mysqlbinlog
- mysqlbug
- mysqlcheck
- mysqld
- mysqld_multi
- mysqld_safe
- mysqldump
- mysqldumpslow
- mysqlhotcopy
- mysqlimport
- mysqlman
- mysqlmanager
- mysqlshow
- mysqlslap
- mysqltest
- mzip
- N
- named
- namei
- nameif
- nano
- nash
- nc
- neqn
- net
- netplugd
- netreport
- netstat
- newaliases
- newgrp
- newusers
- nfsd
- nfsstat
- ngettext
- nhfsgraph
- nhfsnums
- nhfsrun
- nhfsstone
- nice
- nm
- nmbd
- nmblookup
- nntpd
- nntptest
- nohup
- nologin
- notifyd
- nroff
- nscd
- nseq
- nsgmls
- nslookup
- nsupdate
- ntlm_auth
- ntpd
- ntpdate
- ntpdc
- ntpq
- ntpstat
- ntptime
- ntptrace
- ntsysv
- numactl
- O
- objcopy
- objdump
- ocsp
- od
- oddjobd
- onsgmls
- openjade
- openssl
- openvt
- oqmgr
- orbd
- osgmlnorm
- ospam
- ospcat
- ospent
- ownership
- P
- pand
- paps
- parted
- partprobe
- partx
- passwd
- paste
- patch
- pathchk
- pax
- pccardctl
- pcregrep
- pcretest
- pcscd
- pdbedit
- pdf2dsc
- pdf2ps
- pdffonts
- pdfimages
- pdfinfo
- pdfopt
- pdftohtml
- pdftops
- pdftotext
- perror
- pf2afm
- pfbtopfa
- pfbtops
- pftp
- pgawk
- pgrep
- php-config
- php
- phpize
- pic
- pic2graph
- pickup
- piconv
- pidof
- pinfo
- ping
- ping6
- pinky
- pipe
- pkg-config
- pkill
- plipconfig
- pluginviewer
- pman
- pmap
- pod2html
- pod2latex
- pod2man
- pod2text
- pod2usage
- podchecker
- podselect
- policytool
- pop3d
- pop3test
- popd
- portmap
- postalias
- postcat
- postconf
- postdrop
- postfix
- postgres
- postkick
- postlock
- postlog
- postmap
- postmaster
- postqueue
- postsuper
- poweroff
- ppm2tiff
- pppd
- pppdump
- pppoe
- pppstats
- pr
- prelink
- printafm
- printenv
- printf
- procmail
- profiles
- protoize
- prove
- proxymap
- ps
- psed
- psql
- pstack
- pstree
- pstruct
- ptar
- ptardiff
- ptx
- pushd
- pvchange
- pvck
- pvcreate
- pvdisplay
- pvmove
- pvremove
- pvresize
- pvs
- pvscan
- pwck
- pwconv
- pwd
- pwdx
- pwmconfig
- pwunconv
- python
- R
- racoon
- racoonctl
- ramsize
- ranlib
- ras2tiff
- raw
- raw2tiff
- rawdevices
- rcp
- rdate
- rdev
- rdisc
- rdist
- rdjpgcom
- rdump
- read
- readelf
- readlink
- readonly
- readprofile
- reboot
- reconstruct
- recountdiff
- red
- rediff
- refer
- reindexdb
- reject
- rename
- renice
- replace
- repquota
- req
- reset
- resize2fs
- resizecons
- resolveip
- restore
- restorecon
- restorecond
- return
- rev
- revpath
- rexec
- rfcomm
- rgb2ycbcr
- rlogin
- rm
- rmdir
- rmid
- rmmod
- rmnews
- rmt
- rnano
- rootflags
- rotatelogs
- route
- rpcclient
- rpcdebug
- rpcgen
- rpcinfo
- rsa
- rsautl
- rsh
- rsvg
- rsync
- ruby
- runcon
- runlevel
- runuser
- rvi
- rview
- rvim
- S
- safe_mysqld
- saslauthd
- scache
- scp
- script
- sdiff
- sdpd
- sdptool
- sechecker
- secon
- sed
- sediff
- seinfo
- selinux
- selinuxenabled
- semanage
- sensors
- seq
- serialver
- servertool
- service
- sesearch
- sestatus
- set
- setarch
- setenforce
- setfacl
- setfattr
- setfiles
- setfont
- setkey
- setkeycodes
- setleds
- setmetamode
- setpci
- setquota
- setsebool
- setserial
- setsid
- setterm
- sfdisk
- sftp
- sg
- sgpio
- sh
- sha
- shift
- shopt
- showkey
- showmount
- showq
- shred
- shutdown
- sieveshell
- sivtest
- size
- skill
- slabtop
- slattach
- sleep
- sln
- slogin
- smartctl
- smartd
- smbcacls
- smbclient
- smbcontrol
- smbcquotas
- smbd
- smbget
- smbpasswd
- smbspool
- smbstatus
- smbtar
- smbtree
- smime
- smmapd
- smtp
- smtpd
- smtptest
- snice
- snmpd
- snmptrapd
- sntp
- soelim
- sort
- sosreport
- source
- spam
- spamassassin
- spamc
- spamd
- spawn
- speed
- spent
- spkac
- splain
- split
- splitdiff
- sprofa>
- sqlite3
- squatter
- ssh-add
- ssh-agent
- ssh-copy-id
- ssh-keygen
- ssh-keyscan
- ssh-keysign
- ssh
- sshd
- sslpasswd
- sslrand
- sslswamp
- stat
- statd
- strace
- strings
- strip
- stty
- stunnel
- su
- sudo
- sudoedit
- suexec
- sulogin
- sum
- suspend
- svcgssd
- swapoff
- swapon
- symlinks
- sync
- sysctl
- sysklogd
- syslogd
- systool
- T
- tac
- tack
- tail
- tailf
- talk
- tar
- taskset
- tbl
- tclsh
- tcpd
- tcpdump
- tcpslice
- tcsh
- tdbbackup
- tdbdump
- tdbtool
- tee
- telinit
- telnet
- test
- testparm
- tfmtodit
- tftp
- thumbnail
- tic
- tiff2bw
- tiff2pdf
- tiff2ps
- tiff2rgba
- tiffcmp
- tiffcp
- tiffdither
- tiffdump
- tifficc
- tiffinfo
- tiffmedian
- tiffset
- tiffsplit
- time
- times
- timsieved
- tload
- tls_prune
- tlsmgr
- tmpwatch
- tnameserv
- toe
- top
- touch
- tput
- tr
- trace
- tracepath
- traceroute
- trap
- tree
- troff
- TRUE
- tset
- tsort
- tty
- tune2fs
- tunelp
- type
- typeset
- tzselect
- U
- ucs2any
- udevcontrol
- udevd
- udevinfo
- udevmonitor
- udevsettle
- udevtest
- udevtrigger
- ul
- ulimit
- umap
- umask
- umount
- unalias
- uname
- unexpand
- unexpunge
- uniq
- unix2dos
- unlink
- unprotoize
- unset
- unwrapdiff
- unzip
- unzipsfx
- updatedb
- uptime
- urlview
- useradd
- userdel
- userhelper
- userinfo
- usermod
- usermount
- usernetctl
- userpasswd
- users
- usleep
- uuidgen
- V
- vacuumdb
- vbetool
- vconfig
- vdir
- verify
- version
- vfstest
- vi
- vidmode
- view
- vigr
- vim
- vimdiff
- vimtutor
- vipw
- virtual
- visudo
- vmstat
- vol_id
- volname
- vpddecode
- vsftpd
pvs Command in Linux
The pvs command in Linux displays information about the physical volume. It provides a summary of all physical volumes in a system, showing details such as the volume name, volume group, size, and usage. It is a part of LVM (Logical Volume Manager) and is useful for monitoring storage and managing logical volumes efficiently.
Table of Contents
Here is a comprehensive guide to the options available with the pvs command −
Syntax of pvs Command
The syntax of the pvs command in Linux is as follows −
pvs [options] [physical_volumeâ¦]
In the above syntax, the [options] field is used to specify the options the modify output format, filter data, or provide additional details. The [physical_volumeâ¦] is used to specify one or more PV or device paths.
pvs Command Options
The options of the Linux pvs command are listed below −
Flags | Options | Description |
---|---|---|
-a | --all | Show information about devices that are not initialized as PVs. |
--binary | Use binary values (0 or 1) instead of descriptive literals. | |
--commandprofile Str | Use a command profile for configuration. | |
--config Str | Override lvm.conf(5) settings. Supports section/field syntax. | |
--configreport log|vg|lv|pv|pvseg|seg | Customize report format. | |
-d | --debug | Set debug level (repeat up to 6 times for more detail). |
--devices PV | Specify devices the command can use (comma-separated list). | |
--devicesfile Str | Use a file in /etc/lvm/devices/ to specify allowed devices. | |
--driverloaded y|n | Skip device-mapper interaction if set to no. Useful for debugging. | |
--foreign | Display foreign volume groups (VGs). | |
-h | --help | Display help text. |
--ignorelockingfailure | Continue with read-only metadata operations after locking failures. | |
--journal Str | Record additional information in the system journal. | |
--lockopt Str | Pass options to lvmlockd. | |
--logonly | Suppress command report, and display only log messages. | |
--longhelp | Display extended help text. | |
--nameprefixes | Add LVM2_ prefix to field names for easy scripting. | |
--noheadings | Remove column headers from output. Useful for scripts. | |
--nohints | Disable hints file when locating PVs. | |
--nolocking | Disable locking mechanism. | |
--nosuffix | Remove unit suffixes from size outputs. Works with --units. | |
-o | --options Str | Customize output fields. Use -o help to list available fields. |
--profile Str | Alias for --commandprofile or --metadataprofile. | |
-q | --quiet | Suppress log messages. Repeat for silent mode. |
--readonly | Run the command in read-only mode, avoiding metadata locks. | |
--reportformat basic|json | Change report format (default: basic, or JSON). | |
--rows | Display output columns as rows. | |
--segments | Show contiguous space allocations on each PV. | |
-S | --select Str | Filter results based on selection criteria. |
--separator Str | Specify column separator (useful for CSV output). | |
--shared | Display shared VGs even when lvmlockd is not used. | |
-O | --sort Str | Sort output by specified columns. Prefix with - for reverse sort. |
-t | --test | Run the command in test mode without modifying metadata. |
--unbuffered | Disable output buffering, showing results immediately. | |
--units [Num] | Define output units (bytes, KB, MB, etc.). | |
--unquoted | Remove quotes when using --nameprefixes. | |
-v | --verbose | Increase verbosity (repeat up to 4 times for more detail). |
--version | Show version information. | |
-y | --yes | Automatically confirm all prompts with yes (use with caution). |
Examples of pvs Command in Linux
In the section, the usage of the pvs command in Linux will be discussed with examples −
- Displaying all Physical Volumes (PVs)
- Displaying Physical Volumes (PVs) without Column Headers
- Displaying a Specific Field
- Displaying All Devices not Initialized as PVs
- Sorting Physical Volumes (PVs)
- Displaying Output in JSON Format
- Displaying Segment Allocation Details
- Displaying Output in a Specific Unit
- Suppressing Unit Suffix
- Displaying Physical Volumes (PVs) with Field Names Prefixed
- Displaying Output in Rows
- Displaying Usage Help
Displaying all Physical Volumes (PVs)
To display all physical volumes, use the pvs command without any option −
sudo pvs

Displaying Physical Volumes (PVs) without Column Headers
To display all physical volumes without column headings, use the --noheadings option −
sudo pvs --noheadings

The above command removes the first line of headers from the output, useful for scripts.
Display Specific Fields
To display a specific field, use the -o or --option with the pvs command. For example, to show only the PV name and size columns.
sudo pvs -o pv_name,pv_size

To display all the available options, run the following command −
sudo pvs -o help

Displaying All Devices not Initialized as PVs
To show information about devices that are not initialized as physical volumes (PVs), use the -a or --all option with the psv command −
sudo pvs -a

Sorting Physical Volumes (PVs)
Use the -O or --sort option to sort the physical volumes. For example, to sort the PVs by size in ascending order, use the following command −
sudo pvs -O pv_size
To sort in descending or use a dash (- reverses the order) with pv_size option −
sudo pvs -O -pv_size
Displaying Output in JSON Format
To display the output in JSON format, use the --reportformat option −
sudo pvs --reportformat json

Displaying Segment Allocation Details
To display the segment allocation details, use the --segments option with the pvs command −
sudo pvs --segments

Displaying Output in a Specific Unit
To display the output in a specific unit, use the --units options. To display output in gigabytes, use g with the --units option −
sudo pvs --units g

Other units that can be used are listed below −
- b (bytes), s (sectors), k (kilobytes), m (megabytes), t (terabytes), p (petabytes), e (exabytes)
- Capitalized versions (K, M, G, etc.) use SI units (base 1000 instead of 1024).
Suppressing Unit Suffix
To suppress the unit suffix from the output, use the --nosuffix option −
sudo pvs --nosuffix --units M

The above command outputs sizes in megabytes without unit symbols.
Displaying Physical Volumes (PVs) with Field Names Prefixed
To display the PVs with field names prefixed, use the --nameprefixes option −
sudo pvs --nameprefixes

The above command displays fields as LVM2_field=value, useful for parsing in scripts.
Displaying Output in Rows
By default, the output is displayed in the columns. To display the output in row format, use the --rows options
sudo pvs --rows

Displaying Usage Help
To display usage help of the pvs command, use the -h or --help option −
pvs -h
Conclusion
The pvs command in Linux is used to display information about physical volumes in a system, providing details such as volume name, volume group, size, and usage. It is an essential tool for managing and monitoring storage in a system using LVM (Logical Volume Manager). Various options and syntax allow customization of the output, such as sorting, filtering, and displaying in different formats.