博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
VM虚拟机中Linux扩展磁盘空间的方法
阅读量:2494 次
发布时间:2019-05-11

本文共 1370 字,大约阅读时间需要 4 分钟。

本人转自博客:http://blog.csdn.net/liangliangdetianxia/article/details/37527767

一、Vm虚拟机下Linux扩展原有磁盘空间,详细步骤如下:

需注意以下几点: linux只能扩展磁盘容量而不能减小, 所填写的容量为总容量,即包含已分区的磁盘, 扩展容量时不能有快照哟,大家可以先把快照删除掉。

2.启动Linux,查看系统分区,并创建分区sda3,命令如下:红色字体命令,#后为注释:

[root@localhost~]#fdisk -l

Disk /dev/sda:32.2GB,32212254720 bytes

255heads,63sectors/track,3916cylinders

Units=cylindersof16065*512=8225280 bytes

DeviceBoot      Start      End        Blocks             Id       System

/dev/sda1  *        1            13         104391          83      Linux

/dev/sda2           14           1566    12474472+   8e      Linux LVM

#我的电脑有2个分区-sda1 sda2

[root@localhost~]#fdisk /dev/sda

Thenumberofcylindersforthisdiskissetto3916.

Thereisnothingwrongwiththat,butthisislargerthan1024,

andcouldincertainsetupscauseproblemswith:

1)softwarethatrunsatboottime(e.g.,oldversionsofLILO)

2)bootingandpartitioningsoftwarefromotherOSs

(e.g.,DOSFDISK,OS/2FDISK)

Command(mforhelp):m

Commandaction

a toggle a bootable flag

b edit bsd disk label

c toggle the dos compatibility flag

d delete a partition

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 apartition's system id

u change display/entry units

v verify the partition table 

w write table to disk and exit

x extra functionality (expertsonly)

本人转自博客:http://blog.csdn.net/liangliangdetianxia/article/details/37527767

你可能感兴趣的文章
spring cloud zuul网关上传大文件
查看>>
springboot+mybatis日志显示SQL
查看>>
工作流中文乱码问题解决
查看>>
maven打包本地依赖包
查看>>
spring boot jpa 实现拦截器
查看>>
jenkins + maven+ gitlab 自动化部署
查看>>
Pull Request流程
查看>>
Lambda 表达式
查看>>
函数式数据处理(一)--流
查看>>
java 流使用
查看>>
java 用流收集数据
查看>>
java并行流
查看>>
CompletableFuture 组合式异步编程
查看>>
mysql查询某一个字段是否包含中文字符
查看>>
Java中equals和==的区别
查看>>
JVM内存管理及GC机制
查看>>
Java:按值传递还是按引用传递详细解说
查看>>
Java中Synchronized的用法
查看>>
阻塞队列
查看>>
linux的基础知识
查看>>