2,016 bytes added ,  2 April 2018
volume group
→‎Permissions: convert to a table
volume group
Line 1: Line 1:
= SSH =
= SSH =


Line 5: Line 7:
<source lang="bash">
<source lang="bash">
$ ssh-copy-id -p 41111 -i ~/.ssh/id_rsa.pub mhan@remote.server.com
$ ssh-copy-id -p 41111 -i ~/.ssh/id_rsa.pub mhan@remote.server.com
</source>
= Disk =
== Physical volume ==
Initialize for use as LVM physical volume.
<source lang="bash">
$ pvcreate /dev/sdb1
</source>
Scanning for block devices.
<source lang="bash">
$ lvmdiskscan
</source>
Display the physical volumes.
<source lang="bash">
$ pvdisplay
</source>
Show all physical devices.
<source lang="bash">
$ pvscan
</source>
Prevent allocation of physical extents on the free space of one or more physical volumes. This may be necessary if there are disk errors, or if you will be removing the physical volume.
<source lang="bash">
$ pvchange -x n /dev/sdb1
</source>
Resize.
<source lang="bash">
$ pvresize
</source>
Remove LVM label.
<source lang="bash">
$ pvremove
</source>
== Volume group ==
Create a volume group.
<source lang="bash">
$ vgcreate vg1 /dev/sdb1 /dev/sdc1
</source>
Add a physical volume to a volume group.
<source lang="bash">
$ vgextend vg1 /dev/sdd1
</source>
Display volume group.
<source lang="bash">
$ vgdisplay new_vg
</source>
Scan disks for volume groups.
<source lang="bash">
$ vgscan
</source>
Remove a physical volume from a volume group.
<source lang="bash">
$ vgreduce group_name /dev/sdc1
</source>
Change parameters of a volume group. Change the maximum number of logical volumes of volume group vg00 to 128.
<source lang="bash">
$ vgchange -l 128 /dev/vg00
</source>
Activate or deactivate a volume group.
<source lang="bash">
$ vgchange -a n my_volume_group
</source>
Remove a volume group.
<source lang="bash">
$ vgremove officevg
</source>
Split the physical volumes of a volume group and create a new volume group.
<source lang="bash">
$ vgsplit bigvg smallvg /dev/ram15
Volume group "smallvg" successfully split from "bigvg"
</source>
Merge the inactive volume group my_vg into the active or inactive volume group databases giving verbose runtime information.
<source lang="bash">
$ vgmerge -v databases my_vg
</source>
Change the name of a volume group.
<source lang="bash">
$ vgrename vg02 my_volume_group
</source>
</source>