惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - 疯子110

Vue3 + Vite + Ts 报错:Property ‘ ‘ does not exist on type ‘never‘ activiti部署流程后act_re_procdef表中无流程定义信息 【转】openEuler欧拉系统重置密码 【转】nginx开启https导致springboot无法获取正确浏览器请求地址问题 【转】SLF4J(W): No SLF4J providers were found. 解决方法 vue项目放在springboot项目里后,刷新页面会显示whitelabel error page Vue3 echarts tooltip添加点击事件(最简版) Vue3富文本编辑器wangEditor 5使用总结【转载】 解决 vue3 中 Proxy(Object) 对象无法直接读取或使用 关于mybatis进行sql查询字段值为null而不显示问题解决办法 Vue3 - 项目中使用 debugger 在 chrome 谷歌浏览器中失效 vue项目error Unexpected ‘debugger‘ statement no-debugger报错 vue项目中 报错 error ‘xxx‘ is assigned a value but never used 在vue中使用leaflet加载地图【转载】 无法加载文件 D:\Program Files\xxxxx\vue.ps1,因为在此系统上禁止运行脚本”的解决方法 - 疯子110 Vue3安装配置+VSCode开发环境搭建,超详细保姆级教程(图文) 【转】将postgresql表名和字段名统一转换为小写 【cesium重新梳理】1.cesium知识整理 【cesium】修改底图颜色为蓝色科技范儿
centos7-分区2T以上大硬盘[转】
疯子110 · 2025-04-15 · via 博客园 - 疯子110

转载自 https://www.cnblogs.com/scajy/p/17151461.html

centos7-分区2T以上大硬盘

1. centos7-分区2T以上大硬盘

  • 由于使用fdisk进行分区默认在2T内,大于2T后fdisk就无法进行大硬盘进行分区,需要对大于2TB进行分区,使用parted进行分区

  • 且ext4不支持16TB以上的磁盘格式化,如果磁盘大于16TB或以上,就使用xfs格式化磁盘

  • 查看parted 命令详解

    [root@test ~]# parted --help
    Usage: parted [OPTION]... [DEVICE [COMMAND [PARAMETERS]...]...]
    Apply COMMANDs with PARAMETERS to DEVICE.  If no COMMAND(s) are given, run in
    interactive mode.
    
    OPTIONs:
      -h, 
  • 先使用fdisk -l 查看磁盘大小

    [root@test ~]# fdisk -l
    
    Disk /dev/sda: 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 label type: dos
    Disk identifier: 0x000ad154
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048     2099199     1048576   83  Linux
    /dev/sda2         2099200   104857599    51379200   8e  Linux LVM
    
    Disk /dev/sdb: 8796.1 GB, 8796093022208 bytes, 17179869184 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: 48.4 GB, 48444211200 bytes, 94617600 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: 4160 MB, 4160749568 bytes, 8126464 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
    
    

    我们可以看到/dev/sdb是8T数据盘,我们使用parted进行一个分区的大硬盘

  • 使用parted进行分区或管理操作

    [root@test ~]# parted /dev/sdb
    GNU Parted 3.1
    Using /dev/sdb
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted)  
    
  • 定义分区表格式

    [root@test ~]# parted /dev/sdb
    GNU Parted 3.1
    Using /dev/sdb
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) mklabel gpt    # 定义分区表格式
    
  • 创建分区

    (parted) mkpart part1          # 执行开始创建分区, mkpart执行分区命令, part1为分区名称                                             
    File system type?  [ext2]? xfs     # 文件系统类型,也可以后期通过mkfs.xfs格式化成xfs格式                                          
    Start? 1       # 分区开始值 1                                                            
    End? 8T        # 分区结束值 8T
    
  • 使用print命令进行查看创建是否成功

    (parted) print                                                            
    Model: VMware Virtual disk (scsi)
    Disk /dev/sdb: 8796GB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    Disk Flags: 
    
    Number  Start   End     Size    File system  Name   Flags
     1      1049kB  8000GB  8000GB               part1
    
  • 执行退出

    (parted) quit                                                             
    Information: You may need to update /etc/fstab.
    
  • 格式磁盘

    [root@test ~]# mkfs.xfs /dev/sdb1
    meta-data=/dev/sdb1              isize=512    agcount=8, agsize=268435455 blks
             =                       sectsz=512   attr=2, projid32bit=1
             =                       crc=1        finobt=0, sparse=0
    data     =                       bsize=4096   blocks=1953124864, imaxpct=5
             =                       sunit=0      swidth=0 blks
    naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
    log      =internal log           bsize=4096   blocks=521728, version=2
             =                       sectsz=512   sunit=0 blks, lazy-count=1
    realtime =none                   extsz=4096   blocks=0, rtextents=0
    
  • 使用mount 进行挂载测试

    [root@test ~]# mkdir -p /test
    [root@test ~]# mount -t xfs /dev/sdb1 /test/
    
  • 验证是否挂载

    [root@test ~]# df -h
    Filesystem               Size  Used Avail Use% Mounted on
    devtmpfs                 1.9G     0  1.9G   0% /dev
    tmpfs                    1.9G     0  1.9G   0% /dev/shm
    tmpfs                    1.9G  8.9M  1.9G   1% /run
    tmpfs                    1.9G     0  1.9G   0% /sys/fs/cgroup
    /dev/mapper/centos-root   46G  7.6G   38G  17% /
    /dev/sda1               1014M  151M  864M  15% /boot
    tmpfs                    379M     0  379M   0% /run/user/0
    /dev/sdb1                7.3T   33M  7.3T   1% /test
    
  • 配置开机自动挂载

    [root@test ~]# vim /etc/fstab 
    [root@test ~]# cat /etc/fstab 
    
    #
    # /etc/fstab
    # Created by anaconda on Mon Nov 29 00:48:53 2021
    #