下面是使用VIO的AIX服务器上功能删除一块存储上硬盘分区的操作方法

操作环境:AIX操作系统版本5.3

AIX删除用户卷组VG操作3大步骤如下:

l  umount  文件系统

l  varyoffvg 指定datavg

l  exportvg  删除vg(从ODM库里去掉该VG信息)此时lsvg看不到该vg,再删除PV

注意:由于这次操作vg用户卷组ibmvg01不需要保留数据,故可以不保留原数据操作。还由于这次操作vg中只有一个PV所以用不到reducevg

详细步骤如下:

l  umount  文件系统

首先确认vg名字 运行lsvg 确认要操作删除用户vg名字为ibmvg01 如下

root@SVR059138[/]>lsvg

rootvg

ibmvg01

检查PV 命令lspv 检查得知用户VG  ibmvg01 只有一个PV:hdisk2 且PVID 是000ce4f0d68912aa

root@SVR059138[/]>lspv

hdisk0          000ce4f06dbe60eb                    rootvg          active

hdisk1          000ce4f06e3b8263                    rootvg          active

hdisk2          000ce4f0d68912aa                    ibmvg01        active

检查确认要操作VG的mount point 运行命令lsvg –l ibmvg01查找对应MOUNT点是/opt/IBM

root@SVR059138[/]>lsvg -l  ibmvg01

ibmvg01:

LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT

ibmlv01             jfs2       784   784   1    open/syncd            /opt/IBM

loglv00             jfs2log    1     1     1    open/syncd              N/A

可以用df –g命令再确认MOUNT点是/opt/IBM

Loglv00这个

root@SVR059138[/]>df -g

Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on

/dev/hd4           4.00      2.55   37%     3527     1% /

/dev/hd2           7.00      5.18   27%    42053     4% /usr

/dev/hd9var        0.25      0.17   32%      568     2% /var

/dev/hd3           2.00      1.31   35%     7558     3% /tmp

/dev/hd1           1.00      1.00    1%       92     1% /home

/proc                 -         -    -         -     -  /proc

/dev/hd10opt      50.00      5.77   89%   108206     8% /opt

/dev/ibmlv01      49.00     48.99    1%        4     1% /opt/IBM

由于这次操作vg用户卷组ibmvg01不需要保留数据,故可以直接后续操作

确认上面信息下面可以umount 该vg文件系统,运行smit umount 命令选择  Unmount a File System

root@SVR059138[/]>smit umount

Unmount a File System

Move cursor to desired item and press Enter.

 Unmount a File System

Unmount a Group of File Systems

在下面画面里在NAME of file system to unmount按F4选择/opt/IBM 如下图按执行

Unmount a File System

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

[Entry Fields]

Unmount ALL mounted file systems?                   no

Unmount all REMOTELY mounted file systems?          no

NAME of file system to unmount                     []

REMOTE NODE containing the file system(s)          []

to unmount

上面运行提示成功之后,df –g命令,检查确认之前下面一行已经不再显示,确认umount成功

/dev/ibmlv01      49.00     48.99    1%        4     1% /opt/IBM

l  varyoffvg 指定datavg

运行smit varyoffvg 在VOLUME GROUP name按F4选择用户卷组ibmvg01

root@SVR059138[/]>smit varyoffvg

Deactivate a Volume Group

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

[Entry Fields]

VOLUME GROUP name                                  []

Put volume group in SYSTEM                          no

MANAGEMENT mode?

按执行之后执行运行lsvg还显示ibmvg01 ,如果运行lsvg –l ibmvg01 查看VG详细内容会提示你该VG状态已经不是vary on 这样确认vg已经varyoff

l  exportvg  删除vg

运行命令smit exportvg从ODM库里彻底去掉该vg相关信息,在* VOLUME GROUP name   F4选择ibmvg01如下:

Export a Volume Group

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

[Entry Fields]

* VOLUME GROUP name                                  [ibmvg01]

运行lsvg 已经不显示被清理掉的ibmvg01了,确认exportvg成功

root@SVR059138[/]>lsvg

rootvg

此时运行lspv 对照之前lspv内容,原来挂在ibmvg01下的 hdisk2的第三列显示None已经没有关联任何vg如下:

root@SVR059138[/]>lspv

hdisk0          000ce4f06dbe60eb                    rootvg          active

hdisk1          000ce4f06e3b8263                    rootvg          active

hdisk2          000ce4f0d68912aa                    None 

此时可以已经删除VG 下的PV了 ,运行命令rmdev -dl hdisk2 成功之后lspv 之前hdisk2内容

root@SVR059138[/]>lspv

hdisk0          000ce4f06dbe60eb                    rootvg          active

hdisk1          000ce4f06e3b8263                    rootvg          active

hdisk2          000ce4f0d68912aa                    None

root@SVR059138[/]>rmdev -dl hdisk2

hdisk2 deleted

root@SVR059138[/]>lspv

hdisk0          000ce4f06dbe60eb                    rootvg          active

hdisk1          000ce4f06e3b8263                    rootvg          active

至此要删除的VG和VG下属的PV,在AIX 的LPAR 中都已经彻底清理干净。后续再在VIO里去掉对应相关内容

从LPAR配置信息Excel中查询该AIX服务器是使用VIO,VIO的地址是10.52.1.247

在刚刚登陆AIX中Telnet VIO地址10.52.1.247 登录ID: padmin 如下出现$符合登录成功

root@SVR059138[/]>telnet 10.52.1.247

Trying...

Connected to 10.52.1.247.

Escape character is '^]'.

telnet (vios_3rd)

IBM Virtual I/O Server

login: padmin

padmin's Password:

Last unsuccessful login: Wed Jan 27 05:58:52 CST 2010 on /dev/pts/0 from10.52.1.138

Last login: Thu Jul 15 09:46:29 CDT 2010 on /dev/pts/4 from 10.52.1.138

$

运行lsmap –all查看所有VIO中VHOST和设备的关联关系,显示结果中,其中对应操作LPAR的 VHOST3信息如下

说明:(查询vhost和LPAR的关系,已知的一种方法就是登录HMC选择P5该服务器VIO的LPAR比如VIOS然后选择Hardware Inoformationà Virtual I/O  Adapters àSCSI 会显示VHOST和LPAR对应关系清单,可以获得对应关系,我们知道操作LPAR的VHOST名称是VHOST3

SVSA            Physloc                                      Client Partition ID

--------------- -------------------------------------------- ------------------

vhost3          U9133.55A.06EBC8G-V1-C23                     0x00000004

VTD                   p55a3_lpar03_01

Status                Available

LUN                   0x8100000000000000

Backing device        hdisk14

Physloc               U7311.D20.068E47B-P1-C08-T1-W201400A0B8117590-L7000000000000

运行$oem_setup_env(在VIOS中切换到AIX指令环境,命令行开始符号变为#) 再运行lspv命令显示vio 识别的所有PV清单查找对应上面查询到hdisk4的PV ID 为 000ce4f0d68912aa

$ oem_setup_env

# lspv

hdisk0          000ce4f06ab32cbf                    rootvg          active

hdisk1          000ce4f06b1227e6                    rootvg          active

hdisk6          0006556f208991e0                    None

hdisk11         0006556f2089944c                    None

hdisk12         0006556f30d573de                    None

hdisk13         0006556f30d5747c                    None

hdisk14         000ce4f0d68912aa                    None           

hdisk15         0006556f30d575ac                    None

hdisk16         0006556f30d57620                    None

hdisk24         0006549d9bafc833                    None

hdisk25         0006549d9baff789                    None

hdisk32         000ce4f0d6894d5c                    None

hdisk7          0006556fd1c7cec7                    None

hdisk8          0006549d13f71cc7                    None

hdisk18         0006556fcecedbf3                    None

hdisk19         0006556f82f5cb8d                    None

hdisk20         0006556f82f77766                    None

hdisk26         000ce4f02b66f04d                    None

hdisk27         000ce4f02b7406f7                    None

hdisk28         000ce4f086c609a8                    None

hdisk29         000ce4f07dacdfe0                    None

hdisk30         none                                None

hdisk31         none                                None

先rmvdev

$mkvdev –vdev hdisk?(VISO PV) -vadapter vhost?(LPAR Vhost Name) -dev VTD(格式:AIX机器编号_LPAR编号_磁盘序号,如:p55a1_lpar01_01)把新增的LUN分配给具体LPAR中,$exit(退出VIOS环境到AIX LPAR中)

再 rmdev –dev

随后在存储上操作

在存储上操作完成之后,在先在VIO中配置完成,后面再执行如下操作,把新划出来的PV加入LPAR中

第三部分VIO里重新定义好PV之后 在AIX   LPAR里如下操作

大致步骤

l  建立VG

l  建立文件系统smit fs  *

l  Mount建立的文件系统

*说明: 建立文件系统自动自动创建相关LV不需要额外手动去建立LV比较方便,手动去建立LV主要是针对比如有条带化或许要建立镜像等这样的特别需求,这次需求没有特殊需求顾可以直接通过SMIT中建立文件系统自动生成LV. 建立文件系统的时候请不要把VG中空间都用完,VG保留少量几百兆Free空间(同仁经验VG空间全都分配完,可能会导致不稳定)

lspv确认已经能显示到更新新增的PV 应该如下,记录下PV 名字hdisk2

root@SVR059138[/]>lspv

hdisk0          000ce4f06dbe60eb                    rootvg          active

hdisk1          000ce4f06e3b8263                    rootvg          active

hdisk2          000ce4f0d68912aa                    None 

然后新增VG,运行命令 smit vg 如下保守些可以先选择List All Volume Groups查看确认当前系统已有vg,然后F3回到下面菜单选择Add a Volume Group

Volume Groups

Move cursor to desired item and press Enter.

List All Volume Groups

Add a Volume Group

Set Characteristics of a Volume Group

List Contents of a Volume Group

Remove a Volume Group

Activate a Volume Group

Deactivate a Volume Group

Import a Volume Group

Export a Volume Group

Mirror a Volume Group

Unmirror a Volume Group

Synchronize LVM Mirrors

Back Up a Volume Group

Remake a Volume Group

Preview Information about a Backup

Verify the Readability of a Backup (Tape only)

View the Backup Log

List Files in a Volume Group Backup

Restore Files in a Volume Group Backup

选择之后后面菜单如下,选择Add a Big Volume Group

注意:Add an Original Volume Group不使用,操作系统5.3大部分用Add a Big Volume Group

操作系统6.1大多选择Add a Scalable Volume Group 具体原因这里暂不讨论

Add a Volume Group

Move cursor to desired item and press Enter.

Add an Original Volume Group

 Add a Big Volume Group

Add a Scalable Volume Group

如下菜单中:

VOLUME GROUP name 输入VG名字ibmvg01

* PHYSICAL VOLUME names 选项F4选择 hdisk2

Force the creation of a volume group 请修改为YES 这个是同仁前辈经验

Add a Big Volume Group

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

[Entry Fields]

VOLUME GROUP name                                  []

Physical partition SIZE in megabytes

* PHYSICAL VOLUME names                              []

Force the creation of a volume group?               no

Activate volume group AUTOMATICALLY                 yes

at system restart?

Volume Group MAJOR NUMBER                          []

Create VG Concurrent Capable?                       no

运行lsvg –l

下面运行smit fs 选择Add / Change / Show / Delete File Systems

root@SVR059138[/]>smit fs

File Systems

Move cursor to desired item and press Enter.

List All File Systems

List All Mounted File Systems

Add / Change / Show / Delete File Systems

Mount a File System

Mount a Group of File Systems

Unmount a File System

Unmount a Group of File Systems

Verify a File System

Backup a File System

Restore a File System

List Contents of a Backup

Create and back up a snapshot

建立JFS2文件系统所以选择Enhanced Journaled File Systems

Add / Change / Show / Delete File Systems

Move cursor to desired item and press Enter.

Enhanced Journaled File Systems

Journaled File Systems

CDROM File Systems

Network File System (NFS)

选择Add an Enhanced Journaled File System

Enhanced Journaled File Systems

Move cursor to desired item and press Enter.

Add an Enhanced Journaled File System

Add an Enhanced Journaled File System on a Previously Defined Logical Volume

Change / Show Characteristics of an Enhanced Journaled File System

Remove an Enhanced Journaled File System

Manage Quotas for an Enhanced Journaled File System

Defragment an Enhanced Journaled File System

List Snapshots for an Enhanced Journaled File System

Create Snapshot for an Enhanced Journaled File System

Mount Snapshot for an Enhanced Journaled File System

Remove Snapshot for an Enhanced Journaled File System

Unmount Snapshot for an Enhanced Journaled File System

Change Snapshot for an Enhanced Journaled File System

Rollback an Enhanced Journaled File System to a Snapshot

出现小窗口选择ibmvg01

Volume Group Name

Move cursor to desired item and press Enter.

rootvg

ibmvg01                                        

Unit Size 选择容量单位,下面是选择M为单位,也可以选择G为单位:

注意:建议计算下,给VG留下1G空余空间,若建立FS空间超过VG当前最大可用空间,执行会提示报错

Add an Enhanced Journaled File System

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

[Entry Fields]

Volume group name                                   ibmvg01

SIZE of file system

Unit Size                                   Megabytes

*         Number of units                            [50000]

* MOUNT POINT                                        [/opt/IBM]

Mount AUTOMATICALLY at system restart?              yes

PERMISSIONS                                         read/write

Mount OPTIONS                                      []

Block Size (bytes)                                  4096

Logical Volume for Log

Inline Log size (MBytes)                           []

Extended Attribute Format                           Version 1

ENABLE Quota Management?                            no

正常运行完之后有如下提示

COMMAND STATUS

Command: running       stdout: yes           stderr: no

Before command completion, additional instructions may appear below.

File system created successfully.

51247384 kilobytes total disk space.

New File System size is 102498304

运行完成lsvg ibmvg01验证下,确认

root@SVR059138[/]>lsvg ibmvg01

VOLUME GROUP:       ibmvg01                  VG IDENTIFIER: 000ce4f00000d60000000129d57707

21

VG STATE:           active                   PP SIZE:        64 megabyte(s)

VG PERMISSION:      read/write               TOTAL PPs:      799 (51136 megabytes)

MAX LVs:            512                      FREE PPs:       16 (1024 megabytes)

LVs:                2                        USED PPs:       783 (50112 megabytes)

OPEN LVs:           0                        QUORUM:         2

TOTAL PVs:          1                        VG DESCRIPTORS: 2

STALE PVs:          0                        STALE PPs:      0

ACTIVE PVs:         1                        AUTO ON:        yes

MAX PPs per VG:     130048

MAX PPs per PV:     1016                     MAX PVs:        128

LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no

HOT SPARE:          no                       BB POLICY:      relocatable

root@SVR059138[/]>df -g

Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on

/dev/hd4           4.00      2.55   37%     3527     1% /

/dev/hd2           7.00      5.18   27%    42053     4% /usr

/dev/hd9var        0.25      0.17   32%      568     2% /var

/dev/hd3           2.00      1.31   35%     7557     3% /tmp

/dev/hd1           1.00      1.00    1%       92     1% /home

/proc                 -         -    -         -     -  /proc

/dev/hd10opt      50.00      5.77   89%   108206     8% /opt

root@SVR059138[/]>smit mount

Mount a File System

Move cursor to desired item and press Enter.

List All Mounted File Systems

 Mount a File System

Mount a Group of File Systems

Mount a File System

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

[Entry Fields]

FILE SYSTEM name                                   [/dev/fslv01]

DIRECTORY over which to mount                      [/opt/IBM]

TYPE of file system

FORCE the mount?                                    no

REMOTE NODE containing the file system             []

to mount

Mount as a REMOVABLE file system?                   no

Mount as a READ-ONLY system?                        no

Disallow DEVICE access via this mount?              no

Disallow execution of SUID and sgid programs        no

in this file system?

root@SVR059138[/]>df -g

Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on

/dev/hd4           4.00      2.55   37%     3527     1% /

/dev/hd2           7.00      5.18   27%    42053     4% /usr

/dev/hd9var        0.25      0.17   32%      568     2% /var

/dev/hd3           2.00      1.31   35%     7557     3% /tmp

/dev/hd1           1.00      1.00    1%       92     1% /home

/proc                 -         -    -         -     -  /proc

/dev/hd10opt      50.00      5.77   89%   108206     8% /opt

/dev/fslv01       48.88     48.87    1%        4     1% /opt/IBM

【AIX】AIX磁盘相关操作相关推荐

  1. 04Linux常用命令(文件系统与磁盘相关操作)

    Linux常用命令(文件系统与磁盘相关操作) 1.基础知识 1:通常称呼一个可被挂载的数据为一个文件系统而不是一个分区.2:操作系统的文件数据除了文件的实际内容外,通常含有非常多的属性,例如Linux ...

  2. logical readahead mysql_优化 AIX 7 磁盘性能,第 1 部分: 磁盘 I/O 概述和长期监控工具...

    优化 AIX 7 磁盘性能,第 1 部分: 磁盘 I/O 概述和长期监控工具(sar.nmon 和 topas) Martin C. Brown, 作家, Freelance Ken Milberg, ...

  3. oracle log.xml分析,怎么在alert目录下的log.xml中关闭logminer的相关操作日志? — oracle-tech...

    Oracle版本10g-19c中,使用了logminer,但是在$ORACLE_SID/alert的目录下产生了大量的log_x.xml [email protected] alert]$ cd /o ...

  4. [RabbitMQ]RabbitMQ原理与相关操作(一)

    2019独角兽企业重金招聘Python工程师标准>>> RabbitMQ原理与相关操作(一) 小编是菜鸟一枚,最近想试试MQ相关的技术,所以自己看了下RabbitMQ官网,试着写下自 ...

  5. 【存储知识学习】第三章磁盘原理与技术3.2磁盘的通俗演绎和3.3磁盘相关高层技术--《大话存储》阅读笔记

    3.2磁盘的通俗演绎 将具体的磁盘抽象成LBA,LBA1表示0号盘片,0号磁道的0号扇区,依次类推,LBA地址到实际的盘片.磁道.扇区地址的映射工作由磁盘内部的逻辑电路来查询ROM中对应表而得到,这样 ...

  6. 虚拟磁盘类型_一起来了解一下Window10系统中虚拟硬盘的相关操作

    大家好,我是波仔欢迎大家又来和我一起分享电脑知识,我们今天来分享一下虚拟硬盘部分的一些相关的操作. 虚拟硬盘 VHD格式的虚拟硬盘最开始应用在微软的Virtual PC和Virtual Server中 ...

  7. 不同存储结构的文件磁盘io操作次数_MySQL InnoDB存储引擎

    第1章 MySQL体系结构和存储引擎 1.1数据库和实例 数据库:物理操作系统文件或其他形式文件类型的集合.实例:MySQL数据库由后台线程以及一个共享内存区组成.共享内存可以被运行 的后台线程所共享 ...

  8. 库,表,记录的相关操作

    系统数据库 information_schema: 虚拟库,不占用磁盘空间,存储的是数据库启动后的一些参数,如用户表信息.列信息.权限信息.字符信息等 performance_schema: MySQ ...

  9. Linux磁盘相关-分区与修复

    转自:http://balistardut.github.io/2016/01/30/Linux%E7%A3%81%E7%9B%98%E7%9B%B8%E5%85%B3-%E5%88%86%E5%8C ...

最新文章

  1. wildfly-9.0.2 web项目部署详细步骤
  2. 骑马与砍杀服务器修复,骑马与砍杀修复存档损坏的办法
  3. NS3使用Eclipse配置
  4. 合唱队形(DP算法入门)
  5. C语言中的各种百分号都代表什么意思
  6. 最小二乘法的对偶形式(CVX)
  7. Python12306自动抢票下单,五一旅游回家就选Python
  8. sourceTree回退代码
  9. 1.ISIS基本理论
  10. 和block循环引用说再见
  11. 人民币小写转大写的一般方法
  12. PHOTOSHOP给MM去斑的最简单方法
  13. 博弈论(初级)——数学知识(C++)
  14. 机器学习模型 非线性模型_pycaret在几分钟内准备好您的机器学习模型
  15. 番外篇:STM32之GPIO口速率配置究竟代表什么
  16. python 全栈开发,Day21(抽象类,接口类,多态,鸭子类型)
  17. VUE之Vxe-table动态生成多级表头及后端返回数据的处理
  18. Android学习:线程同步之synchronized
  19. 【渝粤教育】广东开放大学 管理基础与实务 形成性考核 (42)
  20. 漏洞复现之ms10_018

热门文章

  1. 绕过Windows XP的密码在安全模式
  2. AWS Organizations如何确保云帐户安全?
  3. 14(高级)CSS动画之:旋转星球
  4. Nginx部署vue项目
  5. mysql 全屏显示_popupwindow全屏显示-备忘(示例代码)
  6. 30年前,钱学森就给VR取了个中国味特浓的名字
  7. 婚恋交友系统—婚恋中的媒婆,婚恋交友系统演示
  8. 【power bi】搭建——理解函数
  9. 电阻触摸屏的校准算法
  10. 网站建设初期如何做好SEO工作