This section describes how to check and set the properties of a volume Group and logical volume. The background information check and settings are as follows: check the status of all volume groups and logical volumes. Set the logical volume attributes of three volume groups: vgora, vgopt, and vgphydb. the attributes of other volume groups are automatically set by the platform installation software...
This section describes how to check and set the properties of a volume Group and logical volume.
Background information
The check and settings are as follows:
Check the status of all volume groups and logical volumes.
Set the logical volume attributes of three volume groups: vgora, vgopt, and vgphydb. the attributes of other volume groups are automatically set by the platform installation software and do not need to be set manually.
The following operations must be performed on a single or dual-host that has an external disk.
Procedure
Log on as the root user.
Check volume groups managed by ESX.
View the status of all volume groups.
# Vxdisk-o alldgs list
DEVICE TYPE DISK GROUP STATUS
Sda auto: none--online invalid
Sdb auto: cdsdisk-(vgora) online
Sdc auto: cdsdisk vgopt_1 vgopt online
Sdd auto: cdsdisk vgphydb_1 vgphydb online
This example shows:
Vgora is created for the volume GROUP on the DISK sdb. The value in the "DISK" column is "-" and the value in the "GROUP" column is enclosed in parentheses, indicating that the volume GROUP is disabled.
The volume GROUP vgopt is created on the DISK sdc. The value of the DISK column is "vgopt_1" and the value of the GROUP column is not in parentheses, indicating that the volume GROUP is enabled.
Enable the disabled volume group.
If a volume Group is disabled, skip this step. The following describes how to enable a vgora volume group.
# Vxdg import vgora
Note:
If the volume group is not required, run the following command to disable it: # vxdg deport vgora
Before you disable a volume group, make sure that the volume group is not used.
Check the status of the logical volume. take the logical volume in vgora of the volume group as an example.
# Vxprint-g vgora-v
Ty name assoc kstate length ploffs state TUTIL0 PUTIL0
V lvctl1 fsgen ENABLED 1024000-ACTIVE --
V lvctl2 fsgen ENABLED 1024000-ACTIVE --
V lvctl3 fsgen ENABLED 1024000-ACTIVE --
V lvredo1 fsgen ENABLED 2048000-ACTIVE --
V lvredo2 fsgen ENABLED 2048000-ACTIVE --
V lvredo3 fsgen ENABLED 2048000-ACTIVE --
V lvredo4 fsgen ENABLED 2048000-ACTIVE --
V lvredo5 fsgen ENABLED 2048000-ACTIVE --
V lvredo6 fsgen ENABLED 2048000-ACTIVE --
V lvspfile fsgen ENABLED 204800-ACTIVE --
V lvstdredo1 fsgen DISABLED 2048000-CLEAN --
V lvstdredo2 fsgen DISABLED 2048000-CLEAN --
V lvstdredo3 fsgen DISABLED 2048000-CLEAN --
V lvstdredo4 fsgen DISABLED 2048000-CLEAN --
V lvstdredo5 fsgen DISABLED 2048000-CLEAN --
V lvstdredo6 fsgen DISABLED 2048000-CLEAN --
V lvstdredo7 fsgen DISABLED 2048000-CLEAN --
V lvsysaux fsgen ENABLED 10240000-ACTIVE --
V lvsystem fsgen ENABLED 4096000-ACTIVE --
V lvtemp fsgen ENABLED 8192000-ACTIVE --
V lvundo fsgen ENABLED 12288000-ACTIVE --
V lvuser fsgen ENABLED 4096000-ACTIVE --
This example shows that the logical volume with the "KSTATE" column as "DISABLED" is DISABLED.
Start the logical volume.
If a logical volume is disabled, skip this step. The following command activates all logical volumes in vgora.
# Vxvol-g vgora startall
Modify the attributes of a logical volume.
Go to the path where the logical volume is located and modify the attributes of the logical volume.
In the volume group vgora, vgopt, and vgphydb, the owner of all logical volumes is oracle, and the owner is oinstall. The permission is 660.
Note:
To change the properties of a logical volume, run the vxedit command. The chown and chmod commands cannot be used, because the attributes modified by the chown and chmod commands can only take effect temporarily. if the volume Group is restarted or the machine is switched over, the attributes will be restored to the initial state.
# Cd/dev/vx/rdsk/vgora
# Vxedit-g vgora set user = oracle group = oinstall mode = 660 *
# Cd/dev/vx/rdsk/vgopt
# Vxedit-g vgopt set user = oracle group = oinstall mode = 660 *
# Cd/dev/vx/rdsk/vgophydb
# Vxedit-g vgphydb set user = oracle group = oinstall mode = 660 *
Note:
In BMP, the owner of lvfile must be changed to "root: root". after completing the preceding operation, run the following command:
# Cd/dev/vx/rdsk/vgopt
# Vxedit-g vgopt set user = root group = root mode = 660 lvfile
Check the attributes of the modified logical volume.
Take the logical volume in vgora as an example.
# Ls-al/dev/vx/rdsk/vgora/
Total 0
Crw-rw ---- 1 oracle oinstall 199,655 14 Aug 6 lvctl1
Crw-rw ---- 1 oracle oinstall 199,655 13 Aug 6 lvctl2
Crw-rw ---- 1 oracle oinstall 199,655 12 Aug 6 lvctl3
Crw-rw ---- 1 oracle oinstall 199,655 27 Aug 4 lvredo1
Crw-rw ---- 1 oracle oinstall 199,655 26 Aug 6 lvredo2
Crw-rw ---- 1 oracle oinstall 199,655 25 Aug 4 lvredo3
Crw-rw ---- 1 oracle oinstall 199,655 24 Aug 4 lvredo4
Crw-rw ---- 1 oracle oinstall 199,655 23 Aug 4 lvredo5
Crw-rw ---- 1 oracle oinstall 199,655 22 Aug 4 lvredo6
Crw-rw ---- 1 oracle oinstall 199,655 33 Aug 4 lvspfile
Crw-rw ---- 1 oracle oinstall 199,655 21 Aug 4 lvstdredo1
Crw-rw ---- 1 oracle oinstall 199,655 20 Aug 4 lvstdredo2
Crw-rw ---- 1 oracle oinstall 199,655 19 Aug 4 lvstdredo3
Crw-rw ---- 1 oracle oinstall 199,655 18 Aug 4 lvstdredo4
Crw-rw ---- 1 oracle oinstall 199,655 17 Aug 4 lvstdredo5
Crw-rw ---- 1 oracle oinstall 199,655 16 Aug 4 lvstdredo6
Crw-rw ---- 1 oracle oinstall 199,655 15 Aug 4 lvstdredo7
Crw-rw ---- 1 oracle oinstall 199,655 31 Aug 6 lvsysaux
Crw-rw ---- 1 oracle oinstall 199,655 32 Aug 6 lvsystem
Crw-rw ---- 1 oracle oinstall 199,655 29 Aug 5 lvtemp
Crw-rw ---- 1 oracle oinstall 199,655 30 Aug 6 lvundo
Crw-rw ---- 1 oracle oinstall 199,655 28 Aug 6 lvuser
This example shows that the owner of all logical volumes is oracle, the group is oinstall, and the permission is rw-660 set in the previous step.
Create an lv using the following command:
Create an lv:
Vxassist-g vgopt make lvtest 10 m
Change the name of an lv (change lvtest to lvtst ):
Vxedit-g vgopt rename lvtest lvtst
Delete an lv:
Vxassist-g vgopt remove volume lvtst
This article is from the "personal notes" blog