Operating System - HP-UX
1752618 Members
4501 Online
108788 Solutions
New Discussion юеВ

/etc/lvmconf/vg00.conf corrupted

 
de gavre
Occasional Advisor

/etc/lvmconf/vg00.conf corrupted


Our backup system gives the following message
cannot stat /etc/lvmconf/vg00.conf: No such device or address

Any command that requires an access on this file failed ( as to add a LV in vg00 for example)

I'm able to create a backup of the volume group configuration file using
vgcfgbackup -f /tmp/vg00.backup vg00

but, how to use it to repair the corrupted one ?

Sorry if my question is trivial, I'm a beginner in the HP-UX world .

Thanks for your help

Flo
20 REPLIES 20
Pete Randall
Outstanding Contributor

Re: /etc/lvmconf/vg00.conf corrupted

Flo,

Try "cp /tmp/vg00.backup etc/lvmconf/vg00.conf".


Pete

Pete
de gavre
Occasional Advisor

Re: /etc/lvmconf/vg00.conf corrupted

already done of course

I got the error message
cp: cannot create vg00.conf: No such device or address

Moreover I can see vg00.conf in /etc/lvmconf using the ls command ( with no argument)
but an ls -l vg00.conf fails with the error message
./vg00.conf not found
Helen French
Honored Contributor

Re: /etc/lvmconf/vg00.conf corrupted

Try this command:

# vgcfgbackup -u /dev/vg00
Life is a promise, fulfill it!
James R. Ferguson
Acclaimed Contributor

Re: /etc/lvmconf/vg00.conf corrupted

Hi:

"Cannot stat" simply means the file is non-existent or that you do not have the permissions to open it. The error does not infer corruption.

I suspect that your backup isn't running as root. The binary for 'vgcfgbackup' is setuid for root, so it would have the ability to create a new file in '/etc/lvmconf' regardless of the directory permissions.

Regards!

...JRF...
Geoff Wild
Honored Contributor

Re: /etc/lvmconf/vg00.conf corrupted

Just get rid of the the corrupt one:

mv /etc/lvmconf/vg00.conf /etc/lvmconf/vg00.conf.bad
vgcfgbackup vg00

Retry the backup...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
rariasn
Honored Contributor

Re: /etc/lvmconf/vg00.conf corrupted

Hi,

Verify directory backup:

# ll -d /etc/lvmconf
drwxr-xr-x 5 root root 13312 Mar 3 03:51 /etc/lvmconf


# mv /etc/lvmconf/vg00.conf /etc/lvmconf/vg00.conf.old

# vgcfgbackup vg00

ran
de gavre
Occasional Advisor

Re: /etc/lvmconf/vg00.conf corrupted

thanks for your replies
Shiju : vgcgfbackup -u /dev/vg00 doesn't work

vgcfgbackup: Configuration file "/etc/lvmconf/vg00.conf" not found or is corrupted

James : the command is launched by root ... but it doesn't work

Geof : I can't move the file
mv: vg00.conf: cannot access: No such device or address

rasiasn : the rights on the directory are correct
drwxr-xr-x 2 root root 8192 Mar 2 18:06 /etc/lvmconf
--> yesterday date because I tried a 'vgscan'



de gavre
Occasional Advisor

Re: /etc/lvmconf/vg00.conf corrupted

thanks for your replies
Shiju : vgcgfbackup -u /dev/vg00 doesn't work

vgcfgbackup: Configuration file "/etc/lvmconf/vg00.conf" not found or is corrupted

James : the command is launched by root ... but it doesn't work

Geof : I can't move the file
mv: vg00.conf: cannot access: No such device or address

rasiasn : the rights on the directory are correct
drwxr-xr-x 2 root root 8192 Mar 2 18:06 /etc/lvmconf
--> yesterday date because I tried a 'vgscan'


Flo
Victor BERRIDGE
Honored Contributor

Re: /etc/lvmconf/vg00.conf corrupted

Hi Flo,
You cant move something that doesnt exist so lets start again, what is in /etc/lvmconf?
Do you see vg00.conf?


Courage!

All the best
Victor