[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] Unexpected write access to LV



Hi,

I have been testing my system and had expected to be able to use the
"lvchange -pr" and "lvchange -prw" options to enable/disable the write
access to a logical volume.  It seems that although "lvs" reports the
read/write status according to the most recent command, this does not
reflect the true read/write access to the logical volume.  It seems that you
have to perform a "lvchange -an" then "lvchange -ay" to apply the read/write
access rights to the logical volume.

You can see an example below...

This doesn't make sense and it doesn't match the man page for the lvchange
command.

Can anyone shed light on this ?

Thanks,

Roger

NewWombat:~# uname -a
Linux NewWombat 2.6.16.20.rwl1 #1 Fri Jun 9 15:23:04 BST 2006 i686 GNU/Linux
NewWombat:~# lvm --version
  No such command.  Try 'help'.
NewWombat:~# lvs --version
  LVM version:     2.02.06 (2006-05-12)
  Library version: 1.02.07 (2006-05-11)
  Driver version:  4.5.0
NewWombat:~# lvs
  LV          VG          Attr   LSize  Origin Snap%  Move Log Copy%
  backupimage clientstore -ri-a- 60.00G
  root        clientstore -wi-ao  5.00G
  userdisk    clientstore -wi-ao 60.00G
NewWombat:~# dd if=/dev/zero of=/dev/clientstore/backupimage bs=64K count=1
dd: writing `/dev/clientstore/backupimage': Operation not permitted
1+0 records in
0+0 records out
0 bytes transferred in 0.015371 seconds (0 bytes/sec)
NewWombat:~# lvchange -prw /dev/clientstore/backupimage
  Logical volume "backupimage" changed
NewWombat:~# lvs
  LV          VG          Attr   LSize  Origin Snap%  Move Log Copy%
  backupimage clientstore -wi-a- 60.00G
  root        clientstore -wi-ao  5.00G
  userdisk    clientstore -wi-ao 60.00G
NewWombat:~# dd if=/dev/zero of=/dev/clientstore/backupimage bs=64K count=1
dd: writing `/dev/clientstore/backupimage': Operation not permitted
1+0 records in
0+0 records out
0 bytes transferred in 0.004415 seconds (0 bytes/sec)
NewWombat:~# lvchange -an /dev/clientstore/backupimage
NewWombat:~# lvs
  LV          VG          Attr   LSize  Origin Snap%  Move Log Copy%
  backupimage clientstore -wi--- 60.00G
  root        clientstore -wi-ao  5.00G
  userdisk    clientstore -wi-ao 60.00G
NewWombat:~# lvchange -ay /dev/clientstore/backupimage
NewWombat:~# lvs
  LV          VG          Attr   LSize  Origin Snap%  Move Log Copy%
  backupimage clientstore -wi-a- 60.00G
  root        clientstore -wi-ao  5.00G
  userdisk    clientstore -wi-ao 60.00G
NewWombat:~# dd if=/dev/zero of=/dev/clientstore/backupimage bs=64K count=1
1+0 records in
1+0 records out
65536 bytes transferred in 0.000942 seconds (69568756 bytes/sec)
NewWombat:~# lvchange -pr /dev/clientstore/backupimage
  Logical volume "backupimage" changed
NewWombat:~# dd if=/dev/zero of=/dev/clientstore/backupimage bs=64K count=1
1+0 records in
1+0 records out
65536 bytes transferred in 0.000962 seconds (68118616 bytes/sec)
NewWombat:~# lvchange -an /dev/clientstore/backupimage
NewWombat:~# lvs
  LV          VG          Attr   LSize  Origin Snap%  Move Log Copy%
  backupimage clientstore -ri--- 60.00G
  root        clientstore -wi-ao  5.00G
  userdisk    clientstore -wi-ao 60.00G
NewWombat:~# lvchange -ay /dev/clientstore/backupimage
NewWombat:~# lvs
  LV          VG          Attr   LSize  Origin Snap%  Move Log Copy%
  backupimage clientstore -ri-a- 60.00G
  root        clientstore -wi-ao  5.00G
  userdisk    clientstore -wi-ao 60.00G
NewWombat:~# dd if=/dev/zero of=/dev/clientstore/backupimage bs=64K count=1
dd: writing `/dev/clientstore/backupimage': Operation not permitted
1+0 records in
0+0 records out
0 bytes transferred in 0.004422 seconds (0 bytes/sec)
NewWombat:~#



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]