1. [root@k8s-node2 ~]# fdisk -l
  2.  
  3. Disk /dev/sdb: 53.7 GB, bytes, sectors
  4. Units = sectors of * = bytes
  5. Sector size (logical/physical): bytes / bytes
  6. I/O size (minimum/optimal): bytes / bytes
  7.  
  8. Disk /dev/sda: 42.9 GB, bytes, sectors
  9. Units = sectors of * = bytes
  10. Sector size (logical/physical): bytes / bytes
  11. I/O size (minimum/optimal): bytes / bytes
  12. Disk label type: dos
  13. Disk identifier: 0x0009bc1c
  14.  
  15. Device Boot Start End Blocks Id System
  16. /dev/sda1 * Linux
  17. [root@k8s-node2 ~]# fdisk /dev/sdb
  18. Welcome to fdisk (util-linux 2.23.).
  19.  
  20. Changes will remain in memory only, until you decide to write them.
  21. Be careful before using the write command.
  22.  
  23. Device does not contain a recognized partition table
  24. Building a new DOS disklabel with disk identifier 0x52205fd7.
  25.  
  26. Command (m for help): m
  27. Command action
  28. a toggle a bootable flag
  29. b edit bsd disklabel
  30. c toggle the dos compatibility flag
  31. d delete a partition
  32. g create a new empty GPT partition table
  33. G create an IRIX (SGI) partition table
  34. l list known partition types
  35. m print this menu
  36. n add a new partition
  37. o create a new empty DOS partition table
  38. p print the partition table
  39. q quit without saving changes
  40. s create a new empty Sun disklabel
  41. t change a partition's system id
  42. u change display/entry units
  43. v verify the partition table
  44. w write table to disk and exit
  45. x extra functionality (experts only)
  46.  
  47. Command (m for help): n
  48. Partition type:
  49. p primary ( primary, extended, free)
  50. e extended
  51. Select (default p): p
  52. Partition number (-, default ):
  53. First sector (-, default ):
  54. Using default value
  55. Last sector, +sectors or +size{K,M,G} (-, default ):
  56. Using default value
  57. Partition of type Linux and of size GiB is set
  58.  
  59. Command (m for help): w
  60. The partition table has been altered!
  61.  
  62. Calling ioctl() to re-read partition table.
  63. Syncing disks.
  64. [root@k8s-node2 ~]# fdisk -l

yum 安装

yum install e2fsprogs.x86_64 -y

  1. [root@k8s-node1 ~]# mkfs.ext4 /dev/sdb1
  2. mke2fs 1.42. (-Dec-)
  3. Filesystem label=
  4. OS type: Linux
  5. Block size= (log=)
  6. Fragment size= (log=)
  7. Stride= blocks, Stripe width= blocks
  8. inodes, blocks
  9. blocks (5.00%) reserved for the super user
  10. First data block=
  11. Maximum filesystem blocks=
  12. block groups
  13. blocks per group, fragments per group
  14. inodes per group
  15. Superblock backups stored on blocks:
  16. , , , , , , , , ,
  17. , ,
  18.  
  19. Allocating group tables: done
  20. Writing inode tables: done
  21. Creating journal ( blocks): done
  22. Writing superblocks and filesystem accounting information: done

centos 7.5+如何格式化硬盘的更多相关文章

  1. centos 格式化硬盘并挂载,添加重启后生效

    [root@cloud /]# passwd 更改用户 root 的密码 . 新的 密码: 重新输入新的 密码: passwd: 所有的身份验证令牌已经成功更新. [root@cloud /]# fd ...

  2. Centos 7U盘安装

    1. 8G U盘 老毛桃软件 centos 7 everything.iso 7.4G左右 2.遇到问题 安装一刚开始 报错 unexpected exception  attribute error ...

  3. CentOS如何挂载硬盘

    远程SSH登录上CentOS服务器后,进行如下操作 提醒:挂载操作会清空数据,请确认挂载盘无数据或者未使用 第一步:列出所有磁盘  命令:  ll /dev/disk/by-path 提示:如果无法确 ...

  4. Linux - CentOS 6.3 (x86_64)安装过程详细图解

    I:下载CentOS 6.3 楼主已经从CentOS官方公布下载列表当中整理出了2个在国内的下载地址,这样就不需要为访问墙外的龟速网络而费心了. 32位:下载地址1,下载地址2 64位:下载地址1,下 ...

  5. CentOS 虚拟机安装详解

    第一步:安装 VMware 官方网站:www.vmware.com 下载百度云链接:http://pan.baidu.com/s/1bphDOWv 密码:0zix VMware 是一个虚拟 PC 的软 ...

  6. 阿里云-CentOS如何挂载硬盘

    阿里云CentOS挂载硬盘 查看当前未挂载的硬盘 # fdisk -l 创建硬盘分区 # fdisk /dev/vdb 根据提示,依次输入"n","p" &qu ...

  7. vmware虚拟机centOs安装教程

    1安装vmware 虚拟机软件 1.解压vmware安装 汉化vmware虚拟机 复制注册码,并填写进vmware 2安装linux(centos)虚拟机 1.  点击文件----->新建虚拟机 ...

  8. CentOS 6.8 虚拟机安装详解

    第一步:安装 VMware 官方网站:www.vmware.com 下载百度云链接:http://pan.baidu.com/s/1bphDOWv 密码:0zix VMware 是一个虚拟 PC 的软 ...

  9. centos 7 重新设置分区大小

    一.基础概念Cent0S 7默认启用LVM2(Logical Volume Manager),把机器的一块硬盘分为两个区sda1和sda2,其中分区sda1作为系统盘/boot挂载,少量空间:sda2 ...

随机推荐

  1. centos7下使用docker安装gitlab

    环境背景: Docker化已经成为一种热门,记录一下使用docker引擎安装gitlab的过程. 测试环境: 系统 软件 依赖 CentOS 7.4 GitLab(latest) docker-ce ...

  2. 对于BFS的理解和部分例题(

    (图文无关    雾 搜索是一个NOIP当中经常出现的考点,其实搜索换个方式来想也无非就是让电脑来帮你试,最后得到一个结果,当然这么口胡谁都会,那么我们就来看看搜索当中的一个大部分: BFS(广度优先 ...

  3. Spring Security 登录校验 源码解析

    传统情况下,在过滤器中做权限验证,Spring Secuirty也是在Filter中进行权限验证. 创建并注册过滤器 package com.awizdata.edubank.config; impo ...

  4. python解决上楼梯问题

    假设一段楼梯共n(n>1)个台阶,小朋友一步最多能上3个台阶,那么小朋友上这段楼梯一共有多少种方法 (此为京东2016年笔试题目) 假设n为15,从第15个台阶上往回看,有3种方法可以上来(从第 ...

  5. 2018-2019-2 网络对抗技术 20165232 Exp4 恶意代码分析

    2018-2019-2 网络对抗技术 20165232 Exp4 恶意代码分析 1.实践目标 监控你自己系统的运行状态,看有没有可疑的程序在运行. 分析一个恶意软件,就分析Exp2或Exp3中生成后门 ...

  6. 2019全国大学生信息安全竞赛部分Web writeup

    JustSoso 0x01 审查元素发现了提示,伪协议拿源码 /index.php?file=php://filter/read=convert.base64-encode/resource=inde ...

  7. sql server登录名、服务器角色、数据库用户、数据库角色、架构区别联系

    原创链接:https://www.cnblogs.com/lxf1117/p/6762315.html sql server登录名.服务器角色.数据库用户.数据库角色.架构区别联系 1.一个数据库用户 ...

  8. FT View SE联合Studio 5000仿真

    ​前言:一个实际的自动化项目,都是综合性的,不仅需要PLC进行逻辑.顺序.运动等控制,还需要在上位机进行监视和操作.当没有物理PLC时,上位机软件就无法连接到实际的变量数据,开发出来的界面和功能无法验 ...

  9. java实现单链接的几种常用操作

    public class ListNode { public int value; public ListNode next; public ListNode(int value) { this.va ...

  10. C# 解析torrent文件

    基础知识: torrent文件信息存储格式: bencoding是一种以简洁格式指定和组织数据的方法.支持下列类型:字节串.整数.列表和字典. 1 字符串存储格式:  <字符串的长度>:& ...