zoukankan      html  css  js  c++  java
  • centos 格式化分区

    #格式化U盘,成fat32

    fdisk -l 

    #获取U盘设备信息

    #Disk /dev/sdc: 16.0 GB, 16025387008 bytes, 31299584 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: 0x456b933f

    #Device Boot Start End Blocks Id System
    #/dev/sdc1 2048 31299583 15648768 c W95 FAT32 (LBA)

    fdisk  /dev/sdc

    >>m #命令列表

    >>p #分区信息

    >>d #del分区

    >>n #新建分区 >>p #主分区 >>e #逻辑分区

    >>l #查看分区信息

    >>c #对U盘分区进行fat32格式化

    >>w #保存修改

    >>q #退出

    调整 /home分区大小

    #查看挂载在/home的分区,因为/home 是逻辑分区

    [root@localhost ~]# df -h |grep home
    /dev/mapper/centos-home 100G 33M 100G 1% /home

    #查看有没有用户占用/home

    [root@localhost ~]# fuser -m /home

    #没有则,卸载/home
    [root@localhost ~]#umount /home

    #删除原分区

    [root@localhost ~]# lvremove /dev/centos/home 

    #重新分区成100G

    [root@localhost ~]# lvcreate -L 100G -n home centos

    #格式化成xfs

    [root@localhost ~]# mkfs.xfs /dev/centos/home

    #重新挂载到/home

    [root@localhost ~]# mount /dev/centos/home /home/

    给笨笨的自己提个醒>_<~
  • 相关阅读:
    GridView固定表头
    图片自动适应大小
    GridView实现用"..."代替超长字符串
    使用纯 CSS 设计3D按钮
    Net下二进制形式的文件(图片)的存储与读取
    repeater创建复杂的表头
    GridView加入自动求和求平均值小计
    CSS+DIV(盒子)
    DIV 在 IE 与 FF 下的设置
    gridView分页
  • 原文地址:https://www.cnblogs.com/ephuizi/p/5922952.html
Copyright © 2011-2022 走看看