HP Visualize J210XC IRIX to HP-UX Migration Guide - Page 33

Disks and File Systems, Volume Group Tasks, Logical Volume Management Tasks

Page 33 highlights

Disks and File Systems Volume Group Tasks TASK Creating a volume group Removing volume group Activating, deactivating, or changing the characteristics of a volume group Backing up volume group configuration information Restoring volume group configuration from a configuration file Displaying information about volume group Exporting a volume group and its associated logical volumes Importing a volume group onto the system; also adds an existing volume group back into /etc/lvmtab Scan all physical volumes looking for logical volumes and volume groups; allows for recovery of the LVM configuration file, /etc/lvmtab Adding disk to volume group Removing disk from volume group COMMAND vgcreate vgremove vgchange vgcfgbackup vgcfgrestore vgdisplay vgexport vgimport vgscan vgextend vgreduce Logical Volume Management Tasks Modifying a logical volume TASK Displaying information about logical volumes Increasing the size of logical volume by allocating disk space Decreasing the size of a logical volume Removing the allocation of disk space for one or more logical volumes within a volume group Preparing a logical volume to be a root, primary swap, or dump volume Removing link that makes a logical volume a root, primary swap, or dump volume Increasing the size of a file system up to the capacity of logical volume Splitting a mirrored logical volume into two logical volumes Merging two logical volumes into one logical volume COMMAND lvchange lvdisplay lvextend lvreduce lvremove lvlnboot lvrmboot extendfs lvsplit lvmerge Creating a Logical Volume Using HP-UX Commands To create a logical volume: 1. Select one or more disks. ioscan shows the disks attached to the system and their device file names. 2. Initialize each disk as an LVM disk by using the pvcreate command. For example, enter: # pvcreate /dev/rdsk/c0t0d0 Note that using pvcreate will result in the loss of any existing data currently on the physical volume and that you use the character device file for the disk. Once a disk is initialized, it is called a physical volume. 3. Create a directory for the volume group. For example: # mkdir /dev/vg01 4. With the mknod command, create a device file named group in the above directory . The basic syntax is: # mknod /dev/vg nn/group c 64 0xNN0000 The c following the device file name specifies that group is a character device file. 64 is the major number for the group device file; it will always be 64. 0xNN0000 is the minor number for the group file in hexadecimal. Note that each particular NN must be a unique number across all volume groups. 28

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125

Disks and File Systems
28
Volume Group Tasks
T
ASK
C
OMMAND
Creating a volume group
vgcreate
Removing volume group
vgremove
Activating, deactivating, or changing the characteristics of a volume group
vgchange
Backing up volume group configuration information
vgcfgbackup
Restoring volume group configuration from a configuration file
vgcfgrestore
Displaying information about volume group
vgdisplay
Exporting a volume group and its associated logical volumes
vgexport
Importing a volume group onto the system; also adds an existing volume group back into
/etc/lvmtab
vgimport
Scan all physical volumes looking for logical volumes and volume groups; allows for
recovery of the LVM configuration file,
/etc/lvmtab
vgscan
Adding disk to volume group
vgextend
Removing disk from volume group
vgreduce
Logical Volume Management Tasks
T
ASK
C
OMMAND
Modifying a logical volume
lvchange
Displaying information about logical volumes
lvdisplay
Increasing the size of logical volume by allocating disk space
lvextend
Decreasing the size of a logical volume
lvreduce
Removing the allocation of disk space for one or more logical volumes within a volume
group
lvremove
Preparing a logical volume to be a
root
, primary swap, or dump volume
lvlnboot
Removing link that makes a logical volume a root, primary swap, or dump volume
lvrmboot
Increasing the size of a file system up to the capacity of logical volume
extendfs
Splitting a mirrored logical volume into two logical volumes
lvsplit
Merging two logical volumes into one logical volume
lvmerge
Creating a Logical Volume Using HP-UX Commands
To create a logical volume:
1.
Select one or more disks.
ioscan
shows the disks attached to the system and their device file names.
2.
Initialize each disk as an LVM disk by using the
pvcreate
command. For example, enter:
# pvcreate /dev/rdsk/c0t0d0
Note that using
pvcreate
will result in the loss of any existing data currently on the physical volume
and that you use the character device file for the disk. Once a disk is initialized, it is called a
physical
volume
.
3.
Create a directory for the volume group.
For example:
# mkdir /dev/vg01
4.
With the
mknod
command, create a device file named
group
in the above directory . The basic syntax
is:
# mknod /dev/vg nn/group c 64 0xNN0000
The
c
following the device file name specifies that
group
is a character device file.
64
is the major
number for the
group
device file; it will always be
64
.
0xNN0000
is the minor number for the
group
file in hexadecimal. Note that each particular
NN
must be a unique number across all volume groups.