how to remove the stale entry without a reboot??


 
Thread Tools Search this Thread
Operating Systems AIX how to remove the stale entry without a reboot??
# 1  
Old 07-25-2008
CPU & Memory how to remove the stale entry without a reboot??

my AIX server used to have scsi disk hdisk4. Now i removed that disk. But still it is still listed in lspv. So how can i remove the stale entry of it ?
# 2  
Old 07-25-2008
before removing the disk, i did a varyofvg on the only VG i had on it, and then did a exportvg..and then unmapped the disk from the HP array side
# 3  
Old 07-26-2008
Quote:
Originally Posted by navadeep
my AIX server used to have scsi disk hdisk4. Now i removed that disk. But still it is still listed in lspv.[..]
Did you remove the disk physically from the server without administrative action an the AIX side? Whenever you are going to remove a disk permanently from an AIX server you need to remove certain pieces of information from the system. You start with the LVM level: stop access to the filesystems, unmount the filesystems, varyoff the VG. Export the VG if you are sure that it will never return (on this particular disk). (Check exportvg and reducevg commands to find out which one applies to you) Then go on by removing the information at the device level: remove the disk's entries from the ODM with rmdev -dl. Only then remove the disk itself. Stick to this sequence as the LVM level commands depend on the ODM entries.
As to the lspv: lspv shows the disks that where available during boot time. Hence it would be better to use lsdev -Ccdisk (or from AIX 5.2 on lsdev -cdisk) to find out which disks are available in the system and whether they are active or defined.
# 4  
Old 07-28-2008
ok that gave some idea..how can i make sure this point "stop access to the filesystems". From user end, i am sure that i am not accessing it, how to check it from the OS side ??
# 5  
Old 07-28-2008
If you can umount it, you ain't using it. If you can't umount, one or more processes are accessing the FS. In this case use fuser and/or lsof (available from the IBM AIX Linux Toolbox page) to find out which process is the culprit.
# 6  
Old 07-29-2008
#set -vx
echo "What do you wish to delete?"
read ITEM
#>/tmp/odmdel.ksh
CLASS="CuAt CuDep CuDv CuDvDr CuVPD"
for i in $CLASS
do
odmget $i | grep $ITEM >/dev/null
if [ $? -eq 0 ];then
ATTR=`odmget $i | grep $ITEM | sort -n | uniq`
echo odmdelete -o $i -q `echo \"$ATTR\"| awk '{print $0}'` >> /tmp/odmdel.ksh
fi
done
chmod 700 /tmp/odmdel.ksh
# 7  
Old 03-26-2009
Thanks

Nice post. Thanks a lot.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. How to Post in the The UNIX and Linux Forums

Help me, write a bash script to delete parent entry with all their child entry in LDAP UNIX server

Hi All, Please help me and guide me to write a bash/shell script on Linux box to delete parent entry with all their child entries. example: Parent is : ---------- dn: email=yogesh.kumar@wipro.com, o=wipro, o=in child is: ---------- dn: cn: yogesh kumar, email=yogesh.kumar@wipro.com,... (1 Reply)
Discussion started by: Chand
1 Replies

2. HP-UX

Bypass stale PE ?

Hello, I have an ancient HP-UX 11.11 system where I have a logical volume marked stale and I can't get it sync'd. I have tried lvsync and lvreduce/lvextend to no avail. It is just one 4Mb PE on the disk that I can't get current. # lvdisplay -v /dev/vg00/lvol5 | grep stale LV Status ... (17 Replies)
Discussion started by: port43
17 Replies

3. Shell Programming and Scripting

sed remove cron entry

Hello, I am not having much luck with removing a entry in cron. I would like to get rid of the following line in /var/spool/cron/root. 1 09 * * 1-5 /etc/init.d/snmpd stop > /dev/null 2>&1I have tried this with no luck. sed -i 's#1 09 * * 1-5 /etc/init.d/snmpd stop >... (3 Replies)
Discussion started by: jaysunn
3 Replies

4. Shell Programming and Scripting

remove brackets and put it in a column and remove repeated entry

Hi all, I want to remove the remove bracket sign ( ) and put in the separate column I also want to remove the repeated entry like in first row in below input (PA156) is repeated ESR1 (PA156) leflunomide (PA450192) (PA156) leflunomide (PA450192) CHST3 (PA26503) docetaxel... (2 Replies)
Discussion started by: manigrover
2 Replies

5. UNIX for Advanced & Expert Users

remove file/inode entry

Hello all, I am on hpux itanium 11.31...and we run a oracle DB on it. I am testing some backup and restore situation.... first i select some data from the DB.....now i remove some files from the DB where my data is being selected from.....now i select the same data from the DB but i still get... (5 Replies)
Discussion started by: abdul.irfan2
5 Replies

6. AIX

How to remove the entry for the path in aix

Hi The below command shows as root@cbspsdb02 #export MQSI_USER_EXIT_PATH64=/opt/IBM/ITM/aix513/d4/KD4/config/wmb61/lib root@cbspsdb02 #print $MQSI_USER_EXIT_PATH64 /opt/IBM/ITM/aix513/d4/KD4/config/wmb61/lib I need to remove the entry for the path "$MQSI_USER_EXIT_PATH64". That is... (3 Replies)
Discussion started by: samsungsamsung
3 Replies

7. Shell Programming and Scripting

Remove copies/duplicates of same entry

Hi, I have a very big (with around 1 million entries) txt file with IPv4 addresses in the standard format, i.e. a.b.c.d The file looks like 10.1.1.1 10.1.1.1 10.1.1.1 10.1.2.4 10.1.2.4 12.1.5.6 . . . . and so on.... There are duplicate/multiple entries for some IP... (1 Reply)
Discussion started by: sajal.bhatia
1 Replies

8. HP-UX

How to remove swap file sys without reboot?

hi every body i am trying to remove logical volume i configured as a swap device but when i removed by smh i ran " swapinfo" it keeps the device and didn't feel that device removed also i "lvremove /dev/vg01/swapvol" also swapinfo not feel i want it feel that i reduced the swap without reboot... (4 Replies)
Discussion started by: maxim42
4 Replies

9. UNIX for Dummies Questions & Answers

Remove duplicate entry in one line

Can anyone help me how can i print only the unique entry in a line? MI_AP MI_AP MI_CM MI_MF RC_NAP MBS_AP SF_RAN MBS_AP NT_CAR so that it will on output the one unique entry per line. MI_AP MI_CM MI_MF RC_NAP MBS_AP SF_RAN NT_CAR I can't find the same situation on the knowledge... (5 Replies)
Discussion started by: kharen11
5 Replies

10. Solaris

remove an entry in crontab

Hi I have a crontab file of only 1 entry. When I edit it and delete the line, then do crontab -l, the crontab still show the entry that is supposed to be deleted. I did crontab -r to remove the crontab. Is there a way to delete just one entry in the crontab?? thx. (1 Reply)
Discussion started by: melanie_pfefer
1 Replies
Login or Register to Ask a Question