zoukankan      html  css  js  c++  java
  • 磁盘分区

    由于数据的增加,硬盘不够用了,怎么办?一个字 加

    MBR+DTP

    fdisk  -l 查看是否  已加入磁盘

    fdisk  /dev/sdb  

    fdisk   -cu  /dev/sdb    取消兼容模式

     

    添加一个硬盘,只创建一个分区,然后把分区挂载到/data

    第1个里程碑-进行分区
    Command (m for help): n
    Command action
       e   extended
       p   primary partition (1-4)
    p
    Partition number (1-4): 1
    First sector (2048-208895, default 2048): 
    Using default value 2048
    Last sector, +sectors or +size{K,M,G} (2048-208895, default 208895): 
    Using default value 208895

    Command (m for help): p

    Disk /dev/sdb: 106 MB, 106954752 bytes
    64 heads, 32 sectors/track, 102 cylinders, total 208896 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 identifier: 0x58f14c96

       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1            2048      208895      103424   83  Linux

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

    Calling ioctl() to re-read partition table.
    Syncing disks.

    第2个里程碑-通知系统/dev/sdb磁盘分区信息变化
    partprobe  /dev/sdb


    第3个里程碑-格式化创建文件系统    make filesystem    mkfs
    [root@oldboyedu45-lnb ~]# mkfs.ext4   /dev/sdb1
    mke2fs 1.41.12 (17-May-2010)
    Filesystem label=
    OS type: Linux
    Block size=1024 (log=0)
    Fragment size=1024 (log=0)                         
    Writing superblocks and filesystem accounting information: done

    This filesystem will be automatically checked every 31 mounts or
    180 days, whichever comes first.  Use tune2fs -c or -i to override.

    4.关闭分区的自动磁盘检查功能

     tune2fs -c 0 - i 0 /dev/sdb1

    -c   没挂载多少次检查一次

    -I       每隔多久检查一次磁盘

    mount /dev/sdb1    /data

    df -h

    开机自动挂载

    etc/rc.local

    方法2   /etc/fstab

    column -t  对其  /etc/fstab

  • 相关阅读:
    IDEA手动创建JFinal项目(404问题处理)
    php 把数字1-1亿换成汉字表述,例如 150 转成 一百五十
    模仿console自写函数打印js的对象
    每瓶啤酒2元,2个空酒瓶或4个瓶盖可换1瓶啤酒。10元最多可喝多少瓶啤酒? php
    js-Event构造函数,也许你需要
    js将金额专成每隔3位数加逗号
    js-PC版监听键盘大小写事件
    用php脚本给html中引用的js和css路径打上版本
    通过js的console优雅的将php调试信息输出
    android中加载的html获取的宽高不正确
  • 原文地址:https://www.cnblogs.com/zdqc/p/9430758.html
Copyright © 2011-2022 走看看