Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

physically removing a disk 3

Status
Not open for further replies.

aixlurker

Technical User
Jun 20, 2002
39
PH
there are 5 disks attached to the scsi cable. i want to remove hdisk1. how to determine the actual disk corresponding to hdisk1?

thanks,
 
Hello,
enter the command

# lsdev -C -c disk

In my system the output is:

hdisk0 Available 04-C0-00-0,0 Other SCSI Disk Drive

04-C0-00- identify the scsi adapter (location, channel..).

0,0 is the scsi address of your devices. The address is
the fisrt 0 (before comma), the second is the logical units
(usually not used in simple devices ).
eg

# lsdev -C -s scsi
hdisk0 Available 04-C0-00-0,0 Other SCSI Disk Drive
cd0 Available 04-C0-00-3,0 SCSI Multimedia CD-ROM Drive

the address of cdrom is 3.

When you have retrived scsi address of hdisk1, by one of these command, put you attention at physical disks:
look for the devices that has set this address. If your
disks are external, probably there is a knob showing the address. If disks are internal (to risc or a storage system), this can be more difficult. In this case the address is set by jumpers: for each disk (they can be not equal each to other) retrieve the meaning of jumper position, and label each disk with the scsi address.

When yoy have found the physical disk with adrress = hdisk1-adress, you can remove it.

Halt ! Don't do it now.

enter the command

lspv

( in my system
# lspv
hdisk0 009260800c32f43f rootvg
)

If the disk is a member of a vg (Volume group), this is
not the moment to do this action.

Case 1:
-------
# lspv
hdisk0 009260800c32f43f rootvg
hdisk1 9983749328498327 none

OK :

enter

rmdev -l hdisk1 -d

shutdown the system, make hardware ops, then boot.


CASE 2:
-------
# lspv
hdisk0 009260800c32f43f rootvg
hdisk1 9983749328498327 myvg

If you know the content oh myvg

(enter lsvg -l myvg )

and you don't need them or you have baked up, enter

( if there are secondary paging spaces, mark them to
not be used at next reboot, reboot, remove sec.(s) ps.
Use "smitty pgsp" to do this).

Then

exportvg myvg ( use smit for right flags )

This command deletes all references to myvg and its jfs
from the ODM ( system DNA ); moreover, you can use this
disk with its data in an othe system after an importvg.

At this step you are in the situation of CASE 1, continue.


CASE 3: (more difficult)
-------
# lspv
hdisk0 009260800c32f43f rootvg
hdisk1 9983749328498327 myvg
hdisk2 9983749328498327 myvg

the disk that I want remove is not alone in the VG.

Enter:
# lspv -l hdisk1

( in my system )
hdisk0:
LV NAME LPs PPs DISTRIBUTION MOUNT POINT
hd5 1 1 01..00..00..00..00 N/A
temp 40 40 20..19..01..00..00 /home/temp
hd6 32 32 00..32..00..00..00 N/A
lv00 21 21 00..21..00..00..00 /usr/catia
lv01 7 7 00..07..00..00..00 /home/catadm
hd3 32 32 00..30..02..00..00 /tmp
hd8 1 1 00..00..01..00..00 N/A
hd4 1 1 00..00..01..00..00 /
hd2 66 66 00..00..66..00..00 /usr
hd9var 4 4 00..00..04..00..00 /var
hd1 1 1 00..00..01..00..00 /home

A) remove all lvs from this disk ( rmfs myjfs )
or move them in another disk (it is not easy)
(another problem can be if the disk contains a jfslog)

B) reducevg ( use smitty vg, Set charact., Remove a phy.)

At this step you are in the situation of CASE 1, continue.

-------

Removing a disk, gives you more opportunity to learn AIX
than adding one !

Bye
 
1.ALso,If the disk led is visible - I do "dd" from each disk and observe which led blinks:

dd if=/dev/hdiskx of=/dev/null bs=1024 count=2

2.If it was a 6F1 machine - you could blink the disk led directly :

diag -c -d hdisk3 -T"identifyRemove -a identify" "Long live king Moshiach !"
h
 
Hi,

levw
very interesting your trik, I have used, but to see
some activities I have had to use higer values as:
bs=8192 count=20 ( or 200 )

thank.
 
i tried to use the dd command to see a lgiht but i did not see it. i tried to open the cover and determine the disk address on the scsi but, i can't see any jumper set on each disk ( both of them is cleared with jumpers). worse, i removed the wrong disk and booted the machine.

realizing taht i made a mistake, i shutdown the machine and installed back the hdisk. on the boot process, the file system that belongs to it was not automatically mounted. at the prompt, i noticed that the vg was not varied on. when i issue the vary-on command, it could not be varied on, rather it suggested to use redefinevg and scynlvodm. at the prompt, i issue the command:

#lspv hdisk2

the result, only the ff are filled with data:

Physical Volume: hdisk2 VG group: datavg
PV Identifier: 002300053ffff153ffc VG Identifier:002000..

the remaining fileds are all field with 5 question marks, as in ?????

i tried redefinevg but it can't run against the disk.

how do i recover the vg?

note: the datavg contains only 1 disk, hdisk2 originally.

need your help...

 
Hi,

something is not clear :

1) by which criterion you have choosen the physical disk
to remove. At this step you must have a perfect
know of your map hdiskX <-> physical device.

2) which is the output of: lsdev -C -c disk:
is hdisk2 available or defined ?
All your disks must be Available, as before the
beginning of your HW operations.

3) how I have suggested i my 2 post use a more consistent
I/O by dd command as:
dd if=/dev/hdiskx of=/dev/null bs=8192 count=200

If after entering command, you don't see light, if
you repeat the command, on the same disk, increase
to 2000 or bs value ( the system may use cache, and
dont read abain the same data )

4) probably hdisk2 is not available: if you have not seen
jumpers, probably you have not full control of hardware
environment. Don't use commands as synclvodm or other
delicate one, if disks are not availabe: you risk to
commit in ODM a dirty situation.

However, until hdisk2 is not available, does not exists
command that can help you.

Be patient with WH and jumpers !
Bye.
 
victorv,
hdisk2 is available, but the datavg cannot be varied-on. the lspv hdisk2 gives:

#lspv hdisk2

Physical Volume: hdisk2 VG group: datavg
PV Identifier: 002300053ffff153ffc VG Identifier:0020005bla...
PV state:?????
the remaining fileds are all field with 5 question marks, as in PV state:?????

actually, it wasn't me who removed the disk. it was their administrator



 
Hi,

be sure of HW, hdisk2 is effectively the previous
( no orher disk defined).
shutdown - poweroff - poweron .

try to use advanced command as:

synclvodm
redefinevg
varionvg ( smitty varionvg, FORCE ).

my competences stops here; I am not able to manage
command ad odmget and so on.

If you cannot receive further support, and you have data backup, to remove datavg use exportvg ( I remeber that
a normal remove requires vg active).

Good luck.

 
Too late for this I imagine, but if you do not have SCSI jumpers then would you not be using hot-swap devices? These sort of disks have their SCSI-ID set by position. However since you said &quot;cable&quot; I suspect they should somehow be set by jumper, on disk in the &quot;normal&quot; fashion. Do you know the model/machine type, by chance? IBM Certified -- AIX 4.3 Obfuscation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top