搭建KVM环境——05 添加一块新的硬盘存放虚拟机OK

一路默认选项

改一下名字,标识这是虚拟的磁盘

重启虚拟机,reboot。这样OS就能识别到新添加的磁盘。使用fdisk查看新添加的磁盘,sdb就是

[[email protected] ~]# fdisk -l

Disk /dev/sda: 171.8 GB, 171798691840 bytes, 335544320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0003c3c6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048   335544319   167259136   8e  Linux LVM

Disk /dev/sdb: 171.8 GB, 171798691840 bytes, 335544320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/centos-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/centos-home: 115.4 GB, 115368525824 bytes, 225329152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

查看sdb,显示还没有进行格式化,分区。

[[email protected] ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x7febc8c5.

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   g   create a new empty GPT partition table
   G   create an IRIX (SGI) partition table
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition‘s system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-335544319, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-335544319, default 335544319):
Using default value 335544319
Partition 1 of type Linux and of size 160 GiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

原文地址:https://www.cnblogs.com/kelamoyujuzhen/p/9070538.html

时间: 2024-10-30 07:27:16

搭建KVM环境——05 添加一块新的硬盘存放虚拟机OK的相关文章

搭建KVM环境——06 添加一块新的硬盘存放虚拟机

虚拟机磁盘格式 创建一个raw格式的虚拟机磁盘 [[email protected] opt]# qemu-img create -f raw CentOS-7.2-x86_64.raw 10G Formatting 'CentOS-7.2-x86_64.raw', fmt=raw size=10737418240 [[email protected] opt]# ll -h total 16K -rw-r--r-- 1 root root 10G May 22 19:23 CentOS-7.2

搭建KVM环境——07 带GUI的Linux上安装KVM图形界面管理工具

清空yum源缓存,并查看yun源 [[email protected] ~]# yum clean all Loaded plugins: fastestmirror, langpacks Cleaning repos: vcd Cleaning up everything Cleaning up list of fastest mirrors [[email protected] ~]# yum repolist Loaded plugins: fastestmirror, langpacks

条理清晰的搭建SSH环境之添加所需jar包

一.首先介绍要添加框架环境: JUnit Struts2 Hibernate Spring (1)配置JUnit /**-------------------------添加JUnit-------------------------------*/ 右击Web项目--->Build Path--->Add Libraries--->在"Add Libraries窗口选择Junit"--- --->Next--->选择版本JUnit 4 /**------

搭建kvm环境,及批量自动化部署

本实验使用两台主机:10.0.91.8 作为虚拟机的宿主机10.0.91.10 配置httpd服务,提供10.0.91.8安装虚拟机要使用的镜像及自动应答文件kickstart 主机环境: [[email protected] ~]# cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) [[email protected] ~]# uname -r3.10.0-862.11.6.el7.x86_64 10.0.91.8主机上执

简述从添加一块新硬盘到在这个硬盘上创建一个文本文件的全步骤

权限管理 添加新硬盘全步骤 简述从添加一块新硬盘到在这个硬盘上创建一个文本文件的全步骤,并注明在步骤中使用的命令 查看分区命令 fdisk -l help n add a new partition p print the partition table w write table to disk and exit 分区已经建立好 刚才未保存,重新建立了一遍 文件系统已经建立完毕! 使用mkfs创建文件系统 mkfs [-V] [-t 文件系统类型] [文件系统特有参数] 设备名 [块数量] [

搭建SSH环境之添加所需jar包

一.首先介绍要添加框架环境: JUnit Struts2 Hibernate Spring (1)配置JUnit /**-------------------------添加JUnit-------------------------------*/ 右击Web项目--->Build Path--->Add Libraries--->在“Add Libraries窗口选择Junit”--- --->Next--->选择版本JUnit 4 /**----------------

搭建KVM环境

实验环境 镜像:CentOS-7-x86_64-DVD-1511.iso VMWare:我用的最新版14.1.1 build-7528167 开启虚拟化支持 BIOS 开启VT KVM需要硬件虚拟化特性的支持.因此,在安装KVM之前,应该在BIOS中,将CPU虚拟化开启.首先找到CPU features,然后找到Virtualization Technology(VT)此项,将值设置为Enabled. 虚拟化技术(Virtualization Techonology,VT),不同的厂商对于虚拟化

centos 6.5下KVM环境搭建

一.操作系统配置 1. 使用root权限登录 2. 修改内核模式为兼容内核启动 vim /boot/grub/grub.conf 主要修改default=1 3. 关闭selinux 两种方式:1.使用setenforce 0命令:立即生效,重启后失效. 2.修改配置文件,vim /etc/selinux/config:重启后生效. 主要修改SELINUX=disabled 注:可以使用getenforce命令查看selinux状态 4.关闭防火墙 service iptables stop c

把当前目录添加到新的环境变量中

@echo off rem 把当前运行的目录添加到系统环境变量里面 rem 环境win7_64 2014/7/29 rem 获得当前目录 set fileName=%0 set fileDir=%fileName:~1,-12% rem 查询注册表中对应的环境变量 for /f "tokens=3*" %%i in ('reg query HKEY_CURRENT_USER\Environment /v path') do @set oldPath=%%i rem 如果环境变量没有定义