zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    Django-用户认证组件
    Django-session组件
    Axer-使用Msfvenom自动创建有效负载的工具
    CVE-2020-0668-Windows服务跟踪中的普通特权升级错误
    隐藏Web Shell
    404 not found Webshell
    渗透测试流程
    IIS inprocess
    分布式.Net
    WPF UnhandledException
  • 原文地址:https://www.cnblogs.com/Nanaya/p/13502908.html
Copyright © 2011-2022 走看看