OPTIONS [--domain] domain name, id or uuid [--source] source of disk device [--target] target of disk device --targetbus target bus of disk device --driver driver of disk device --subdriver subdriver of disk device --iothread IOThread to be used by supported device --cache cache mode of disk device --io io policy of disk device --type target device type --mode mode of device reading and writing --sourcetype type of source (block|file) --serial serial of disk device --wwn wwn of disk device --rawio needs rawio capability --address address of disk device --multifunction use multifunction pci under specified address --print-xml print XML document rather than attach the disk --persistent make live change persistent --config affect next boot --live affect running domain --current affect current domain
创建分区
选择卷标必须使用8e,这个表示是LVM磁盘格式
[root@localhost ~]# fdisk /dev/vdc
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x14401f11.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-209715199, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199):
Using default value 209715199
Partition 1 of type Linux and of size 100 GiB is set
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
[38384.918771] vdc: vdc1
Syncing disks.
[root@localhost ~]# [38384.934024] vdc: vdc1
我们进入虚拟机系统,然后看下系统硬盘的情况,可以看到硬盘已经被虚拟机监测到.
[root@localhost ~]# fdisk -l
Disk /dev/vda: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000be9e1
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 2099199 1048576 83 Linux
/dev/vda2 2099200 20971519 9436160 8e Linux LVM
Disk /dev/vdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x8e9d6aff
Device Boot Start End Blocks Id System
/dev/vdb1 2048 209715199 104856576 8e Linux LVM
[root@localohst ~]# lvdisplay
--- Logical volume ---
LV Path /dev/centos/root
LV Name root
VG Name centos
LV UUID JrHsb3-E9Ym-Rh79-iosJ-hzHJ-ylPD-Gcc4Co
LV Write Access read/write
LV Creation host, time localhost, 2020-12-23 18:47:47 +0800
LV Status available
# open 1
LV Size 10 GiB
Current LE 11047
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:0
--- Logical volume ---
LV Path /dev/VolGroup01/lv01
LV Name lv01
VG Name VolGroup01
LV UUID Fjk4G9-g2rP-W8h4-JEEF-2q3F-kykM-cjBoMt
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2021-04-04 23:30:12 +0800
LV Status available
# open 0
LV Size 10.00 GiB
Current LE 2560
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:2
格式化
[root@localhost ~]# mkfs -t ext4 /dev/VolGroup01/lv01
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2621440 blocks
131072 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2151677952
80 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:
done
[root@localhost ~]# fdisk /dev/vdc
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x14401f11.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-209715199, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199):
Using default value 209715199
Partition 1 of type Linux and of size 100 GiB is set
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
[38384.918771] vdc: vdc1
Syncing disks.
[root@localhost ~]# [38384.934024] vdc: vdc1
查看分区
到KVM虚拟机内部,查看下需要扩展的磁盘,使用命令vgdisplay,我们扩展centos逻辑分区
[root@localhost ~]# vgdisplay
--- Volume group ---
VG Name centos
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 10 GiB
PE Size 4.00 MiB
Total PE 27902
Alloc PE / Size 2303 / <9.00 GiB
Free PE / Size 25599 / <100.00 GiB
VG UUID DHsBK6-fe7b-n4V2-H5Lx-1p1g-oaPI-HWwS6k
--- Volume group ---
VG Name VolGroup01
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size <100.00 GiB
PE Size 4.00 MiB
Total PE 25599
Alloc PE / Size 2560 / 10.00 GiB
Free PE / Size 23039 / <90.00 GiB
VG UUID OIaURj-GFML-uhcA-ibgz-9tZg-OPfP-Obtak5
[root@localhost ~]# vgdisplay
--- Volume group ---
VG Name centos
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 108.99 GiB
PE Size 4.00 MiB
Total PE 27902
Alloc PE / Size 2303 / <9.00 GiB
Free PE / Size 25599 / <100.00 GiB
VG UUID DHsBK6-fe7b-n4V2-H5Lx-1p1g-oaPI-HWwS6k
--- Volume group ---
VG Name VolGroup01
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size <100.00 GiB
PE Size 4.00 MiB
Total PE 25599
Alloc PE / Size 2560 / 10.00 GiB
Free PE / Size 23039 / <90.00 GiB
VG UUID OIaURj-GFML-uhcA-ibgz-9tZg-OPfP-Obtak5
java中最常用jar包的用途
jar包用途axis.jarSOAP引擎包commons-discovery-0.2.jar用来发现、查找和实现可插入式接口,提供一些一般类实例化、单件的生命周期管理的常用方法.jaxrpc.jarAxis运行所需要的组件包saaj.jar创建到端点的点到点连接的方法、创建并处理SOAP消息和附件的方法,以及接收和处理SOAP错误的方法. w
创建图表事件监听非常简单:首先是通过addEventListener('监听类型',js监听方法)添加事件监听,然后在js监听方法中定义具体监听逻辑。
以钻取操作为例,当用户点击图表某一个point的时候弹出point的name和value,代码如下:
<script>
//创建AnyChart
var chart = new AnyChart();
//添加钻取操作&quo
我们来看下面的例子:
create or replace view testview
as
select empno,ename from emp where ename like ‘M%’
with check option;
这里我们创建了一个视图,并使用了with check option来限制了视图。 然后我们来看一下视图包含的结果:
select * from testv