Operating System - HP-UX
1836579 Members
1761 Online
110102 Solutions
New Discussion

Re: vgimport error "not a directory"

 
SOLVED
Go to solution
GerGon
Regular Advisor

vgimport error "not a directory"

Hi gurus...

I try to do a vgimport but there is a problem
1fst a do a mkdir /dev/vgdatos
2nd mknod /dev/vgdatos/group c 64 0x010000
3th
[root@caribe]/dev/vgdatos> vgimport -v -m /disco36pacifico /dev/dsk/c2t0d0
Beginning the import process on Volume Group "/dev/dsk/c2t0d0".
vgimport: Cannot open the control file "/dev/dsk/c2t0d0/group":
Not a directory
[root@caribe]/dev/vgdatos> cd ..
[root@caribe]/dev> find ./ -name group -print
./vg00/group
./vgdatos/group
[root@caribe]/dev> ll /dev/vg*/group
crw-r----- 1 root sys 64 0x000000 Oct 10 2002 /dev/vg00/group
crw-rw-rw- 1 root sys 64 0x010000 May 25 10:52 /dev/vgdatos/group


What I skip or What can I do?
29 REPLIES 29
melvyn burnard
Honored Contributor
Solution

Re: vgimport error "not a directory"

you have left out the vgname from the command
try
vgimport -v -m /disco36pacifico vgdatos /dev/dsk/c2t0d0

from the man page

/usr/sbin/vgimport [-m mapfile] [-p] [-v] [-f infile] vg_name dev_path
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
erics_1
Honored Contributor

Re: vgimport error "not a directory"

try...

vgimport -m /disco36pacifico vgdatos /dev/dsk/c2t0d0

That should do it.

Regards,
Eric
Devender Khatana
Honored Contributor

Re: vgimport error "not a directory"

Hi,

Yes as Melvyn suggested you have not specified vgname in command and it is taking disk device file as vgname which does not exit.

HTH,
Devender
Impossible itself mentions "I m possible"
GerGon
Regular Advisor

Re: vgimport error "not a directory"

Thanks to all...

It alreday executed, there are some wear follow the command:
[root@caribe]/dev> vgimport -v -m /disco36pacifico vgdatos /dev/dsk/c2t0d0
Beginning the import process on Volume Group "vgdatos".
vgimport: Warning: Volume Group belongs to different CPU ID.
Can not determine if Volume Group is in use on another system. Continuing.
vgimport: Warning: Volume Group contains "0" PVs, "1" specified. Continuing.
vgimport: Quorum not present, or some physical volume(s) are missing.
Logical Volume is not defined on any physical volume.
"/dev/vgdatos/lvdatos" is missing Physical Volumes.
Logical Volume is not defined on any physical volume.
"/dev/vgdatos/lvcoolbk" is missing Physical Volumes.
Volume group "/dev/vgdatos" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
Devender Khatana
Honored Contributor

Re: vgimport error "not a directory"

Hi,

It means the VG was spanning across more that one disk which you are mentioning in vgimport. Is it a shared VG ?

Try giving all disks as argument. Also as it has allready been created try to activate with
#vgchange -a y -q n /dev/vgdatos
#vgdisplay -v /dev/vgdatos to see the config imported for verification.

HTH,
Devender
Impossible itself mentions "I m possible"
GerGon
Regular Advisor

Re: vgimport error "not a directory"

I jut try to activete but:
[root@caribe]/dev> vgchange -a y /dev/vgdatos
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c2t0d0":
Cross-device link
vgchange: Warning: couldn't query physical volume "/dev/dsk/c2t0d0":
The specified path does not correspond to physical volume attached to
this volume group
vgchange: Warning: couldn't query all of the physical volumes.
vgchange: Couldn't activate volume group "/dev/vgdatos":
Quorum not present, or some physical volume(s) are missing.

[root@caribe]/dev> ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 1 0/0/1/1.2.0 sdisk CLAIMED DEVICE SEAGATE ST318404LC
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 4 0/0/2/0.0.0 sdisk CLAIMED DEVICE HP 36.4GATLAS10K3_36_SCA
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 2 0/0/2/0.2.0 sdisk CLAIMED DEVICE FUJITSU MAJ3182MC
/dev/dsk/c2t2d0 /dev/rdsk/c2t2d0
disk 0 0/0/2/1.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 305
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
GerGon
Regular Advisor

Re: vgimport error "not a directory"

Khatana, it does not work
[root@caribe]/dev> vgchange -a y -q n /dev/vgdatos
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c2t0d0":
Cross-device link
vgchange: Warning: couldn't query physical volume "/dev/dsk/c2t0d0":
The specified path does not correspond to physical volume attached to
this volume group
vgchange: Warning: couldn't query all of the physical volumes.
vgchange: Couldn't activate volume group "/dev/vgdatos":
Quorum not present, or some physical volume(s) are missing.

[root@caribe]/dev> vgdisplay -v /dev/vgdatos
vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "/dev/vgdatos".
[root@caribe]/dev>
Devender Khatana
Honored Contributor

Re: vgimport error "not a directory"

Hi,
Try to run diskinfo on this disk. If it is OK it will display some information of disk size.

#diskinfo -v /dev/rdsk/c2t0d0

Output from my server.

server1:/dev/dsk>>diskinfo -v /dev/rdsk/c0t6d0
SCSI describe of /dev/rdsk/c0t6d0:
vendor: HP 73.4G
product id: ST373307LC
type: direct access
size: 71687369 Kbytes
bytes per sector: 512
rev level: HPC5
blocks per disk: 143374738
ISO version: 0
ECMA version: 0
ANSI version: 3
removable media: no
response format: 2
(Additional inquiry bytes: (32)48 (33)5a (34)39 (35)36 (36)38 (37)44 (38)37 (39)20 (40)20 (41)20 (42)20 (43)20 (44)20 (45)20 (46)20 (47)20 (48)20 (49)20 (50)20 (51)f (52)0 (53)0 (54)60 (55)a (56)dc (57)b (58)59 (59)3 (60)1 (61)3 (62)22 (63)0 (64)0 (65)0 (66)0 (67)0 (68)0 (69)0 (70)0 (71)0 (72)0 (73)0 (74)0 (75)0 (76)0 (77)0 (78)0 (79)0 (80)0 (81)0 (82)0 (83)0 (84)0 (85)0 (86)0 (87)0 (88)0 (89)0 (90)0 (91)0 (92)43 (93)6f (94)70 (95)79 (96)72 (97)69 (98)67 (99)68 (100)74 (101)20 (102)28 (103)63 (104)29 (105)20 (106)32 (107)30 (108)30 (109)33 (110)20 (111)53 (112)65 (113)61 (114)67 (115)61 (116)74 (117)65 (118)20 (119)41 (120)6c (121)6c (122)20 (123)8 (124)8b (125)b9 (126)92 (127)0 (128)0 (129)2 (130)0 (131)77 (132)fd (133)e0 (134)38 (135)77 (136)ff (137)6 (138)14 )


HTH,
Devender
Impossible itself mentions "I m possible"
GerGon
Regular Advisor

Re: vgimport error "not a directory"

This is the out from command

[root@caribe]/dev> diskinfo -v /dev/rdsk/c2t0d0
SCSI describe of /dev/rdsk/c2t0d0:
vendor: HP 36.4G
product id: ATLAS10K3_36_SCA
type: direct access
size: 35566480 Kbytes
bytes per sector: 512
rev level: HP05
blocks per disk: 71132960
ISO version: 0
ECMA version: 0
ANSI version: 2
removable media: no
response format: 2
(Additional inquiry bytes: (32)55 (33)4d (34)48 (35)46 (36)58 (37)37 (38)34 (39)20 (40)20 ........... etc..etc..etc..

erics_1
Honored Contributor

Re: vgimport error "not a directory"

What is the vgexport command that was used to create this mapfile?

What is the output of -->strings /etc/lvmtab

Eric
GerGon
Regular Advisor

Re: vgimport error "not a directory"

The command was:
vgexport -m disco36pacifico -p -v vgdatos

The string on vgimport server was:
[root@caribe]/dev> strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t2d0
/dev/dsk/c2t2d0
/dev/vgdatos
/dev/dsk/c2t0d0
Devender Khatana
Honored Contributor

Re: vgimport error "not a directory"

Hi,

Your disk seems to be allright. The problem what now left is other disks of your volume group. Was this VG on some other host earlier and now you are trying to recover it?

Also check current disk utilization status by
#pvdisplay -v /dev/dsk/c2t0d0

It will tell you how many LE's of how many LV's were allocated to this disk. Also note that for a LV to be recovered from one disk of a multiple disk VG, all the Logical Extents of that LV should be allocated to that disk.

If any LV was fully allocated to this disk you will be able to recover it otherwise not unless you import VG with other disks as well.
Impossible itself mentions "I m possible"
GerGon
Regular Advisor

Re: vgimport error "not a directory"

Kathana,

This vgdatos come from other server, now, at this server I never do a pvcreate because the disk was moved from the other server...????

[root@caribe]/dev> pvdisplay -v /dev/dsk/c2t0d0
pvdisplay: Warning: couldn't query physical volume "/dev/dsk/c2t0d0":
The specified path does not correspond to physical volume attached to
this volume group
pvdisplay: Warning: couldn't query all of the physical volumes.
pvdisplay: Couldn't retrieve the names of the physical volumes
belonging to volume group "/dev/vgdatos".
pvdisplay: Cannot display physical volume "/dev/dsk/c2t0d0".
Denver Osborn
Honored Contributor

Re: vgimport error "not a directory"

Hi,

Can you post a bit more info on what led upto this point where you're importing vgdatos to this system?

I'm guessing by the HP05 f/w that this was VG/disk was removed from another HP-UX system to be imported here?

Also, have you tried "ioscan -fnCdisk" followed by "insf -e -Cdisk" then importing? How was the disk added... etc...

Any details would help troubleshoot.

-denver
GerGon
Regular Advisor

Re: vgimport error "not a directory"

It suppouses that the disk have all information there, that is why, I didn't use pvcreate...
Fortheremore, I didn't use mknod too..!!!
Denver Osborn
Honored Contributor

Re: vgimport error "not a directory"

The odd thing is the import said "vgimport: Warning: Volume Group contains "0" PVs, "1" specified. Continuing."

The question is why?? :)

Is it possible you pulled the wrong disk that didn't contain the VG?

-denver
GerGon
Regular Advisor

Re: vgimport error "not a directory"

Denver, I didn't do anything on the disk..

I only out the disk from other server and get into this server, I checked by ioscan, I suppouse that when I use vgimport with driver path that all right..
Maybe I lost or skip some command?????
As you see on the top at this thread I only do that..
Devender Khatana
Honored Contributor

Re: vgimport error "not a directory"

Hi,

Nobody has asked you to do a pvcreate here. mknod will not remove any data from the disk and is must for a vgimport. The group file in /dev/vgdatos os created through mknod command only. I think your disk has some problem is getting accessed. Can you try by putting all disks of that old VG and then import.

Probably map file was not a proper one. Can you try importing without map file.
#vgimport /dev/vgdatos /dev/dsk/c2t0d0
And see what happens. But try to import other disks as well if you can.

HTH,
Devender
Impossible itself mentions "I m possible"
GerGon
Regular Advisor

Re: vgimport error "not a directory"

Denver, It is not possible because the server where the disk came from only has one 36gb disk without mirror, standalone, while the system operating has in 1 mirror 18Gb disk...

Denver Osborn
Honored Contributor

Re: vgimport error "not a directory"

I agree w/ Devender and because of the prob you had importing on the new box, I'd want to place the disk back in the original box and import it back to verify it's good and the data is there.

-denver
GerGon
Regular Advisor

Re: vgimport error "not a directory"

Devender,

#vgimport /dev/vgdatos /dev/dsk/c2t0d0
vgimport: Volume group "/dev/vgdatos" already exists in the "/etc/lvmtab" file.

Can I erase all vgdatos and related and try to do it again??
Maybe I lost some step here...

Which are the ight steps?
i.e.
1. vgremove
2. ...
3. ..
4. rmsf -H 0/0/2/0.0.0
5. Get out the disk
6. get in the disk again
7. what next steps...
GerGon
Regular Advisor

Re: vgimport error "not a directory"

I erase old tracks and information from the other server where the disk and vgexport was done..
GerGon
Regular Advisor

Re: vgimport error "not a directory"

I backup the disk information before remove it from other server..

is it better, create manually all, pvcrate, mknod, vgcreate, vlcreate, etc..

I now that the data on the disk will erased, but I can restore from backup after set all..?
Devender Khatana
Honored Contributor

Re: vgimport error "not a directory"

Hi,

Just at last try this before going for backup restoration.
vgremove is not required here. just do
#vgexport /dev/vgdatos ( will remove entry from /etc/lvmtab confirm by 'strings /etc/lvmtab")
& then retry vgimport.
rmsf and reinseting disk will not help.

HTH,
Devender
Impossible itself mentions "I m possible"