[HPUX] HP Unix pv,vg,lv操作
发表于:2026-11-04 作者:千家信息网编辑
千家信息网最后更新 2026年11月04日,[root@testdb:/#] pvcreate /dev/rdsk/c2t1d4 #使用的字符设备Physical volume "/dev/rdsk/c2t1d4" has been succe
千家信息网最后更新 2026年11月04日[HPUX] HP Unix pv,vg,lv操作[root@testdb:/#] pvcreate /dev/rdsk/c2t1d4 #使用的字符设备
Physical volume "/dev/rdsk/c2t1d4" has been successfully created.
[root@testdb:/#] vgcreate vgora /dev/dsk/c2t1d4 #使用块设备
Increased the number of physical extents per physical volume to 50431.
vgcreate: Volume group "/dev/vgora" could not be created:
VGRA for the disk is too big for the specified parameters. Increase the
extent size or decrease max_PVs/max_LVs and try again.
[root@testdb:/#] diskinfo /dev/rdsk/c2t1d4
SCSI describe of /dev/rdsk/c2t1d4:
vendor: HITACHI
product id: DF600F
type: direct access
size: 206569472 Kbytes
bytes per sector: 512
一个PE Size 默认大小是4M,so...4M*50431=201724M < 201728M (206569472/1024) 所以要增加PE的大小,设置PE Size=32M.
[root@testdb:/#] vgcreate -s 32 vgora /dev/dsk/c2t1d4
Increased the number of physical extents per physical volume to 6303.
Volume group "/dev/vgora" has been successfully created.
Volume Group configuration for /dev/vgora has been saved in /etc/lvmconf/vgora.conf
[root@testdb:/#] lvcreate -L 40G -n lvoracle vgora #不能识别G.so..delete
[root@testdb:/#] lvcreate -L 80G -n lvoradata vgora
[root@testdb:/#] lvremove /dev/vgora/lvoracle
[root@testdb:/#] lvremove /dev/vgora/lvoradata
[root@testdb:/#] lvcreate -L 40960M -n lvoracle vgora
[root@testdb:/#] lvcreate -L 81920M -n lvoradata vgora
[root@testdb:/#] vgdisplay -v vgora #重新查看信息.
[root@testdb:/#] newfs -F vxfs /dev/vgora/lvoracle #需要使用字符设备的,就是一个字母带r的.(带r裸设备使用,不带是文件系统使用的)
UX:vxfs newfs: ERROR: V-3-21623: /dev/vgora/lvoracle is not a character device
[root@testdb:/#] newfs -F vxfs /dev/vgora/rlvoracle
[root@testdb:/#] newfs -F vxfs /dev/vgora/rlvoradata
[root@testdb:/#] mkdir -p /oracle/testdb/oracle
[root@testdb:/#] mkdir -p /oracle/testdb/oradata
[root@testdb:/#] mount /dev/vgora/lvoracle /oracle/testdb/oracle
[root@testdb:/#] mount /dev/vgora/lvoradata /oracle/testdb/oradata
这个时候可以通过bdf查看是否挂载.
如果想要系统系统挂载filesystem,需要在/etc/fstab中添加记录.
[root@testdb:/#] vi /etc/fstab #添加如下内容.
/dev/vgora/lvoracle /oracle/testdb/oracle vxfs delaylog 0 2
/dev/vgora/lvoradata /oracle/testdb/oradata vxfs delaylog 0 2
[root@testdb:/#] mount -a
[root@testdb:/#] lvextend -L 92160M /dev/vgora/lvoradata #增加lv大小
[root@testdb:/#] extendfs -F vxfs /dev/vgora/lvoradata #filesystem不能在线操作.需要umount操作
UX:vxfs extendfs: ERROR: V-3-20144: /dev/vgora/lvoradata is mounted, cannot extend.
[root@testdb:/#] fsadm -F vxfs -b 92160M /oracle/testdb/oradata #使用fsadm 在线操作.
UX:vxfs fsadm: INFO: V-3-25942: /dev/vgora/rlvoradata size increased from 83886080 sectors to 94371840 sectors
[root@testdb:/#] umount /oracle/testdb/oradata
[root@testdb:/#] lvreduce -L 81920M /dev/vgora/lvoradata
root@testdb:/#] mount /dev/vgora/lvoradata /oracle/testdb/oradata
UX:vxfs mount: ERROR: V-3-24706: /dev/vgora/lvoradata no such device or filesystem on it missing one or more devices
[root@testdb:/#] newfs -F vxfs /dev/vgora/rlvoradata #只能这样了.但是这样里面的数据都没有了.
[root@testdb:/#] newfs -o largefiles -F vxfs /dev/vgora/rlvoradata #不加-o 最大支持2G,加了之后支持128G.
[root@testdb:/#] mount -a
[root@testdb:/dev/vgasm#] pvcreate /dev/rdsk/c2t1d3
pvcreate: Could not perform LVM operation on VxVM disk "/dev/rdsk/c2t1d3".
[root@testdb:/dev/vgasm#] pvcreate -f /dev/rdsk/c2t1d3 #加上-f参数,强制执行
Physical volume "/dev/rdsk/c2t1d3" has been successfully created.
[root@testdb:/dev/vgasm#] vgextend vgora /dev/dsk/c2t1d3
[root@testdb:/dev/vgasm#] vgreduce vgora /dev/dsk/c2t1d3
Physical volume "/dev/rdsk/c2t1d4" has been successfully created.
[root@testdb:/#] vgcreate vgora /dev/dsk/c2t1d4 #使用块设备
Increased the number of physical extents per physical volume to 50431.
vgcreate: Volume group "/dev/vgora" could not be created:
VGRA for the disk is too big for the specified parameters. Increase the
extent size or decrease max_PVs/max_LVs and try again.
[root@testdb:/#] diskinfo /dev/rdsk/c2t1d4
SCSI describe of /dev/rdsk/c2t1d4:
vendor: HITACHI
product id: DF600F
type: direct access
size: 206569472 Kbytes
bytes per sector: 512
一个PE Size 默认大小是4M,so...4M*50431=201724M < 201728M (206569472/1024) 所以要增加PE的大小,设置PE Size=32M.
[root@testdb:/#] vgcreate -s 32 vgora /dev/dsk/c2t1d4
Increased the number of physical extents per physical volume to 6303.
Volume group "/dev/vgora" has been successfully created.
Volume Group configuration for /dev/vgora has been saved in /etc/lvmconf/vgora.conf
[root@testdb:/#] lvcreate -L 40G -n lvoracle vgora #不能识别G.so..delete
[root@testdb:/#] lvcreate -L 80G -n lvoradata vgora
[root@testdb:/#] lvremove /dev/vgora/lvoracle
[root@testdb:/#] lvremove /dev/vgora/lvoradata
[root@testdb:/#] lvcreate -L 40960M -n lvoracle vgora
[root@testdb:/#] lvcreate -L 81920M -n lvoradata vgora
[root@testdb:/#] vgdisplay -v vgora #重新查看信息.
[root@testdb:/#] newfs -F vxfs /dev/vgora/lvoracle #需要使用字符设备的,就是一个字母带r的.(带r裸设备使用,不带是文件系统使用的)
UX:vxfs newfs: ERROR: V-3-21623: /dev/vgora/lvoracle is not a character device
[root@testdb:/#] newfs -F vxfs /dev/vgora/rlvoracle
[root@testdb:/#] newfs -F vxfs /dev/vgora/rlvoradata
[root@testdb:/#] mkdir -p /oracle/testdb/oracle
[root@testdb:/#] mkdir -p /oracle/testdb/oradata
[root@testdb:/#] mount /dev/vgora/lvoracle /oracle/testdb/oracle
[root@testdb:/#] mount /dev/vgora/lvoradata /oracle/testdb/oradata
这个时候可以通过bdf查看是否挂载.
如果想要系统系统挂载filesystem,需要在/etc/fstab中添加记录.
[root@testdb:/#] vi /etc/fstab #添加如下内容.
/dev/vgora/lvoracle /oracle/testdb/oracle vxfs delaylog 0 2
/dev/vgora/lvoradata /oracle/testdb/oradata vxfs delaylog 0 2
[root@testdb:/#] mount -a
[root@testdb:/#] lvextend -L 92160M /dev/vgora/lvoradata #增加lv大小
[root@testdb:/#] extendfs -F vxfs /dev/vgora/lvoradata #filesystem不能在线操作.需要umount操作
UX:vxfs extendfs: ERROR: V-3-20144: /dev/vgora/lvoradata is mounted, cannot extend.
[root@testdb:/#] fsadm -F vxfs -b 92160M /oracle/testdb/oradata #使用fsadm 在线操作.
UX:vxfs fsadm: INFO: V-3-25942: /dev/vgora/rlvoradata size increased from 83886080 sectors to 94371840 sectors
[root@testdb:/#] umount /oracle/testdb/oradata
[root@testdb:/#] lvreduce -L 81920M /dev/vgora/lvoradata
root@testdb:/#] mount /dev/vgora/lvoradata /oracle/testdb/oradata
UX:vxfs mount: ERROR: V-3-24706: /dev/vgora/lvoradata no such device or filesystem on it missing one or more devices
[root@testdb:/#] newfs -F vxfs /dev/vgora/rlvoradata #只能这样了.但是这样里面的数据都没有了.
[root@testdb:/#] newfs -o largefiles -F vxfs /dev/vgora/rlvoradata #不加-o 最大支持2G,加了之后支持128G.
[root@testdb:/#] mount -a
[root@testdb:/dev/vgasm#] pvcreate /dev/rdsk/c2t1d3
pvcreate: Could not perform LVM operation on VxVM disk "/dev/rdsk/c2t1d3".
[root@testdb:/dev/vgasm#] pvcreate -f /dev/rdsk/c2t1d3 #加上-f参数,强制执行
Physical volume "/dev/rdsk/c2t1d3" has been successfully created.
[root@testdb:/dev/vgasm#] vgextend vgora /dev/dsk/c2t1d3
[root@testdb:/dev/vgasm#] vgreduce vgora /dev/dsk/c2t1d3
设备
大小
系统
字符
在线
支持
最大
信息
内容
参数
可以通过
字母
就是
数据
文件
时候
强制
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
互联网科技活动banner
互联网最新的科技
互联网科技有限公司经营范围
互联网 科技公司
互联网金融 科技金融
互联网科技公司发展
互联网科技上市公司
菲比寻常互联网科技
卓越科技互联网 招聘
佩信高科技互联网
安控科技rtu产品工业互联网
创业天下互联网科技有限公司
宁夏众和广鑫互联网科技有限公司
全球顶尖互联网科技公司
移动互联网年度科技创新
众安科技工业互联网合作
梅州GM互联网络科技有限公司
中国新注册互联网科技
互联网领先科技活动
山东亿川互联网科技有限责任公司
手磨咖啡
广州万易互联网科技有限公司
互联网金融监管科技数据
互联网科技博客
人人互联网科技是培训
移动互联网科技公司
阿里互联网科技企业
互联网科技如何创业
无锡工业互联网科技有限公司
电子商务与互联网科技的关系