zoukankan      html  css  js  c++  java
  • CentOS ext4 磁盘分区 格式化 挂载

    [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

  • 相关阅读:
    Git学习总结(11)——Git撤销操作详解
    Spring学习总结(18)——Spring整合Mysql数据库一主多从、多主多从配置
    Java Web学习总结(27)——JavaEE中Web服务器、Web容器、Application服务器区别及联系
    ZT onActivityResult在android中的用法
    转一个csdn看到的帖子:而立之年的程序猿失业了 [问题点数:0分,结帖人jinxingfeng_cn]
    [EffectiveC++]item39:明智而审慎地使用private
    [EffectiveC++]item38:通过复合塑膜出has -a 或“根据某物实现出”
    zt C++ list 类学习笔记
    zt C++标准库set类型
    [EffectiveC++]item37:绝不重新定义继承而来的缺省参数值
  • 原文地址:https://www.cnblogs.com/xiaoleiel/p/8340390.html
Copyright © 2011-2022 走看看