- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to identify the unused disks using command...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 06:54 PM
06-15-2004 06:54 PM
How to identify the unused disks using commandline utilities
I have the problem on HPUX 11.23 machine when I use the pvreate command to add new hard disk.
# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
============================================================================
disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-B
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373453LC
/dev/dsk/c2t0d0 /dev/dsk/c2t0d0s2 /dev/rdsk/c2t0d0 /dev/rdsk/c2t0d0s2
/dev/dsk/c2t0d0s1 /dev/dsk/c2t0d0s3 /dev/rdsk/c2t0d0s1 /dev/rdsk/c2t0d0s3
disk 2 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 73.4GST373453LC
/dev/dsk/c2t1d0 /dev/dsk/c2t1d0s2 /dev/rdsk/c2t1d0 /dev/rdsk/c2t1d0s2
/dev/dsk/c2t1d0s1 /dev/dsk/c2t1d0s3 /dev/rdsk/c2t1d0s1 /dev/rdsk/c2t1d0s3
Actually I have to add disk 2. I used pvcreate command to create physical volume path /dev/rdsk/c2t0d0. But this is one curently used. The pvcreate command didn't give even warnings. I should be create /dev/rdsk/c2t1d0 instead /dev/rdsk/c2t0d0. Now I reboot the machine & its not working.
My doubt is, how can I know the physical path( /dev/rdsk/c2t0d0) is used currently? How to identify the unused disks using commandline utilities?
Regs,
Durai.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 06:59 PM
06-15-2004 06:59 PM
Re: How to identify the unused disks using commandline utilities
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=602666
The script I posted in there has always worked for me but I don't actually guarantee it :)
You can't beat good documentation on what disk is where.
Basically though, pvcreate should complain if the disk is in a volume group but "pvcreate -f" won't. I make it a mission of mine, never to have to use "pvcreate -f"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 07:06 PM
06-15-2004 07:06 PM
Re: How to identify the unused disks using commandline utilities
You can use the pvdisplay command to check the disk for vg configuration.
# vgdisplay /dev/dsk/cxtydz
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 07:29 PM
06-15-2004 07:29 PM
Re: How to identify the unused disks using commandline utilities
Find the volume groups exist and issue the command
#vgdisplay -v vgxx shows the disk used for that volume group
and also
#lvlnboot -v
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 07:37 PM
06-15-2004 07:37 PM
Re: How to identify the unused disks using commandline utilities
#strings /etc/lvmtab|grep /dev/dsk/cXtXdX
or just run "strings /etc/lvmtab" and compare it with the output of "ioscan -funC disk"
Just a tip. What I do is to collect SIR data (ask HP Solution Center or if you have a TAM/ASE, ask for SIR) regularly so I have proper documentation of the system configuration and information of all my HPUX machines. I can tell you that it has been a handy tool for me for more than a couple of instances.
Regards,
Ira
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 07:39 PM
06-15-2004 07:39 PM
Re: How to identify the unused disks using commandline utilities
Regards,
Ira
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 07:56 PM
06-15-2004 07:56 PM
Re: How to identify the unused disks using commandline utilities
Sorry for the condusion I made :-)
use
# pvdisplay /dev/dsk/cxtydz
db001:/root# pvdisplay /dev/dsk/c5t5d0
--- Physical volumes ---
PV Name /dev/dsk/c5t5d0
VG Name /dev/vg01
PV Status available
Allocatable yes
VGDA 2
Cur LV 6
PE Size (Mbytes) 4
Total PE 4340
Free PE 0
Allocated PE 4340
Stale PE 0
IO Timeout (Seconds) default
Kind regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 08:39 PM
06-15-2004 08:39 PM
Re: How to identify the unused disks using commandline utilities
the question is how you define the terms "used currently" or "unused disks".
If you simply want to know if the device is LVM-configured, then pvdisplay could be used... but what if the VG is deactived?
You could look at lvmtab... but what if it's an alternate path to a configured device?
You could look at the disk's content and check for some magics that identify it as LVM or VxVM disk.
But what about devices that directly accessed by e.g. a DB. What about disks with EFI header at the beginning? I think, there's no 100% sure way to tell "unused".
However, you could use the script I attached. It scans all accessible devices on a given list of systems and tries to guess it's usage (LVM vs. VxVM vs. EFI). Especially for SAN's a multi-node scan with this script could be very helpful.
Best regards...
Dietmar.