Operating System - HP-UX
1833599 Members
3533 Online
110061 Solutions
New Discussion

Show all file systems under each disk

 
ajk_2
Advisor

Show all file systems under each disk

Dear all,

I would like to know how I can display all file systems under each disk? Does any command can show them all? Thank a lot.

Best Regards
Ajk
3 REPLIES 3
Stefan Farrelly
Honored Contributor

Re: Show all file systems under each disk


This command will show you all logical volumes on a disk;

pvdisplay -v /dev/dsk/c4t6d0|awk '{print $3}'|grep lvol|sort -u

You can then match them up with the output from bdf or do it in one go;

echo All filesystems on disk c4t6d0....
for i in $(pvdisplay -v /dsk/c4t6d0|awk '{print $3}'|grep lvol|sort -u)
do
bdf|grep $i
done


Im from Palmerston North, New Zealand, but somehow ended up in London...
Steven Sim Kok Leong
Honored Contributor

Re: Show all file systems under each disk

Hi,

Use pvdisplay to identify the logical volumes (LVs) on the PV (physical disk).

For each LV, check against /etc/fstab or bdf output to identify the filesystem that is mounted on the LV.

Hope this helps. Regards.

Steven Sim Kok Leong
Darrell Allen
Honored Contributor

Re: Show all file systems under each disk

Hi Ajk,

I've attached a script you can use or modify to suit your needs.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)