ITPub博客

首页 > Linux操作系统 > Linux操作系统 > HP-UX逻辑卷管理

HP-UX逻辑卷管理

原创 Linux操作系统 作者:db_wjw 时间:2012-04-27 10:00:00 0 删除 编辑
1、创建物理卷
zdcxdb[/]#ll /dev/rdisk
total 0
crw-r-----   1 bin        sys         12 0x00000c Apr 11 18:20 disk33
crw-r-----   1 bin        sys         12 0x00000d Apr 12 16:26 disk34
crw-r-----   1 bin        sys         12 0x00000e Apr 11 18:20 disk35
crw-r-----   1 bin        sys         12 0x000025 Apr 27 09:43 disk50
zdcxdb[/]#pvcreate -f /dev/rdisk/disk50
Physical volume "/dev/rdisk/disk50" has been successfully created.

2、创建卷组:
zdcxdb[/]#mkdir /dev/vg01
zdcxdb[/]#mknod /dev/vg01/group c 64 0x010000
zdcxdb[/]#vgcreate /dev/vg01 /dev/disk/disk50
Warning: Max_PE_per_PV for the volume group (65535) too small for this PV (153599).
         Using only 65535 PEs from this physical volume.
Increased the number of physical extents per physical volume to 65535.
vgcreate: Volume group "/dev/vg01" 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.

zdcxdb[/]#vgcreate -s 32 /dev/vg01 /dev/disk/disk50
Increased the number of physical extents per physical volume to 19199.
Volume group "/dev/vg01" has been successfully created.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf

3、划分逻辑卷:
zdcxdb[/]#lvcreate -L 10240 -n lvywlog /dev/vg01
zdcxdb[/]#newfs -F vxfs /dev/vg01/rlvywlog

4、挂载逻辑卷:
zdcxdb[/]#mkdir ywlog
zdcxdb[/]#vi /etc/fstab
zdcxdb[/]#cat /etc/fstab
# System /etc/fstab file.  Static information about the file systems
# See fstab(4) and sam(1M) for further details on configuring devices.
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /home vxfs delaylog 0 2
/dev/vg00/lvol5 /opt vxfs delaylog 0 2
/dev/vg00/lvol6 /tmp vxfs delaylog 0 2
/dev/vg00/lvol7 /usr vxfs delaylog 0 2
/dev/vg00/lvol8 /var vxfs delaylog 0 2
/dev/vg00/lvora /oracle vxfs delaylog 0 2
/dev/vg01/lvywdata /ywdata vxfs delaylog 0 2
/dev/vg01/lvywarch /ywarch vxfs delaylog 0 2
/dev/vg01/lvywlog /ywlog vxfs delaylog 0 2
/dev/vg01/lvcwdata /cwdata vxfs delaylog 0 2
/dev/vg01/lvcwarch /cwarch vxfs delaylog 0 2
/dev/vg01/lvcwlog /cwlog vxfs delaylog 0 2
/dev/vg01/lvbackup /backup vxfs delaylog 0 2
zdcxdb[/]#mount -a
zdcxdb[/]#bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    2097152  130800 1951048    6% /
/dev/vg00/lvol1    1776056   80440 1518008    5% /stand
/dev/vg00/lvol8    10485760 2634224 7790328   25% /var
/dev/vg00/lvol7    4194304 2072344 2105408   50% /usr
/dev/vg00/lvol6    4194304   23592 4140440    1% /tmp
/dev/vg00/lvora    20971520   46881 19641103    0% /oracle
/dev/vg00/lvol5    8388608 3559032 4791888   43% /opt
/dev/vg00/lvol4    2097152   22984 2058008    1% /home
/dev/vg01/lvywlog  10485760   19651 9811985    0% /ywlog
/dev/vg01/lvcwlog  10485760   19651 9811985    0% /cwlog
/dev/vg01/lvcwarch 52428800   29931 49123947    0% /cwarch
/dev/vg01/lvcwdata 157286400   55632 147403852    0% /cwdata
/dev/vg01/lvywarch 52428800   29931 49123947    0% /ywarch
/dev/vg01/lvywdata 157286400   55632 147403852    0% /ywdata
/dev/vg01/lvbackup 104857600   42781 98263900    0% /backup

另:
扩展逻辑卷:
zdcxdb[/]#umount /ywlog
zdcxdb[/]#lvextend -L 51200 /dev/vg01/lvywlog
zdcxdb[/]#extendfs -F vxfs /dev/vg01/lvywlog
zdcxdb[/]#mount /ywlog
删除逻辑卷:
zdcxdb[/]#umount /ywlog
zdcxdb[/]#lvremove /dev/vg01/lvywlog
删除卷组:
zdcxdb[/]#lvremove /dev/vg01/lvbea
zdcxdb[/]#vgreduce /dev/vg01 /dev/disk/disk4
zdcxdb[/]#vgremove /dev/vg01

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26194851/viewspace-722343/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-08-21

  • 博文量
    96
  • 访问量
    451031