I am trying to determine if a specific XIV LUN on AIX is in OPEN or CLOSED state. I would like tthe same info as I can get from command on v7000 LUN-s. I would need this info to find out if I can safely delete a LUN or not.
I tried fuser command, but no luck. It did not show anything fo PV-s that azre part of varyed-on VG-s.
Also tries but it tells every path OK even if they are in use or not. (failed/missing can be found, but that's not what I am looking for)
After a log of google searches I have no more ideas today. Anybody else?
--Trifo
Moderator's Comments:
Please always do wrap your code/samples in CODE TAGS as per forum rules.
Last edited by RavinderSingh13; 01-17-2020 at 12:01 PM..
zxmaus: thanks, but these commands are not what I meant. At least according to my findings.
Some of my systems have lots of LUN-s, used for various purposes:
* used as PV-s in some VG-s (mostly rootvg)
* used as GPFS NSD backing devices
* used as Oracle ASM data disks
and some more.
Your commands can show relevant info only for LUNS used as PV disks, but they are misleading on other cases.
Now I can try to run
and see if it can put the device into DEFINED state. When the device is open, I get an error and the device state is kept unchanged. But I would like to find a way to obtain the same info without modifying the system. By the way, how does rmdev find this info?
if you do this on ASM disks or gpfs disks you are wiping the header. The device will stay up til your next reboot and be beautiful and clean after the reboot so this is a terrible idea.
You do get an output from the commands I listed even with ASM devices and GPFS disks and even from completely unassigned open disks. It might be a cryptic unreadable output but it is an output. If you get nothing or a one-line-error the disks are not open.
But maybe I have a different understanding what open means. Are you trying to find out if the disks are unused? Are you using AIX mpio or any kind of multipathing software? With ASM, before you make ANY changes to the disks, ask the DBAs to backup the disk headers. Strictly speaking by design, AIX has no idea if the disks are used or not - but oracle will hold a lock on them while still allocated - which is a curse and a blessing for above reason - you will STILL wipe the header. For gpfs, the cluster itself should be able to tell you which disks it is using - try
command. For normal disks in VGs, a simple
will tell you which disks are not in use from LVM perspective.
Well, the problematic environement is some old AIX versiond (AIX 5.3) Any newer systems (from AIX6.1 and up) there is the
command, which can be asked to tell if a path is in open or closed state. Older systems do not have this. For MPIO, we used SDDPCM back then, but it did not support XIV storages, thus XIV LUNs needed theyr own driver.
The SDDPCM is able to report open/close states, as in the next example:
XIV tools do not provide this info.
only tells if paths are in Available state, or not (defined, missing, failed...) But that info is not enough to tell if the hdisk can be removed or not.
Well, there are hundreds of LUN-s and I would need an automated way to report unused disks.
Now, let's see the above 2 hdisks in your way:
The latter is reporting that the disk is managed by a 3rd party VG - in this case GPFS. But there is no output if the disk is idle or is actually opened by GPFS daemons.
Let's see the readvgda version:
It seems thad readvgda just tryed it's best to read what might be a VGDA block on the disks, but there is obviously no relevant info. I can not see relevant difference between the outputs from 'in use' and 'not in use' disks. Am I correct this way?
yes you are correct - that is why I asked yesterday what you meant with open - for both disks you get output - so the disks are open - so correctly zoned and readable/writable.
As stated before, as you have this strange mix of different types of disks, you will have to determine the hard way which ones you are using. I am guessing the asm disks have been defined by you via mknod command so you should be able via major/minor number to determine which those are - but I don't think you can find out if they are used or not without asking your DBAs what they have configured.
Hi,
Unable to make tape backup, please help.
/opt/ignite/bin/make_tape_recovery -a /dev/rmt/?mn -I -v -m tar -x inc_entire=vg00
* Creating local directories for configuration files and archive.
======= 04/25/16 16:28:08 IST Started /opt/ignite/bin/make_tape_recovery.
(Mon... (4 Replies)
Hello Forum,
I'm really in a fix now,
I'm getting this error message now, seems like the boot block is damaged?
When I do probe-all the system freezes...
Can any one guide me as what to do next?
System is Solaris 8 running Open Boot PROM 4
System also does not have a cd/dvd rom drive...
... (17 Replies)
I installed a new hard drive completely blank.
sun blade 150
openboot 4.10.6
message:
Boot device: disk:a File and args:
Bad magic number in disk label
Can't open label package
Evaluating:
Can't open boot device (15 Replies)
Hi all,
I am not sure whether anyone of you using XIV to copy vg from one host to another. After I managed to copy all the respective vg over to destination vg, and map all vg to destination and when come to varyonvg, I got the following error
0516-510 varyonvg: Physical volume not found for... (2 Replies)
Hi All,
Could anyone please help to resolve the below problem.
I installed RHEL5.5 in my desktop.But when i try to activate the ethernet connection then it gives me the error.
I spent 2 days for the above and go through with several suggestion found by googling. But no luck.
... (0 Replies)
Hi guys,
I had a solaris box, with veritas controled disk.
1 disc is showing soft errors, how can I repair the soft errors?
Please help.
Cheers; (4 Replies)
I've a Sun V440 machine, and it's running solaris 10 .. for some reason i need to install a fresh copy of solaris 10. for that i've prepared solaris 10 dvd but surprisingly i found there is no any dvd rom on this machine, so i've took a dvd rom from a V240 machine and inserted on V440.
after... (3 Replies)
I have a real emergency. I have a Sun Fire V240 UltraSparc server and am connected via the Serial Mgmnt Port with a Laptop. I have been building an Oracle database on it for the past couple months, not getting very far along with it , when suddenly, the system had a fatal crash. I've lost the... (2 Replies)
Hi i need help pls ...
Server type sun fire 3800 I need to install solaris 9 .
When i boot the system i recieve the following :
System Controller 'sunfire3800':
Type 0 for Platform Shell
Type 1 for domain A console
Type 2 for domain B console
Type 3 for... (5 Replies)