• linux 云服务器挂载云盘


    查看硬盘
    fdisk -l

    WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
    Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 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: gpt
    Disk identifier: FA5D4CB9-C419-4DBE-AFBE-BFC942811628


    # Start End Size Type Name
    1 2048 2099199 1G EFI System EFI System Partition
    2 2099200 83884031 39G Microsoft basic

    Disk /dev/vdb: 1073.7 GB, 1073741824000 bytes, 2097152000 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

    执行命令:fdisk /dev/vdb
    依次按 "n"、"p"、"3次回车"、"wq"即可

    格式化云盘
    mkfs.ext4 /dev/vdb1

    新建文件夹并挂载
    mkdir /data
    mount /dev/vdb1 /data
    df -h

    配置开机挂载
    查看UUID
    # blkid /dev/vdb1
    /dev/vdb1: UUID="fadf579f-fe04-4e58-8811-07dd778aa8a1" TYPE="ext4"

    修改配置文件
    vim /etc/fstab
    UUID=fadf579f-fe04-4e58-8811-07dd778aa8a1 /data ext4 defaults 0 0

  • 相关阅读:
    python 魔法方法
    wfst的compose算法
    文法和语言,理解克林闭包
    openfst常用命令
    Longest Substring Without Repeating Characters
    xgboost 实践
    决策树学习
    OPC UA的监控项、订阅、和通知
    限流及常用算法
    本体论与OWL
  • 原文地址:https://www.cnblogs.com/Nanaya/p/13502908.html
Copyright © 2020-2023  润新知