Operating System - HP-UX
1836512 Members
2145 Online
110101 Solutions
New Discussion

confusion about logic volume

 
iambluegary
Advisor

confusion about logic volume

i have question about logic volume:
i know command:
lvchange -p r /dev/vg01/lvol1 is to change lvol1 to read-only

however,my question is what can i do to affirm that the volume could be written now ,and when it change to read-only ,how can i affirm the change has been done.

of course ,i know i can check the attribution of the volume,i just wanna know other ways to do it.
help ,help,help :-)
3 REPLIES 3
Clemens van Everdingen
Honored Contributor

Re: confusion about logic volume

Hi,

How about when you set the lvol to read-only and try then to write a file in the lvol.

If possible it's not read only, and if not possible it's read-only.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
John Carr_2
Honored Contributor

Re: confusion about logic volume

Hi

touch testfile
ls testfile

if its there your NOT read only , the touch should fail if read only.

John.
U.SivaKumar_2
Honored Contributor

Re: confusion about logic volume

hi,
we can use lvchange command with following options for changing permissions.
-r - readonly
-w - read-write
To check whether this works , simple way is to
create a file in the filesystem of the logical
volume in which you assigned permission,
I an not sure about the logic how it works, but i think that some bits will get changed for that logical volume's device file(eg./dev/vg02/lvol1), when you change permission.

regards,
U.SivaKumar
Innovations are made when conventions are broken