[rhel6.5]在线根分区卷组扩展
2018-02-23 17:16
239 查看
实验环境
操作系统类型
必须要注意的一点是,根分区必须是使用可扩展的LVM卷组的方式进行挂载的
使用命令
首先需要添加一块硬盘
使用命令查看新增加的硬盘,大小为
重点内容
执行划分分区的命令,需要调整类型为8e
通知内核重新读取分区表
首先制作’Physical Volume’
使用命令
将制作好的加入到卷组里面
通过命令
扩展逻辑卷组边界
执行逻辑卷组的边界扩展
通过
前后大小进行对比的截图
操作系统类型
rhel6.5
KVM类型的虚拟机
必须要注意的一点是,根分区必须是使用可扩展的LVM卷组的方式进行挂载的
使用命令
df -h进行查看
[root@server6 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 18G 9.4G 7.1G 57% / tmpfs 487M 0 487M 0% /dev/shm /dev/vda1 485M 33M 427M 8% /boot
首先需要添加一块硬盘
使用命令查看新增加的硬盘,大小为
8G;
[root@server6 ~]# fdisk -l
重点内容
执行划分分区的命令,需要调整类型为8e
[root@server6 ~]# fdisk -cu /dev/vdc Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0xadcf4a9d. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First sector (2048-16777215, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-16777215, default 16777215): Using default value 16777215 Command (m for help): t Selected partition 1 Hex code (type L to list codes): 8e Changed system type of partition 1 to 8e (Linux LVM) Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
通知内核重新读取分区表
[root@server6 ~]# partx /dev/vdc # 1: 2048- 16777215 ( 16775168 sectors, 8588 MB) # 2: 0- -1 ( 0 sectors, 0 MB) # 3: 0- -1 ( 0 sectors, 0 MB) # 4: 0- -1 ( 0 sectors, 0 MB)
首先制作’Physical Volume’
[root@server6 ~]# pvcreate /dev/vdc1 Physical volume "/dev/vdc1" successfully created
使用命令
pvs进行查看
将制作好的加入到卷组里面
[root@server6 ~]# vgextend VolGroup /dev/vdc1 Volume group "VolGroup" successfully extended
通过命令
vgs查看卷组的大小改变
扩展逻辑卷组边界
[root@server6 ~]# lvextend -L +8G /dev/VolGroup/lv_root Extending logical volume lv_root to 25.61 GiB Insufficient free space: 2048 extents needed, but only 2047 available [root@server6 ~]# lvextend -l +2047 /dev/VolGroup/lv_root Extending logical volume lv_root to 25.60 GiB Logical volume lv_root successfully resized
执行逻辑卷组的边界扩展
[root@server6 ~]# resize2fs /dev/VolGroup/lv_root resize2fs 1.41.12 (17-May-2010) Filesystem at /dev/VolGroup/lv_root is mounted on /; on-line resizing required old desc_blocks = 2, new_desc_blocks = 2 Performing an on-line resize of /dev/VolGroup/lv_root to 6711296 (4k) blocks. 4000 The filesystem on /dev/VolGroup/lv_root is now 6711296 blocks long.
通过
df -h来查看最后结果的改变
[root@server6 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 26G 9.4G 15G 40% / tmpfs 487M 0 487M 0% /dev/shm /dev/vda1 485M 33M 427M 8% /boot
前后大小进行对比的截图
相关文章推荐
- RHEL5下逻辑卷的在线扩展
- linux基础(17)--使用GPT分区、扩展swap分区--RHEL6.5
- 一步一步在RHEL6.5+VMware Workstation 10上搭建 oracle 11gR2 rac + 物理 dg
- RHEL6.5 drdb配置
- RHEL6.5使用CENTOS的YUM源 分…
- Centos6.5 编译安装php扩展curl
- parted LVM划分4T磁盘,在线扩展1.5T
- RHEL6.5/Centos6.5 搭建bugzilla
- docker 1.3 2 installation on rhel 6.5_x64 without network access
- 基于RHEL 6.5安装Oracle 11g详细教程(2)——安装RHEL6.5
- IBM存储扩展柜磁盘在线扩容(一)
- mysql-5.5.36.tar.gz 在rhel 6.5上的编译安装
- chrome扩展 Read Later Fast 保存页面 离线|在线 书签 阅读
- 在Centos7下,在线进行lv的扩展
- 在线添加磁盘,扩展LVM卷案例
- RHEL 6.5忘记root密码处理方法
- 在CentOS/RHEL 6.5上安装Chromium
- RHEL6.5 CentOS 6.5 support NTFS filesystem !
- RHEL7虚拟机中不重启的情况下加新硬盘及扩展根分区容量
- RHEL6.5 LVM使用解析