1、prtconf命令

查看AIX主机的结构特征状态

语法:

prtconf [ -c ] [ -k ] [ -L ] [ -m ] [ -s ] [ -v ]

Flags:

-c  Displays cpu type, for example, 32-bit or 64-bit.

-k  Display the kernel in use, for example, 32-bit or 64-bit.

-L  Displays LPAR partition number and partition name if this is an LPAR partition, otherwise returns "-1 NULL".

-m  Displays system memory.

-s   Displays processor clock speed in MegaHertz.

-v   Displays the VPD found in the Customized VPD object class for devices.

2、卷组相关命令

2.1 lsvg查看卷组信息

语法:

lsvg [ -L ] [ -o ] | [ -n DescriptorPhysicalVolume ] | [ -i ] [ -l | -M | -p ] VolumeGroup ...

flags:

-L  Specifies no waiting to obtain a lock on the Volume group.

  -p  Lists the following information for each physical volume within the group specified by the VolumeGroup parameter:

-l  Lists the following information for each logical volume within the group specified by the VolumeGroup parameter:

  -o  Lists only the active volume groups (those that are varied on). An active volume group is one that is available for use.

Eg:

-o选项经常使用,查看当前已经激活卷组。

2.2 lspv查看物理硬盘

语法:

lspv [ -L ] [ -l | -p | -M ] [ -n DescriptorPhysicalVolume] [ -v VolumeGroupID] PhysicalVolume

eg:

2.3 lslv查看逻辑卷

To Display Logical Volume Information

语法:

lslv [ -L ] [ -l| -m ] [ -nPhysicalVolume ] LogicalVolume

eg:

2.4 varyonvg激活/varyoffvg关闭卷组

命令所在位置:/usr/sbin

语法:

(1)     激活:

varyonvg [ -b ] [ -c ] [ -f ] [ -M LTGSize ] [ -n ] [ -p ] [ -r ] [ -s ] [ -t ] [ -u ] VolumeGroup

(2)     关闭:

varyoffvg [ -s ] VolumeGroup

2.5 mkvg创建卷组

注意:

一个物理卷只能属于一个卷组,一个卷组可以包含多个物理卷,因此,在创建卷组时,要确认某物理卷是否已经挂在某个卷组下。

语法:

mkvg [ -B ] [ -t factor ] [ -S [ -v LogicalVolumes ] [ -P Partitions ] ][ -C ] [ -G ] [ -f ] [ -i ] [ -I ][ -c ] [ -x ] [ -L LTGSize ] [ -n ] [ -s Size ] [ -V MajorNumber ] [ -y VolumeGroup ] PhysicalVolume ...

Flags

    -B

Creates a Big-type volume group. This can accommodate up to 128 physical volumes and 512 logical volumes. Note: Because the VGDA space has been increased substantially, every VGDA update operation (creating a logical volume, changing a log ical volume, adding a physical volume, and so on) may take considerably longer to run.

-f

Forces the volume group to be created on the specified physical volume unless the physical volume is part of another volume group in the Device Configuration Database or a volume group that is active.

    -n

Specifies that the volume group is not automatically available during a system restart. The default value activates the volume group automatically.

   -P Partitions

Total number of partitions in the volume group, where the Partitions variable is represented in units of 1024 partitions. Valid values are 32, 64, 128, 256, 512 768, 1024 and 2048. The default is 32 k (32768 partitions). The chvg command can be used to increase the number of partitions up to the maximum of 2048 k (2097152 partitions). This option is only valid with the

  -S

Creates a Scalable-type volume group. By default, this volume group can accommodate up to 1024 physical volumes, 256 logical volumes and 32768 physical partitions. To increase the number of logical volumes, use the -v option. To increase the number of physical partitions, use the -P option. Note: Increasing maxlvs and maxpps beyond the default values for a scalable volume group can significantly increase the size of the VGDA proportionately. The maxlvs and maxpps values should only be increased as needed because they cannot be decreased. Meanwhile, as the VGDA space increases all VGDA update operations (creating a logical volume, changing a logical volume, adding a physical volume, and so on) can take longer and longer to run.

-s Size

Sets the number of megabytes in each physical partition, where the Size variable is expressed in units of megabytes from 1 (1 MB) through 131072 (128 GB). The Size variable must be equal to a power of 2 (example 1, 2, 4, 8). The default value for 32 and 128 PV volume groups will be the lowest value to remain within the limitation of 1016 physical partitions per PV. The

default value for scalable volume groups will be the lowest value to accommodate 2040 physical partitions per PV.

  -v

Number of logical volumes that can be created. Valid values are 256, 512, 1024, 2048 and 4096. The default is 256. The chvg command can be used to increase the number of logical volumes up to the maximum of 4096. This option is only valid with the -S option. The last logical volume is reserved for metadata.

  -y VolumeGroup

Specifies the volume group name rather than having the name generated automatically. Volume group names must be unique system wide and can range from 1 to 15 characters. The name cannot begin with a prefix already defined in the PdDv class in the Device Configuration database for other devices. The volume group name created is sent to standard output.

The volume group name can only contain the following characters: "A" through "Z," "a" through "z," "0" through "9," or "_" (the underscore), "-" (the minus sign), or "." (the period). All

other characters are considered invalid.

Eg:

#mkvg –y ‘testvg’ –s ‘256’ –n testpv1 testpv2 testpv3

说明:用物理卷testpv1、testpv2和testpv3组成一个名称为testvg卷组,每个PP大小为256M,每次系统启动都会自动挂载。

2.6 mklv创建逻辑卷

语法:

mklv [ -a Position ] [ -b BadBlocks ] [ -c Copies ] [ -C Stripe_width ] [ -d Schedule ] [ -e Range ] [ -i ] [ -L Label ] [ -m MapFile ] [ -o y / n ] [ -r Relocate ] [ -s Strict ] [ -t Type ] [ -T O ] [ -u UpperBound ] [ -v Verify ] [ -w MirrorWriteConsistency ] [ -x Maximum ] [ -y NewLogicalVolume | -Y Prefix ] [ -S StripSize ] [ -U Userid ] [ -G Groupid ] [ -P Modes ] VolumeGroup Number [ PhysicalVolume ... ]

Common falgs:

  -a Position

Sets the intra-physical volume allocation policy (the position of the logical partitions on the physical volume)

  -c Copies

Sets the number of physical partitions allocated for each logical partition. The Copies variable can be set to a value from 1 to 3; the default is 1.

-t Type

Sets the logical volume type. The standard types are jfs (journaled file systems), jfslog (journaled file system logs), jfs2 (enhanced journaled file system), jfs2log (enhanced journaled file system logs), and paging (paging spaces), but a user can define other logical volume types with this flag. You cannot create a striped logical volume of type boot. The default is jfs.

If a log is manually created for a filesystem, the user must run the logform command to clean out the new jfslog before the log can be used. For example, to format the logical volume

  -x Maximum

Sets the maximum number of logical partitions that can be allocated to the logical volume. The default value is 512. The number represented by the Number parameter must be equal to or less than the number represented by the Maximum variable.

  -y NewLogicalVolume

Specifies the logical volume name rather than having the name generated automatically. Logical volume names must be unique system wide and can range from 1 to 15 characters. If the volume group is varied on in concurrent mode, the new logical volume name should be unique across all the concurrent nodes where the volume group is varied on. The name cannot begin with a prefix already defined in the PdDv class in the Device Configuration Database for other devices.

Eg:

  #mklv –y testlv –t raw –s n –w n –r n testvg 15

说明:在testvg卷组中新建一个名为testlv的逻辑卷,大小为15个PP,逻辑卷类型使用的是裸设备,没设置分配策略,禁止逻辑卷被迁移。

2.7 chlv修改逻辑卷

修改逻辑卷的属性,可以通过smitty命令来设置逻辑卷属性。

语法:

  chlv [ -a Position ] [ -b BadBlocks ] [ -d Schedule ] [ -e Range ] [ -L label ] [ -o Y / N ] [ -p Permission ] [ -r Relocate ] [ -s Strict ] [ -t Type ] [ -u Upperbound ] [ -v Verify ] [ -w       MirrorWriteConsistency ] [ -x Maximum ] [ -T O / F ] [ -U Userid ] [ -G Groupid ] [ -P Modes ] LogicalVolume ...

eg:

chlv  -t jfs  -x 256 testlv

说明:把逻辑卷testlv的类型改为“jfs”,同时修改逻辑卷最大物理卷的数据为:256。

AIX常用命令学习(一)的更多相关文章

  1. Git版本控制软件结合GitHub从入门到精通常用命令学习手册(转)

    简要参考:http://www.tuicool.com/articles/mEvaq2 http://gitref.org/zh/index.html GIT 学习手册简介 本站为 Git 学习参考手 ...

  2. Linux的几个概念,常用命令学习

    Linux的几个概念,常用命令学习---------------------------------设备名装载点// 通过装载点访问设备-------------------------------- ...

  3. mondb 常用命令学习记录

    mondb 常用命令学习记录 一.MongoDB 下载安装 MongoDB官网 提供了可用于 32 位和 64 位系统的预编译二进制包,你可以从MongoDB官网下载安装,MongoDB 预编译二进制 ...

  4. aix 常用命令

    官网上的介绍: AIX 常用命令汇总 http://www.ibm.com/developerworks/cn/aix/library/au-dutta_cmds.html 我们先SSH 到AIX 系 ...

  5. mongodb常用命令学习笔记

    mongodb常用命令学习笔记 创建数据库 use DATABASE_NAME eg: use users; 如果数据库不存在,则创建数据库,否则切换到指定数据库.要显示刚刚创建的数据库,需要向数据库 ...

  6. npm常用命令学习(npm install -D,semver版本规范, npm进行版本管理的最佳实践用法)

    什么是npm npm有两层含义.一层含义是Node的开放式模块登记和管理系统,网址为npmjs.org.另一层含义是Node默认的模块管理器,是一个命令行下的软件,用来安装和管理Node模块. npm ...

  7. windows下docker的安装及常用命令学习

    docker search 镜像名 本文主要介绍Docker在Windows下的安装.关于Docker的介绍和文档在其官网中可以找到:http://www.docker.com .安装环境:Windo ...

  8. Docker | Docker常用命令学习笔记

    @ 目录 前言 1. 帮助命令: version.info.help 2. 镜像命令: images.search pull.rmi 3. 容器命令: pull.run ps.exit .ctrl+P ...

  9. GIT 版本控制常用命令学习汇总

    GIT 版本控制常用命令汇总 git version 查看当前git版本信息 git help 获取全部命令帮助信息 git help <command> 获取指定命令帮助信息 git c ...

随机推荐

  1. VUE之文字跑马灯效果

    VUE之文字跑马灯效果 1.效果演示 2.相关代码 <!DOCTYPE html> <html lang="en"> <head> <me ...

  2. 【C#小知识】C#中一些易混淆概念总结---------数据类型存储,方法调用,out和ref参数的使用

    这几天一直在复习C#基础知识,过程中也发现了自己以前理解不清楚和混淆的概念.现在给大家分享出来我的笔记: 一,.NET平台的重要组成部分都是有哪些 1)FCL (所谓的.NET框架类库) 这些类是微软 ...

  3. tomcat启动(Ⅷ)--请求最终目的地 getContainer().getPipeline().getFirst().invoke(request, response)

    当tomcat的Conector保存着StandardService实例,而StandardService保存着Container的实例 当Http11NioProcessor.process()方法 ...

  4. docker 创建jdk镜像

    基于上一个创建的基础镜像, wenbronk/centos Dockerfile ############################################ # version : we ...

  5. java面试⑤前端部分

    2.4.1 简单说一下HTML,CSS,javaScript在网页开发中的定位? 2.4.2简单介绍一下AJAX 2.4.3 JS和JQuery的关系 2.4.4 JQuery的常用选择器 2.4.5 ...

  6. java.util.Collection源码分析和深度讲解

    写在开头 java.util.Collection 作为Java开发最常用的接口之一,我们经常使用,今天我带大家一起研究一下Collection接口,希望对大家以后的编程以及系统设计能有所帮助,本文所 ...

  7. Node.js进程管理之子进程

    一.理论 之前看多进程这一章节时发现这块东西挺多,写Process模块的时候也有提到,今天下午午休醒来静下心来好好的看了一遍,发现也不是太难理解. Node.js是单线程的,对于现在普遍是多处理器的机 ...

  8. Linux 文件流管理

    1. 打开/关闭文件 1). 打开文件 / fopen 作用: 打开一个文件,将其与文件流联系起来,方便后续的操作 头文件: #include <stdio.h> 函数原型: FILE * ...

  9. Spring4 MVC ContentNegotiatingViewResolver多种输出格式实

    前段时间在一个项目里面发现,针对Excel的处理没有一个公用的视图,来个下载的需求就要自己去写一堆POI的东西,终于有一天给我也来了几个,还是按照以前的方式来写,写多了真心想吐,后面想想还是有必要整个 ...

  10. awk去重以某列重复的行

    [root@localhost cc]# cat 2.txt adc 3 5 a d aa 3 adfa d ba 3 adf 去重第一列重复的行: [root@localhost cc]# cat ...