[HPUX] HP Unix pv,vg,lv操作

發(fā)布時(shí)間:2024-02-20
建站服務(wù)器
[root@testdb:/#] pvcreate /dev/rdsk/c2t1d4 #使用的字符設(shè)備
physical volume /dev/rdsk/c2t1d4 has been successfully created.
[root@testdb:/#] vgcreate vgora /dev/dsk/c2t1d4 #使用塊設(shè)備
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
一個(gè)pe size 默認(rèn)大小是4m,so…4m*50431=201724m < 201728m (206569472/1024) 所以要增加pe的大小,設(shè)置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 #不能識(shí)別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 #需要使用字符設(shè)備的,就是一個(gè)字母帶r的.(帶r裸設(shè)備使用,不帶是文件系統(tǒng)使用的)
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
這個(gè)時(shí)候可以通過(guò)bdf查看是否掛載.
如果想要系統(tǒng)系統(tǒng)掛載filesystem,需要在/etc/fstab中添加記錄.
[root@testdb:/#] vi /etc/fstab #添加如下內(nèi)容.
/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 #只能這樣了.但是這樣里面的數(shù)據(jù)都沒(méi)有了.
[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參數(shù),強(qiáng)制執(zhí)行
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
上一個(gè):微星主板bios怎么設(shè)置中文(微星主板bios怎么設(shè)置硬盤啟動(dòng))
下一個(gè):惠普設(shè)置u盤為第一啟動(dòng)項(xiàng)(惠普筆記本按f幾進(jìn)入u盤啟動(dòng))

油菜栽培
1206W4F137KT5E,F(xiàn) 1206 1.37R現(xiàn)貨購(gòu)買,厚聲1206 1.37Ω ±1% 1/4W
食品添加劑檢測(cè)儀控制濫用添加劑
助力政企數(shù)字化轉(zhuǎn)型:騰訊云TStack首批達(dá)到等保2.0四級(jí)安全能力要求
草擬合同注意事項(xiàng)有什么
筆記本愛(ài)普生打印機(jī)安裝步驟(如何在電腦上安裝愛(ài)普生打印機(jī)驅(qū)動(dòng)程序)
華為3x不能開機(jī)怎么辦,華為榮耀3x暢玩版進(jìn)了水我換了個(gè)主板怎么開機(jī)沒(méi)有反應(yīng)呢
setra高精度微差壓傳感器在泄漏檢測(cè)方案中的作用
果樹大棚空間的充分利用
百合的主要病蟲及防治
十八禁 网站在线观看免费视频_2020av天堂网_一 级 黄 色 片免费网站_绝顶高潮合集Videos