[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

Finding available partitions

I was in an environment in which I was on a virtual machine and had to find available partitions to provide make a physical volume.  The question is:  how would you find out all the available partitions on the system that have not been occupied if the file system is really messy -- raids, lvms, many virtual devices and stuff?  Is there anything better than lvmdiskscan command?
0
farzanj
Asked:
farzanj
2 Solutions
 
arnoldCommented:
You have to use all the tools:
fdisk -l (to see the physical drives)
mdstat
pvscan
pvdisplay
vgscan
vgdisplay
lvdisplay

IMHO, it is best to use multiple tools to be sure, than to rely on one that might miss some information.
0
 
Alberto CortesCommented:
Solution, run as root:

To view partitions in all disks: fdisk -l
To view used space in all filesystems: df -k
0
 
farzanjAuthor Commented:
Sorry for the delay.
I was actually looking for all the available devices on the system.  I was looking for more like.
lshal | grep 'block.device'

Open in new window

Experts, I thank you for your time.
 
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now