博客首页
注册
建议与交流
排行榜
加入友情链接
推荐
投诉
搜索:
帮助
好好学习,天天向SUN
联系方式: leiyu530@163.com
penguinstorm.cublog.cn
管理博客
发表文章
留言
收藏夹
博客圈
音乐
相册
· N4000拆卸过程
· Solaris8安装过程截图
· Veritas
}
· 建立VOLUME
· 其他
· 证书
· ORACLE_FOR_Solaris9i
· HACMP_FOR_AIX 4.3.3
}
· 准备工作
· 配置过程
· 配置共享卷组
· 配置应用脚本
· 同步过程
· 启动双机
· 错误大观
· 路由交换
· ruby专用文件夹
· sun_cluster
· FASTT系列存储
· 7133换盘操作
· HACMP_FOR_AIX 5.1
· 地震纪实
文章
· AIX
}
· 实践操作
· 双机配置
· 系统认证
· 基础知识
· 故障处理
· 共享精神
· HPUX
}
· 学逻辑卷
· 双机相关
· 考试认证
}
· CSE
· CSA
· 基础知识
· 动手实践
· 存储备份
· CISCO
}
· 交换相关
· 路由相关
· 认证考试
}
· CCNA
· CCNP
· CCIE
· 心情日记
· 动手实践
· Linux
· Oracle
}
· 基础知识
· 实践操作
· 考试认证
· 实验操作
· English
· Solaris
}
· 读书笔记
}
· SA239
· SA299
· SA399
· ES222
· SM240
· ES255
· ES310
· Solaris高级系统管理员指南
· 基础知识
· 实践操作
}
· ST350
· 认证计划
· 系统安装
· Veritas
}
· 基础知识
· 实践操作
· Program
}
· Rails
}
· 基础知识
· 实践操作
· 语法掌握
· Dynamips
· 荣誉勋章
· 过关总结
· 闲言碎语
· 熬夜签到
· 好文收录
· 人在职场
· 热点关注
首页
关于作者
姓名:雷宇 昵称:storm 职业:IT 年龄:26 位置:北京 个性介绍:没啥个性 不聊MSN/QQ 本着资源共享的精神,所有文章欢迎转载
||
<<
>>
||
我的分类
文章列表 - 学逻辑卷
Adding dumps devices on a logical volume
<DIV>*dump areas must reside in the root volume group(normally vg00)<BR>*The kernel must know where the dump areas are in the event of a system panic<BR>*The logical volumes used as dump areas must have contiguous physical extents<BR>*This must be done when the logical volume are created with lvcreate</DIV> <DIV> </DIV> <DIV>NOTE:If a swap logical volume is to be used for dump then it too must be in the root volume group and have been created with contiguous physical extents.</DIV> <DIV> </DIV> <DIV>To configure dumps area, on logical volumes perform the following tasks:<BR>1,Verify the current system dumps area configuration<BR># lvlnboot -v</DIV> <DIV> </DIV> <DIV>2,If the dumps area has not been configured or if additional dumps area is required it will be necessary to locate or create contiguous logical volume to be configured as dump area. To determine if an existing logical volume was created in a contiguous manner use the lvdisplay command<BR># lvdisplay /dev/vgxx/lvolx</DIV> <DIV> </DIV> <DIV>Look at the bottom line of the output. The allocation field will indicate contiguous if the logical volume was created with contiguous physical extents. If this is not displayed,the logical volume cannot be used for dumps area<BR></DIV> <DIV>NOTE: A logical volume can be converted from non-contiguous to contiguous using the lvchange -C y command, only if its physical extents match the constraints demanded by the contiguous allocation policy. If this is not the case, the logical volume must be removed, and if enough contiguous space is available, the logical volume can be created again using the lvcreate -C y option as shown later.</DIV> <DIV> </DIV> <DIV>3,Create a contiguous logical volume of sufficient size to bring total dumps area size to an amount which is at least 5 MB more than installed physical memory<BR># lvcreate -C y -L xxx vgxx</DIV> <DIV> </DIV> <DIV>4,Update the Boot Data Reserved Area(BDRA) and LABEL file with t……
查看全文
发表于:2006-07-11 ┆
阅读(760)
┆
评论(0)
Adding secondary device swap on a logical volume
<DIV>Adding secondary swap space consists of:<BR>creating a logical volume<BR>adding a line to /etc/fstab<BR>and finally, executing the swapon cmmand</DIV> <DIV> </DIV> <DIV>A rough calculation of swap space requirements for a small standalone system can be made by determing the total size of the applications likely to be running at peak times and add this to the size of physical memory. A precise and detailed calculation can be made. To do this refer to the system administration tasks chapter titled managing swap space and dump areas.</DIV> <DIV> </DIV> <DIV>As a guideline, it is recommended that swap space be equal to 1.5 times the size of physical memory though this may be reduced for systems with very large amounts of memory.</DIV> <DIV> </DIV> <DIV>Once the total swap size has been estimated or precisely calculated, proceed with the following:<BR></DIV> <DIV>1,Determine the current state of the system's swap space<BR># swapinfo<BR>The output of the swapinfo command will indicate the type of swap by location, how much of it is available, used, and free. If hold is diplayed, it indicates how much space the system has reserved based on possible requirements of running processes</DIV> <DIV> </DIV> <DIV>2,Create a logical volume of sufficient size to bring total swap space to the required amount. Specify the size of the logical volume to be created in M following the -L parameter<BR># lvcreate -L xxx vgxx</DIV> <DIV> </DIV> <DIV>3,Add a new line in /etc/fstab using vi or ed for the new logical volume<BR>/dev/vgxx/lvolx /swap swap defaults 0 0 </DIV> <DIV> </DIV> <DIV>4,Enable swapping on the new device<BR># swapon -a</DIV> <DIV> </DIV> <DIV>5,Verify that the new swap device is enabled<BR># swapinfo</DIV> <DIV> </DIV> <DIV>6,Backup the LVM data structures. the default path name for the backup will be /etc/lvmconf/vgxx.cnf<BR># vgcfgbackup /dev/vgxx<BR></DIV> <DIV></DIV>
查看全文
发表于:2006-07-11 ┆
阅读(753)
┆
评论(0)
Remove an LVM volume group
<DIV>1,Backup all user data in the volume to be removed(use fbackup, cpio or tar backup utilities as appropriate)</DIV> <DIV> </DIV> <DIV>2,Determine the names of the logical volumes residing in the volume groups to be removed<BR># lvdisplay /dev/vgxx/lvol*</DIV> <DIV> </DIV> <DIV>3,Unmount all logical volumes in the volume group to be removed<BR># cd /; umount /dev/vgxx/lvol*</DIV> <DIV> </DIV> <DIV>4,Remove the logical volumes found in step 2 from the volume group.<BR># lvremove /dev/vgxx/lvolx</DIV> <DIV> </DIV> <DIV>5,Determine if multiple physical volumes are assocaited with the volume group to be removed. This is indicated by the number of block device files listed for the volume group to be removed<BR># strings /etc/lvmtab</DIV> <DIV> </DIV> <DIV>6,If more than one physical volume,REMOVE ALL BUT ONE of the physical volumes using the vgreduce command<BR># vgreduce /dev/vgxx /dev/dsk/cxtxdx</DIV> <DIV> </DIV> <DIV>7,Now, remove the volume group<BR># vgremove /dev/vgxx<BR></DIV> <DIV></DIV>
查看全文
发表于:2006-07-11 ┆
阅读(706)
┆
评论(0)
Booting a damaged LVM bootable disk
<DIV>1,Attmpt to boot the disk in LVM maintenance mode<BR>ISL> hpux -lm (;0) /stand/vmunix</DIV> <DIV>The steps that follow will not apply in all situations, nor will the order of the commands presented be applicable in all cases. You must read and analyze error messages to arrive at a solution.</DIV> <DIV> </DIV> <DIV>The following assumptions will apply to the commands that follow: the root volume group is vg00; and the root logical volume is lvol1. If this is not the case, substitute the system's root volume group and root logical volume when typing the commands.</DIV> <DIV> </DIV> <DIV>the key things to accomplish are:<BR>a. Restore or updata LVM data structures<BR>b. Make the root volume group available</DIV> <DIV> </DIV> <DIV>2,Use vgcfgrestore to restore a current backup of LVM data structures(PVRA, VGRA, and BDRA) to vg00<BR># vgcfgrestore -n vg00 /dev/rdsk/cxtxdx</DIV> <DIV> </DIV> <DIV>3,Attempt to make the root volume group available.<BR># vgchange -a y /dev/vg00</DIV> <DIV> </DIV> <DIV>4,The following will update LIF's LABEL file with information contained in the Boot Data Reserve Area.<BR># lvlnboot -R /dev/vg00</DIV> <DIV> </DIV> <DIV>5,Make sure all LVM disks are powered, then use vgscan to rebuild the /etc/lvmtab file.Many LVM commands depend on the information contained in this file.<BR># mv /etc/lvmtab /etc/lvmtab.bk<BR># vgscan -v</DIV> <DIV>Once the root volume group LVM data structures have been replaced or updated and the volume group is available, the system should boot normally.<BR></DIV> <DIV></DIV>
查看全文
发表于:2006-07-11 ┆
阅读(706)
┆
评论(0)
逻辑卷管理(修正版)
<DIV> <TABLE cellSpacing=0 cellPadding=0 width="95%" border=0> <TBODY> <TR> <TD> </TD></TR> <TR> <TD height=20> <P align=left> <H3>在HPUX下正确使用硬盘的顺序及相应命令如下:</H3> <P><STRONG>1.先建物理卷</STRONG></P> <P># pvcreate -f /dev/rdsk/cCdDtT<BR>这里必须使用硬盘的字符设备文件</P> <P><STRONG>2.再建逻辑卷组</STRONG></P> <P># mkdir /dev/vg0X<BR>X:0~f,逻辑卷组名<BR># mknod /dev/vg0X/group c 64 0x0X0000<BR># vgcreate vg0X /dev/dsk/cCdDtT</P> <P><STRONG>3.然后划分逻辑卷</STRONG></P> <P># lvcreate -L size –n /dev/vg0X/lvolY vg0X</P> <P><U>正确的做法应该是:# lvcreate -L size -n lvolY vg0X,如果按照原命令输入,得到这样的结果:"LogicalVolumeName": Must be a simple file name, not a path name”</U></P> <P><STRONG>4.在LV上建文件系统</STRONG></P> <P># newfs -F file_system_type /dev/vg0X/rlvolY<BR>file_system_type:文件系统类型,包括hfs和vxfs,注意此时用该逻辑卷的字符设备文件。</P> <P><STRONG>5.将此文件系统Mount到一个目录下</STRONG></P> <P># mkdir /directory<BR># mount /dev/vg0X/lvolY /directory</P> <P>到此为止,您已经可以使用这个硬盘了。有时您可能在现有的环境下,需要添加、删除逻辑卷,或者是需要扩大文件系统。我们可以这样做:</P> <P><STRONG>6.添加逻辑卷</STRONG></P> <P> 添加文件系统卷。例如:在vg01上添加一个200M的文件系统卷,卷名为data,mount到目录/sample 上。</P> <P> A.创建逻辑卷,在系统提示符下键入命令:<BR> # lvcreate -L 200 -n data /dev/vg01</P> <P> B.在逻辑卷data上创建文件系统:<BR> # newfs -F hfs /dev/vg01/rdata<BR> 注:如果是vxfs文件系统,则用<BR> # newfs -F vxfs /dev/vg01/rdata</P> <P> C.创建目录/sample,并将逻辑卷data mount 到/sample.<BR> # mkdir sample<BR> # mount /dev/vg01/data /samp……
查看全文
发表于:2006-07-05 ┆
阅读(828)
┆
评论(0)
Create a Boot disk
<DIV>WARNING:Creating a bootable disk is useful for two specific cases:<BR> 1,Creating a mirror for the root logial volume <BR> 2,Creating a new root logical volume(moving root from one disk to another)<BR>The steps to add a boot disk to the root volume group are:<BR>1,Create a phusical Volume(LVM disk)/dev/dsk/c0t6d0. "B" option allows the creation of a bootable disk.<BR># pvcreate -B /dev/rdsk/c0t6d0<BR>2,Create the LIF area on the boot disk<BR># mkboot -l /dev/rdsk/c0t6d0<BR>3,Update the AUTO file of the LIF with the necessary command to automatically boot the system<BR># mkboot -a "hpux (;0) /stand/vmunix" /dev/rdsk/c0t6d0<BR>4,Add the new disk(/dev/dsk/c0t6d0) to the root volume group(/dev/vg00)<BR># vgextend /dev/vg00 /dev/dsk/c0t6d0<BR>5,Check your job<BR># lvlnboot -v</DIV> <DIV></DIV>
查看全文
发表于:2006-07-04 ┆
阅读(840)
┆
评论(0)
Lvsplit/lvmerge:Backing up a mirrored disk
<DIV>The following example will split the root mirror created in the previous example, back up the data, and merge the two logical volumes back into the mirror<BR>Here are the commands to accomplish the backup and resynchronization:<BR>Before proceeding, if the logical volume contains a database, the database must be stopped before it is split. Otherwise the data contained in the split half could be invalid and of no use if it needs to be restored from the backup at a later date.</DIV> <DIV># sync<BR># lvsplit -s backup /dev/vg00/lvol1<BR>NOTE:With the "-s" option, the file "/dev/vg00/lvol1backup" would be created automatic<BR># fsck -p /dev/vg00/lvol1backup<BR># mkdir /lvol1backup<BR># mount /dev/vg00/lvol1backup /lvol1backup <BR># fbackup -f /dev/rmt/0h -0vHi /lvol1backup<BR># umount /lvol1backup<BR># lvmerge /dev/vg00/lvol1backup /dev/vg00/lvol1</DIV> <DIV></DIV>
查看全文
发表于:2006-07-04 ┆
阅读(775)
┆
评论(0)
Mirror a root disk
<DIV>The following example will create a single mirror for the root and primary swap logical volumes. </DIV> <DIV>The commands assume the following:<BR>*The root volume group is vg00<BR>*The root logical volume is lvol1<BR>*The primary swap device is lvol2<BR>*The root bootable system disk is Instance 0<BR>*The mirror copy disk is Instance 1<BR>The following commands will accomplish the task:<BR># pvcreate -B /dev/rdsk/c0t1d0<BR># mkboot -l /dev/rdsk/c0t1d0<BR># mkboot -a "hpux (;0) /stand/vmunix" /dev/rdsk/c0t1d0<BR># vgextend /dev/vg00 /dev/dsk/c0t1d0<BR># lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t1d0<BR># lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c0t1d0<BR># lvlnboot -r /dev/vg00/lvol1<BR># lvlnboot -s /dev/vg00/lvol2<BR># lvlnboot -R<BR># vgcfgbackup vg00</DIV> <DIV></DIV>
查看全文
发表于:2006-07-04 ┆
阅读(766)
┆
评论(0)
Add an LVM Disk and etc.
<DIV># pvcreate -f /dev/rdsk/c0t4d0<BR># mkdir /dev/vg05<BR># mknod /dev/vg05/group c 64 0x050000<BR># vgcreate /dev/vg05 /dev/dsk/c0t4d0<BR># lvcreate -L 100 vg05<BR># lvcreate -L 100 vg05<BR># newfs /dev/vg05/rlvol1<BR># newfs /dev/vg05/rlvol2<BR># mkdir /vg5lv1 /vg5lv2<BR># mount /dev/vg05/lvol1 /vg5lv1<BR># mount /dev/vg05/lvol2 /vg5lv2<BR># vgcfgbackup vg05</DIV> <DIV> </DIV> <DIV>Extend An LVM Logical Volume:<BR># lvextend -L 200 /dev/vg05/lvol2<BR># umount /dev/vg05/lvol2<BR># extendfs /dev/vg05/rlvol2<BR># mount /dev/vg05/lvol2<BR># vgcfgbackup vg05<BR></DIV> <DIV> </DIV> <DIV>Reduce the Size of an LVM Logical Volume:<BR># fbackup -f /dev/rmt/0m -0vHi /accounts<BR># umount /dev/vg05/lvol2<BR># lvreduce -L 100 /dev/vg05/lvol2<BR>(Alternatively, the logical volume can be reduced from a specific physical volume as shown below)<BR># lvreduce -L 100 /dev/vg05/lvol2 /dev/dsk/c0t6d0<BR># newfs /dev/vg05/rlvol2<BR># mount -a<BR>If there is sufficient space then restore the data:<BR># frecover -f /dev/rmt/0m<BR># vgcfgbackup vg05</DIV> <DIV> </DIV> <DIV>Moving an LVM Logical Volume:<BR># pvcreate -f /dev/rdsk/c0t2d0<BR># vgextend /dev/vg01 /dev/dsk/c0t2d0<BR># pvmove -n /dev/vg01/lvol1 /dev/dsk/c0t1d0 /dev/dsk/c0t2d0<BR># vgcfgbackup vg01<BR></DIV> <DIV> </DIV> <DIV></DIV> <DIV></DIV>
查看全文
发表于:2006-07-04 ┆
阅读(739)
┆
评论(0)
Remove an LVM Volume Group
<DIV>1,Backup all user data in the volume to be removed<BR>(Use fbackup, cpio or tar backup utilities as appropriate.)<BR>2,Determine the names of the logical volumes residing in the volume groups to be removed<BR># lvdisplay /dev/vgXX/lvol*<BR>3,unmount all logical volumes in the volume group to be removed<BR># cd /<BR># umount /dev/vgxx/lvol*<BR>4,Remove the logical volumes found in step2 from the volume group<BR># lvremove /dev/vgxx/lvolY<BR>5,Determine if multiple physical volumes are associated with the volume group to be removed<BR># strings /etc/lvmtab<BR>6,If more than one physical volume, REMOVE ALL BUT ONE of the physical volumes using the vgreduce command<BR># vgreduce /dev/vgxx /dev/dsk/cxtxdx<BR>7,Now, remove the volume group<BR># vgremove /dev/vgxx<BR></DIV> <DIV></DIV>
查看全文
发表于:2006-07-04 ┆
阅读(718)
┆
评论(0)