- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Discover New/Unused Disks on a HP-UX 11i v3 sy...
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
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
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
01-09-2014 06:58 AM
01-09-2014 06:58 AM
Hi Guys,
I'm looking for a shortcut to identify all the disks on a system, which are in use by either LVM, HPVM or any other process.
I also need to identify all the disks, which are unused by any of the processes.
Is there a simple way to do this instead of scanning through all the applications for the disk used b them like. LVM, HPVM, Oracle RAC or VXVM?
It'll be huge relief if someone has a custom script to do this job for me.
Thanks,
Ashutosh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2014 07:04 AM
01-09-2014 07:04 AM
Re: Discover New/Unused Disks on a HP-UX 11i v3 system
>> LVM, HPVM or any other process.
"any other process" is the problem, if some applications are using raw disks ...
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2014 01:06 AM
01-10-2014 01:06 AM
Solutionon 11.31 we have the diskowner command - see man page for details
something like:
for i in /dev/disk/*
do
diskowner $i
done
would be a simple way to accomplish what you need - not sure what it will show for disks owned by HPVM guests though
the list of what it can recognise is described in the man page
I am an HPE Employee
- Tags:
- diskowner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2014 02:57 AM - edited 01-10-2014 03:04 AM
01-10-2014 02:57 AM - edited 01-10-2014 03:04 AM
Re: Discover New/Unused Disks on a HP-UX 11i v3 system
Interesting command.
diskowner
displays the following possible output:
owner
The owner of the given path.
owner
can be one of the following:
none The path is not owned by any known subsystem.
lvm The path is part of an LVM volume group.
vxvm The path is part of a VxVM volume group.
vxfs The path has a VxFS filesystem on it.
hfs The path has a HFS filesystem on it.
swap The path is being used as a swap device.
dump The path is being used as a dump device.
asm The path is part of an Oracle database.
partition The path has EFI partitions on it.
http://h20565.www2.hp.com/portal/site/hpsc/template.BINARYPORTLET/public/kb/docDisplay/resource.process/?spf_p.tpst=kbDocDisplay_ws_BI&spf_p.rid_kbDocDisplay=docDisplayResURL&javax.portlet.begCacheTok=com.vignette.cachetoken&spf_p.rst_kbDocDisplay=wsrp-resourceState%3DdocId%253Demr_na-c02259496-2%257CdocLocale%253D&javax.portlet.endCacheTok=com.vignette.cachetoken
I don't thing it can detect any HPVM or "raw" disks.
Example:
Path /dev/disk/disk2_p2 is owned by lvm.
#diskowner /dev/rdisk/disk10
Path /dev/rdisk/disk10 is owned by vxvm. -
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2014 10:14 AM - edited 01-11-2014 10:21 AM
01-11-2014 10:14 AM - edited 01-11-2014 10:21 AM
Re: Discover New/Unused Disks on a HP-UX 11i v3 system
Raw disks are problematic in that there no magic number or ID for every possible application. You can try examining the first few kbytes of the unknown disks for a possible ID string. Use xd to show the binary and ASCII strings:
# xd -txc -N 200 /dev/rdisk/disk4
and to offset into the raw disk, -j can be used as an offset.
# xd -txc -N 200 -j 1000 /dev/rdisk/disk4
Here's an example showing an LVM disk:
# xd -txc -N 200 -j 8192 /dev/rdisk/disk18 0000000 4c564d52 45433031 66e5f3ed 519bc06b L V M R E C 0 1 f 345 363 355 Q 233 300 k 0000010 66e5f3ed 519bc321 10f59c7 0 f 345 363 355 Q 233 303 ! 001 017 Y 307 \0 \0 \0 \0 LVMREC01 identifies this disk as in use by LVM version 1.0.
Also look to see if the disk device files are not owned by root. And any disk that has partitions is likely to have (or had in the past) some boot areas or other specialized usage.
I don't allow any raw disks to be used until they are recorded in fstab as comments. Whether the application is Sybase, Informix or some homegrown rpogram, raw disks are always at risk when sysadmins change and don't document unusual configs..
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2014 04:27 AM
01-14-2014 04:27 AM
Re: Discover New/Unused Disks on a HP-UX 11i v3 system
Hi All,
Thanks for your valuable input. I got my answer in diskowner command. I didn't even know something like this was already present in HP-UX. Next I saw that the boot disks of all the HPVMs are said as "owned by partition". The other disks presented to HPVM, which were used by LVM, were surprisingly shown as "owned by lvm". I didn't knew that disks presented to a HPVM and then used by LVM could be identified from the VM Host.
I couldn't verify for disks in use by Oracle RAC, Veritas Volume Manager & other systems accessing the disks directly. If anyone can do that, it would be immensly useful for all of us.
Thanks again for all the help.
Regards,
Ashutosh Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2014 08:41 AM
02-07-2014 08:41 AM
Re: Discover New/Unused Disks on a HP-UX 11i v3 system
This is a very old thread, but just to metion that you can look at the header of ASM disks and script it:
For example:
check_ASM=`od -c $device |head -10|grep "O R C L D I S K"|awk '{print$2,$3,$4,$5,$6,$7,$8,$9}'`