美文网首页
2 创建分区并装载

2 创建分区并装载

作者: RTsien | 来源:发表于2018-05-12 02:16 被阅读0次

Disk Info

To purchase a cloud disk of 10GB and mount it to the path of /dev/vdb.
sudo fdisk -l /dev/vdb:

Disk /dev/vdb: 10 GiB, 10737418240 bytes, 20971520 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

How to Partition

  1. run sudo fdisk /dev/vdb , then type like below:
> 'n' > 'p' > Enter > Enter > Enter  > '+8G'
> 'n' > 'p' > Enter > Enter > Enter  > Enter 
> 'w'
  1. run sudo fdisk -l /dev/vdb:
Disk /dev/vdb: 10 GiB, 10737418240 bytes, 20971520 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
Disklabel type: dos
Disk identifier: 0xae714a6c

Device     Boot    Start      End  Sectors Size Id Type
/dev/vdb1           2048 16779263 16777216   8G 83 Linux
/dev/vdb2       16779264 20971519  4192256   2G 83 Linux

How to Format

  1. format the lfs partition:
    sudo mkfs -v -t ext4 /dev/vdb1
  2. format the swap partition:
    sudo mkswap /dev/vdb2

How to Mount

  1. run export LFS=/mnt/lfs to set the $LFS variable
  2. run sudo mkdir -pv $LFS to create the /mnt/lfs directory
  3. run sudo mount -v -t ext4 /dev/vdb1 $LFS to mount the /dev/vdb1 partition to /mnt/lfs
  4. run sudo /sbin/swapon -v /dev/vdb2 to use the /dev/vdb2 swap partition

相关文章

  • 2 创建分区并装载

    Disk Info To purchase a cloud disk of 10GB and mount it t...

  • lvm扩容

    参考:https://www.jianshu.com/p/273daea17b2a 创建分区 刷新分区并创建物理卷...

  • CentOS下ext4、vfat文件系统创建、修改

    (接上文:CentOS磁盘和分区简介) 1,磁盘分区之后并不能直接使用,需要在分区上创建文件系统并挂载; 2,查看...

  • parted创建GPT分区

    parted创建GPT分区(fdisk不支持创建GPT分区,GPT支持大于2TB分区,MBR不支持) 介绍2种分区...

  • Mysql按时间进行表分区

    以下是创建一张测试表TEST并且按照时间CREATE_TIME创建RANGE分区,并使用ID创建hash分区,组成...

  • 磁盘

    fdisk p print显示磁盘分区信息 n new 创建磁盘分区 d delete 删除 w 保存并退出 创建...

  • day22课堂笔记

    1、添加磁盘并且让系统不重启识别 2、测试: 创建一个文件,并添加如下内容 3、开始分区 4、查看分区是否成功 第...

  • mysql分区表

    1、创建分区表 2、查看分区 3、动态添加分区 4、动态删除分区 5、清空分区数据

  • 314-ubuntu 16.04 服务器挂载数据盘

    数据盘挂载地址:/51nst 1. 创建并格式化盘 2. 查看、挂载、卸载分区 3. 查看磁盘分区的UUID 4....

  • PostgreSQL实现数据表分区

    1.建表 2.创建子表(分区表) 根据主表的创建日期月份来建立分区 3.给分区表创建主键 继承主表的分区表无法继承...

网友评论

      本文标题:2 创建分区并装载

      本文链接:https://www.haomeiwen.com/subject/yyzqdftx.html