Operating System - HP-UX
1832993 Members
3614 Online
110048 Solutions
New Discussion

Re: Cannot vgreduce. Get permission denied. Logged in as root.

 
SOLVED
Go to solution
steve_586
Frequent Advisor

Cannot vgreduce. Get permission denied. Logged in as root.

HI,

Sure this is going to be something stupid but i am unable to reduce vg00 as it comes back with:

# vgreduce vg00 /dev/dsk/c2t6d0
vgreduce: Saving "/etc/lvmtab" to "/etc/lvmtab.$save$"Permission denied
vgreduce: Couldn't remove the entry "/dev/dsk/c2t6d0" from "/etc/lvmtab".
Permission denied

Passwd entry for root is root:eodTXNn4uMQ:0:0::/:/sbin/sh
Id for root is
uid=0(root) gid=0(root) groups=1(other),2(bin),3(sys),4(adm),5(daemon),6(mail),7
(lp),20(users)

Running HPUX 11.00

This all kicked off as i wanted to run an ignite but it fails with a sveconfig error as follows:
lssf: Must specify a special_file
usage: lssf special_file ...
save_config: error - unknown disk type for , not SCSI or HPFL
save_config: error - cannot determine root disk
ERROR: /opt/ignite/bin/save_config failed

Which i think is also related to my bizzare root permission issue. Any suggestions at all please?

Thanks for taking the time to read this.





6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Cannot vgreduce. Get permission denied. Logged in as root.

Shalom,

Remove all logical volumes from the disk you wish to vgreduce out of the volume group. If you boot off of it you can't vgreduce it.

man lvremove

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
steve_586
Frequent Advisor

Re: Cannot vgreduce. Get permission denied. Logged in as root.

Hi Steve,
The disk is coming up unavaliable and a pvdisplay shows nothing on it. No lvols.

After looking at previous posts close to this problem i started leaning towards an LVM issue as being the reason why i could not Ignite. I found that vg00 contained 2 disks but 1 was unavaliable so i thought it would cure that first. This is not isolated to vgreduce, if i vgscan -p i get :
# vgscan -p
lvm: /dev/config - permission denied.
Unable to scan "Physical volumes" on system

Cheers
steve_586
Frequent Advisor

Re: Cannot vgreduce. Get permission denied. Logged in as root.

Can anyone assit me at all? I need to get an ignite of this server and at the moment
i am stuck for ideas!

Many Thanks
Robert-Jan Goossens
Honored Contributor
Solution

Re: Cannot vgreduce. Get permission denied. Logged in as root.

Hi,

check the permissions of the lvm commands in /usr/sbin and compare them to the lvm commands in /sbin.

Example,

ll /usr/sbin/vgreduce
and
ll /sbin/vgreduce

Robert-Jan
James R. Ferguson
Acclaimed Contributor

Re: Cannot vgreduce. Get permission denied. Logged in as root.

Hi Steve:

My thinking is similar to Robert-Jan.

The LVM commands in '/usr/sbin' and '/sbin' must be owned by 'root' and have their 'setuid' bit set:

# ls -l /sbin/vgreduce /usr/sbin/vgreduce
-r-sr-xr-x 31 root sys 925696 Jul 4 11:19 /sbin/vgreduce
-r-sr-xr-x 31 root sys 573440 Jul 4 11:19 /usr/sbin/vgreduce

The commands in '/sbin' use statically linked libaries and are larger in size. They can be used when '/usr' isn't mounted. The ones in '/usr/sbin' use dynamically linked librarirs and provide internationalization features too. Hence, do not copy those in '/usr/sbin' to '/sbin'.

If the permissions and ownership of 'vgreduce' are wrong, chaning it will change the commands 'vgsync', 'vgreduce', etc. since the LVM commands are hard-links of one another.

Regards!

...JRF...
steve_586
Frequent Advisor

Re: Cannot vgreduce. Get permission denied. Logged in as root.

A great big thank for your help on this. It was down to permissions. Once i changed 'vgchange' i got :

/var/opt/ignite/recovery/2007-12-21,14:53/system_cfg vg00
save_config: error - vg00 not in the volume/disk group
ERROR: /opt/ignite/bin/save_config failed

Went into /sbin and the ownerships and groups were all over the place! Changed the whole dir to the same as our other HP server and presto, Ignite works!! You made my day guys !!! Happy holidays :)