This command is used to update attributes of a logical volume. Which allows you to modify the state of an LV, like activating or deactivating it, or modify its properties or resizing it, changing its name, or its access permissions
- About lvchange : To change attributes of a logical volume
- It comes from “lvm2-2.02.72” package.
- Configuration Files:
- Path : /sbin/lvchange
Examples:
1. To control the availablability of logical volumes
# lvchange -a LV00 # lvchange –available LV00 # lvchange -ay LV00 (To activate) # lvchange -an LV00 (To deactivate) # lvchange -aey LV00 (In Cluster – Activate in one node) # lvchange -aly LV00 (In Cluster – Activate in local node) # lvchange -aln LV00 (In Cluster – deactivate in local node) |
2. To set or reset the contiguous allocation policy for logical volumes
# lvchange -C y|n LV00 # lvchange –contiguous y|n LV00 |
3. To force the complete resynchronization of a mirror
# lvchange –resync LV00 |
4. To set the minor number
# lvchange –minor minor LV00 |
5. To start or stop monitoring a mirrored or snapshot logical volume with dmeventd
# lvchange –monitor y|n LV00 |
6. To poll a logical volume to restart its previous incomplete transactions
# lvchange –poll y|n LV00 |
7. To invoke lvchange from early system initialisation scripts (e.g. rc.sysinit or an initrd)
# lvchange –sysinit LV00 |
8. To disable udev synchronization
# lvchange –noudevsync LV00 |
9. To make no attempt to interact with dmeventd unless –monitor is specified
# lvchange –ignoremonitoring LV00 |
10. To set to y to make the minor number specified persistent
# lvchange -M y|n LV00 # lvchange –persistent y|n LV00 |
11. To change access permission to read-only or read/write
# lvchange -p r|rw LV00 # lvchange –permission r|rw LV00 |
12. To set read ahead sector count of this logical volume.
# lvchange -r ReadAheadSectors|auto|none LV00 # lvchange –readahead ReadAheadSectors|auto|none LV00 |
13. To reload the logical volume metadata
# lvchange –refresh LV00 |
Related Commands: lvm, lvcreate, vgchange