[root@appserver ~]# df -h /*查看现有分区情况*/
文件系统 容量 已用 可用 已用%% 挂载点
/dev/vda1 9.9G 8.2G 1.2G 88% /
tmpfs 3.9G 100K 3.9G 1% /dev/shm
/dev/sr0 368K 368K 0 100% /media/CDROM
[root@appserver ~]# fdisk -l /*查看现有DISK*/

Disk /dev/vda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003e85f

Device Boot Start End Blocks Id System
/dev/vda1 * 1 1306 10484736 83 Linux

Disk /dev/vdb: 214.7 GB, 214748364800 bytes
16 heads, 63 sectors/track, 416101 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

[root@appserver ~]# fdisk /dev/vdb /*用fdisk分区工具对磁盘分区*/

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x264c68f0.
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)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

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
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
Command action
e extended
p primary partition (1-4)
e
Partition number (1-4): 1
First cylinder (1-416101, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-416101, default 416101):
Using default value 416101

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@appserver ~]# fdisk -l

Disk /dev/vda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003e85f

Device Boot Start End Blocks Id System
/dev/vda1 * 1 1306 10484736 83 Linux

Disk /dev/vdb: 214.7 GB, 214748364800 bytes
16 heads, 63 sectors/track, 416101 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x264c68f0

Device Boot Start End Blocks Id System
/dev/vdb1 1 416101 209714872+ 5 Extended

本篇文章来源于 Linux公社网站(www.linuxidc.com) 原文链接:http://www.linuxidc.com/Linux/2012-12/76839.htm

CentOS ext4 磁盘分区 格式化 挂载的更多相关文章

  1. (转)centos7.4 fdisk磁盘分区 格式化 挂载

    centos7.4 fdisk磁盘分区 格式化 挂载 原文:http://blog.csdn.net/capecape/article/details/78499351 1.查看系统中有多少可以识别的 ...

  2. Linux系统添加硬盘设备(磁盘分区-格式化-挂载-使用)

    当全新安装了一块新的硬盘设备后,为了更充分.更安全的利用硬盘空间首先要进行磁盘的分区, 然后格式化,最后挂载使用. 实例:对新添加的硬盘设备进行分区.格式化并挂载到/newFS目录. 第一步:在vmw ...

  3. Linux磁盘分区/格式化/挂载(树莓派3挂载硬盘)

    [前言] 本文将要讲解的功能为Linux环境下对磁盘进行操作.包括分区.格式化.挂载外接移动存储设备等. 该文的写作背景为本人的树莓派需要外接一个固态硬盘作为存储设备,因此,便开始了一系列的折腾. [ ...

  4. Linux磁盘分区/格式化/挂载目录

    分区及挂载目录 以CentOS7.2为例,一般我们服务端应用部署前需要确认部署机的磁盘空间及挂载目录.操作如下: 如上图,如果操作系统是新装的,未挂盘的话需要先挂载盘.操作如下: fdisk -l # ...

  5. centos7.1磁盘分区 格式化 挂载

    1.fdisk -l 查看磁盘状态 2.将 /dev/sdb 分区 fdisk /dev/sdb 3.对分区进行格式化 mkfs -t ext3 /dev/sdb 4.挂载/dev/sdb 到/hom ...

  6. linux增加硬盘 磁盘分区格式化及挂载

    nux磁盘分区格式化及挂载 意义: 给linux 系统服务器扩容, 加一块硬盘 实验环境: virtualBox虚拟软件  + centos6.5 第一步: 添加硬件 硬盘 (我这里用virtualB ...

  7. linux中利用fstab实现磁盘分区自动挂载

    如何格式化磁盘.给磁盘分区以及挂载,参考我的另一篇博客: https://www.cnblogs.com/mediocreWorld/p/11123786.html 博客中有一个格式化分区的命令: m ...

  8. 初始化Linux数据盘、磁盘分区、挂载磁盘(fdisk)

    1.操作场景 2.前提条件 3.划分分区并挂载磁盘 4.设置开机自动挂载磁盘分区 1.操作场景 本文以云服务器的操作系统为"CentOS 7.4 64位"为例,采用fdisk分区工 ...

  9. Linux磁盘分区和挂载

    Linux磁盘分区和挂载 分区 分区的方式: mbr分区 最多支持4个主分区 系统只能安装到主分区上 扩展分区要占用一个主分区 MBR最大支持2TB,但拥有最好的兼容性 gtp分区 支持无线多个主分区 ...

随机推荐

  1. Latex算法伪代码使用总结

    Latex伪代码使用总结 algorithmicx例子 相应代码: \documentclass[11pt]{ctexart} \usepackage[top=2cm, bottom=2cm, lef ...

  2. cocos2dx 3.x fullPathForFilename及isFileExist在ios/mac下与win32下行为不同

    一,fullPathForFilename 项目先开发了ios/mac版本,这两天想把win32工程也配好,但遇到了部分资源无法正确找到的问题. 进一步观察发现,对于那些找不到的资源路径,fullPa ...

  3. linux系统下添加新硬盘的方法详解

    对于linux新手来说,在linux上添加新硬盘,是很有挑战性的一项工作. 在Linux服务器上把硬盘接好,启动linux,以root登陆. fdisk -l ## 这里是查看目前系统上有几块硬盘 D ...

  4. Spring 一二事(7) - annotation

    之前的文章大多都是一带而过,一方面比较简单,一方面不是用的注解形式 在企业开发中,主要还是使用的注解来进行开发的 1 <!-- component:把一个类放入到spring容器中,该类就是一个 ...

  5. 【Android】12.3 在当前Activity中获取另一个Activity的返回值

    分类:C#.Android.VS2015: 创建日期:2016-02-23 一.简介 在上一节的示例中,通过StartActivity(Intent)方法启动另一个Activity后,这两个Activ ...

  6. 理解 Linux 配置文件

    介绍 每个 Linux 程序都是一个可执行文件,它含有操作码列表,CPU 将执行这些操作码来完成特定的操作.例如,ls 命令是由 /bin/ls 文件提供的,该文件含有机器指令的列表,在屏幕上显示当前 ...

  7. java命令执行jar文件

    如果java -jar target/hbase-demo-1.0-SNAPSHOT.jar HBaseDemo 提示如下 no main manifest attribute, in target/ ...

  8. Brocade300 commands

    aaaconfig                  Configure RADIUS for AAA servicesad                         Specifies all ...

  9. 在java web中获取该项目的根路径

    在jsp页面中: <% String path = application.getRealPath("").replace("\\","\\\\ ...

  10. python学习笔记(22)--漫画生成html最终版

    说明(2017.3.14): 1. 在主文件夹生成一个main.html作为目录 2. 在每个子文件夹生成一个index.html作为看图网页 3. 通过python批量生成html网页,js配合进行 ...