zoukankan      html  css  js  c++  java
  • 腾讯云服务器挂载数据盘

    fdisk -l

    Disk /dev/vda: 8589 MB, 8589934592 bytes
    255 heads, 63 sectors/track, 1044 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: 0x000736d7

    Device Boot Start End Blocks Id System
    /dev/vda1 * 1 1045 8387584 83 Linux

    Disk /dev/vdb: 53.7 GB, 53687091200 bytes //未挂载的磁盘
    16 heads, 63 sectors/track, 104025 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


    Disk /dev/vdc: 2147 MB, 2147483648 bytes
    16 heads, 63 sectors/track, 4161 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

    fdisk /dev/vdb

    帮助文档

    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)

    依次输入 n 、p、 1、 回车、回车、wq完成之后

    fdisk -l

    Disk /dev/vda: 8589 MB, 8589934592 bytes
    255 heads, 63 sectors/track, 1044 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: 0x000736d7

    Device Boot Start End Blocks Id System
    /dev/vda1 * 1 1045 8387584 83 Linux

    Disk /dev/vdb: 53.7 GB, 53687091200 bytes
    16 heads, 63 sectors/track, 104025 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: 0x71039986

    Device Boot Start End Blocks Id System
    /dev/vdb1 1 104025 52428568+ 83 Linux 挂载的设备 vdb1

    Disk /dev/vdc: 2147 MB, 2147483648 bytes
    16 heads, 63 sectors/track, 4161 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

    mkfs.ext3 /dev/vdb1 

    mkdir /zerodata 自己在根目录建个目录做挂载点

    mount /dev/vdb1 /zerodata 

    吧/dev/vdb1设备挂载到zerodata 

    echo '/dev/vdb1 /home ext3 defaults 0 0' >> /etc/fstab

    吧挂载的磁盘开机启动

     cat /etc/fstab 查看是不是写入成功

    如果看起来有点奇怪就

    vi /etc/fstab 排版一下 

    最后df -h就OK了磁盘已经挂载成功

  • 相关阅读:
    接着上回,导包正确之后,出现javabean.Friend cannot be cast to java.util.List,的错误。找了很久。以为是User user0作为参数,改成了String username还是错误,看了看listFriend.jsp没有错误,我想会不会是包多了,导致类型复杂。最后发现包少了一个:
    c语言
    软链接和硬链接的联系和区别
    centos7怎么永久修改hosname
    虚拟机静态ip设置
    Centos、Ubuntu开启命令模式
    Kubernetes重要概念理解
    人生道路上,永远没有“容易”二字
    知识【英文】
    模板【kruskal重构树】
  • 原文地址:https://www.cnblogs.com/zx-admin/p/4308979.html
Copyright © 2011-2022 走看看