、[root@test4 ~]# fdisk /dev/sda  //对sda磁盘进行分区

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable. The number of cylinders for this disk is set to .
There is nothing wrong with that, but this is larger than ,
and could in certain setups cause problems with:
) software that runs at boot time (e.g., old versions of LILO)
) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/ FDISK)
Warning: invalid flag 0x0000 of partition table will be corrected by w(rite) 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 //创建一个新的空白DOS分区表
p print the partition table //打印分区表
q quit without saving changes //退出不保存设置
s create a new empty Sun disklabel
t change a partition's system id //改变分区的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 //e是扩展分区
p primary partition (-) //p是主分区
p
Partition number (-): //定义分区数量 --主分区最多只能有四个
First cylinder (-, default ):
Last cylinder or +size or +sizeM or +sizeK (-, default ): +100M Command (m for help): w //保存刚才的配置信息。
The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error : 无效的参数.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks. 、[root@test6 ~]# fdisk /dev/sda The number of cylinders for this disk is set to .
There is nothing wrong with that, but this is larger than ,
and could in certain setups cause problems with:
) software that runs at boot time (e.g., old versions of LILO)
) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/ FDISK) Command (m for help): n
First cylinder (-, default ):
Using default value
Last cylinder or +size or +sizeM or +sizeK (-, default ): +100M Command (m for help): w
The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error : 设备或资源忙.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
3、[root@test6 ~]# partprobe /dev/sda //对硬盘进行更新
[root@test6 ~]# fdisk -l Disk /dev/sda: 21.4 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes Device Boot Start End Blocks Id System
/dev/sda1 * Linux
/dev/sda2 + Linux swap / Solaris
/dev/sda3 8e Linux LVM
/dev/sda4 Extended
/dev/sda5 Linux
/dev/sda6 Linux
4、[root@test6 ~]# mkfs.ext3 /dev/sda6 //需要先进行格式化,才能使用 。mkfs -t ext3 /dev/sda5 (mkfs.ext3 一样效果 -t 指定类型 -b 指定block大小·)
mke2fs 1.39 (-May-)
Filesystem label=
OS type: Linux
Block size= (log=)
Fragment size= (log=)
inodes, blocks
blocks (5.00%) reserved for the super user
First data block=
Maximum filesystem blocks=
block groups
blocks per group, fragments per group
inodes per group
Superblock backups stored on blocks:
, , , , Writing inode tables: done
Creating journal ( blocks): done
Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every mounts or
days, whichever comes first. Use tune2fs -c or -i to override. 5、[root@test6 ~]# mount /dev/sda6 /mnt/sda7/ //进行挂载使用
anaconda-ks.cfg install.log install.log.syslog/
6、[root@test6 ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda5 .7G .1G .1G % /
/dev/sda1 99M 12M 83M % /boot
tmpfs 252M 252M % /dev/shm
/dev/hdc .9G .9G % /mnt/cdrom
/dev/sda6 99M 5.6M 89M % /mnt/sda7

fdisk 磁盘分区的更多相关文章

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

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

  2. fdisk 磁盘分区命令

    fdisk fdisk磁盘分区命令 -v    打印 fdisk 的版本信息并退出.-l    列出指定设备的分区表信息并退出. 如果没有给出设备,那么使用那些在 /proc/partitions ( ...

  3. Linux学习(十三)du、df、fdisk磁盘分区

    一.du du命令是查看文件或者目录大小的命令. 一般使用du -sh 查看,不用-sh参数意义也不大,应为不用这个参数,它会把目录下的所有文件大小递归的显示出来,就像这样: 如果用-sh参数: [r ...

  4. fdisk磁盘分区与挂载

    参考博客:https://blog.csdn.net/capecape/article/details/78499351?locationNum=6&fps=1 1.查看磁盘分区情况.root ...

  5. [转]使用fdisk磁盘分区和 Linux 文件系统

    概述 在本文中,学习磁盘分区和 Linux 文件系统相关内容.学习: 创建分区 使用 mkfs 命令来设置 ext2.ext3.ext4.xfs.Reiser v3 和 vfat 文件系统 创建和管理 ...

  6. fdisk磁盘分区

    http://www.cr173.com/html/4336_1.html http://www.51cto.com/art/200602/20328.htm

  7. Linux中df命令查询磁盘信息和fdisk命令分区的用法

    df - 报告文件系统磁盘空间的使用情况  总览 df [OPTION]... [FILE]... POSIX 选项: [-kP] GNU 选项 (最短方式): [-ahHiklmPv] [-t fs ...

  8. 【linux磁盘分区--格式化】fdisk,parted,mkfs.ext3

    磁盘分区完成后,一般就需要对分区进行格式化 磁盘分区命令主要有两个: fdisk :最大支持不超过2T分区: parted :支持GPT,适用于大容量分区: 分区指令的选择: 在RHEL系统上,用fd ...

  9. linux 系统磁盘分区之fdisk

    对于学习磁盘分区,通常学习的都是fdisk命令 当然,对于小于2TB的磁盘,我们基本上是使用fdisk命令进行分区 下面就简单介绍一下fdisk操作磁盘的基本命令和场景模拟 常用命令介绍   fdis ...

随机推荐

  1. Excel另存为_有些Excel打开时会出现一些提示

    using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using Sy ...

  2. Linux实战教学笔记43:squid代理与缓存实践(二)

    第6章 squid代理模式案例 6.1 squid传统正向代理生产使用案例 6.1.1 squid传统正向代理两种方案 (1)普通代理服务器 作为代理服务器,这是SQUID的最基本功能:通过在squi ...

  3. Linux实战教学笔记28:企业级LNMP环境应用实践

    一,LNMP应用环境 1.1 LNMP介绍 大约在2010年以前,互联网公司最常用的经典Web服务环境组合就是LAMP(即Linux,Apache,MySQL,PHP),近几年随着Nginx Web服 ...

  4. shell-array

    [shell-array] Creating Array: $ names=("Bob" "Peter" "$USER" "Big ...

  5. 03.什么是Lucene全文检索的原理01

    全文检索的原理:查询速度快,精准度高,可以根据相关度进行排序.它的原理是:先把内容分词,分词之后建索引. Lucene是apache下的一个开放源代码的全文检索引擎工具包. 提供了完整的查询引擎和索引 ...

  6. DBArtist之Oracle入门第2步: 了解Oracle的Database Control

    之前安装好数据库后,会有下面这个弹窗,然后根据Database Control URL地址进入瞧一瞧,看一看! 根据地址进入以后,是一个登录界面,用system账户登录,密码就是安装Oracle的时候 ...

  7. 配置jdk和tomcat的环境变量

    一.1,新建变量名:JAVA_HOME,变量值:d:\Program Files\Java\jdk1.7.0 2,打开PATH,添加变量值:%JAVA_HOME%\bin;%JAVA_HOME%\jr ...

  8. 9-queue

    在C++中只要#include<queue>即可使用队列类,其中在面试或笔试中常用的成员函数如下(按照最常用到不常用的顺序) 1. push 2. pop 3. size 4. empty ...

  9. SQL Server横向扩展:设计,实现与维护(2)- 分布式分区视图

    为了使得朋友们对分布式分区视图有个概念,也为了方便后面的内容展开,我们先看看下面一个图:     讲述分布式分区视图之前,很有必要将之与我们常常熟悉的分区表和索引进行区别. 首先,分布式分区视图是一个 ...

  10. 将windows上面的项目拷贝到Linux环境下报错不能够找到对应的表com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'puyang.ServiceType' doesn't exist

    将一模一样的项目从win迁移到到linux上报错: 一开始还是以为是linux不能识别hql语句,查找资料发现是因为Liunx服务器上mysql是区分大小写的,而本地是不区分的如:代码是这样写的 @E ...