Operating System - HP-UX
1752866 Members
3579 Online
108791 Solutions
New Discussion юеВ

Re: checking disk before adding it to a VG

 
SOLVED
Go to solution
Abhik Sarkar_1
Occasional Advisor

checking disk before adding it to a VG

Hi everyone,

We have a number of spare disks which we reuse in our lab machines. Unfortunately, the disks aren't always clearly labelled.

Can I check what's already on a disk before I create a new PV/VG on it?

OS is HP-UX 11.00.
Server is K360 with HASS unit.

Thanks,
Abhik.
9 REPLIES 9
sajeesh_3
Occasional Advisor

Re: checking disk before adding it to a VG

hi abhik,

hi u are looking for diskinfo???

dd if=/dev/rdsk/c0t5d0 of=/dev/null
check the records in and records out..

you can also check the hard disk using STM.

regds
sajeesh
Bharat Katkar
Honored Contributor
Solution

Re: checking disk before adding it to a VG

Abhik,
One way what you can do is install the disk into server.

And do

# vgscan -p -v

See if can see anything in the disk. Before that identify your disk using:

# ioscan -fnC disk

Hope that helps.
Regards,
You need to know a lot to actually know how little you know
Joseph Loo
Honored Contributor

Re: checking disk before adding it to a VG

hi,

u will not be able to check or display the content of the disk. however, u may be able to check info about the disk, i.e.

# diskinfo /dev/rdsk/

regards.
what you do not see does not mean you should not believe
sajeesh_3
Occasional Advisor

Re: checking disk before adding it to a VG

sorry abhik,

I misunderstood your question..
A discussion on the same topic was just going on some times back.....

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=602666

with regards
naveej
Abhik Sarkar_1
Occasional Advisor

Re: checking disk before adding it to a VG

Bharat and Sajeesh. Thanks. You understood my question correctly and I have enough leads to look around.

Best regards,
Abhik.
Victor Fridyev
Honored Contributor

Re: checking disk before adding it to a VG

Hi,

In order to check whether a spare disk is OK, you can do the following:

After the disk connection to the computer run
ioscan -fnCdisk You have to see a new entry in the list. Run
insf -e -C disk in order to build all needed files.
Now in the output of ioscan -kfnCdisk you see /dev/dsk and dev/rdsk files for the disk.

The command diskinfo /dev/rdsk/cXtYdZ must responce immediately and give valid information.
dd if=/dev/rdsk/cXtYdZ of=/dev/null bs=32768k
should not give any i/o error.

In order to be sure 100% you can run
mediainit
for this disk.
Entities are not to be multiplied beyond necessity - RTFM
Abhik Sarkar_1
Occasional Advisor

Re: checking disk before adding it to a VG

Hi Victor,

Thanks for your answer. The disk is already visible in ioscan.

What I needed to know was that if it was ever part of a VG.

However, your suggestions on making sure that the disk is usable are good and I will use them.

Thanks,
Abhik.
Mohanasundaram_1
Honored Contributor

Re: checking disk before adding it to a VG

Hi Abhik,

Ioscan and diskinfo can tell you the disk being sensed by the OS. if you want to check if there are any LVM info, try pvcreate without "-f" option.

This will give you a warning if there are already LVM structures on this disk. If it contains LVM(already belongs to another volume group) then you can do a vgimport and mount the LVs of the imported VG.

This way you can check the data on the disks, if any. Beware, if you are using disk sectioning instead of LVM, pvcreate is not good Idea.In such case, try to mount the disk directly - mount /dev/dsk/c2t3d0 /mount_point.

Hope it helps.

Cheers,
Mohan.
Attitude, Not aptitude, determines your altitude
Simon Galton
Frequent Advisor

Re: checking disk before adding it to a VG

Abhik -- the best way to see if a disk has ever been part of a VG is to run a pvdisplay on it.

ie.

# pvdisplay /dev/dsk/c1t5d0

Compare the output of this to the output of a pvdisplay run against a disk in vg00.

To do that, run:
# vgdisplay -v vg00

and look to see which physical disks are included in volume group vg00, then run a pvdisplay on them.

Good luck,
Simon