码迷,mamicode.com
首页 > 其他好文 > 详细

1,aliyun 实际工作挂载

时间:2020-09-15 20:50:56      阅读:24      评论:0      收藏:0      [点我收藏+]

标签:fstab   The   jid   list   sele   max   let   span   tor   

阿里云主机默认一般都不挂载数据盘的

需要手动 1添加数据盘-----2分区------3格式化------4挂载

1

[liuqi@alicloud-hb3-flume13-192176 ~]$ df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/vda1        40G  5.5G   32G  15% /

devtmpfs        7.8G     0  7.8G   0% /dev

tmpfs           7.8G     0  7.8G   0% /dev/shm

tmpfs           7.8G  364K  7.8G   1% /run

tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup

tmpfs           1.6G     0  1.6G   0% /run/user/607

tmpfs           1.6G     0  1.6G   0% /run/user/601

2

[root@alicloud-hb3-flume13-192176 ~]# fdisk -l

 

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: dos

Disk identifier: 0x0008de3e

 

   Device Boot      Start         End      Blocks   Id  System

/dev/vda1   *        2048    83884031    41940992   83  Linux

 

Disk /dev/vdb: 214.7 GB, 214748364800 bytes, 419430400 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

 

[root@alicloud-hb3-flume13-192176 ~]# cat /etc/fstab

 

#

# /etc/fstab

# Created by anaconda on Fri Aug 18 03:51:14 2017

#

# Accessible filesystems, by reference, are maintained under ‘/dev/disk‘

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

UUID=59d9ca7b-4f39-4c0c-9334-c56c182076b5 /                       ext4    defaults        1 1

[root@alicloud-hb3-flume13-192176 ~]# fdisk /dev/vdb

Welcome to fdisk (util-linux 2.23.2).

 

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

 

Device does not contain a recognized partition table

Building a new DOS disklabel with disk identifier 0x94768908.

 

Command (m for help): m

Command action

   a   toggle a bootable flag

   b   edit bsd disklabel

   c   toggle the dos compatibility flag

   d   delete a partition

   g   create a new empty GPT partition table

   G   create an IRIX (SGI) partition table

   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)

 

Command (m for help): n

Partition type:

   p   primary (0 primary, 0 extended, 4 free)

   e   extended

Select (default p): p

Partition number (1-4, default 1): 1

First sector (2048-419430399, default 2048): (直接跳过,按回车跳过)

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-419430399, default 419430399): (直接跳过,按回车跳过)

Using default value 419430399

Partition 1 of type Linux and of size 200 GiB is set

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

[root@alicloud-hb3-flume13-192176 ~]# ll /dev/vd

vda   vda1  vdb   vdb1  

3

[root@alicloud-hb3-flume13-192176 ~]# mkfs.xfs /dev/vdb1

meta-data=/dev/vdb1              isize=512    agcount=4, agsize=13107136 blks

         =                       sectsz=512   attr=2, projid32bit=1

         =                       crc=1        finobt=0, sparse=0

data     =                       bsize=4096   blocks=52428544, imaxpct=25

         =                       sunit=0      swidth=0 blks

naming   =version 2              bsize=4096   ascii-ci=0 ftype=1

log      =internal log           bsize=4096   blocks=25599, version=2

         =                       sectsz=512   sunit=0 blks, lazy-count=1

realtime =none                   extsz=4096   blocks=0, rtextents=0

 

[root@alicloud-hb3-flume14-192177 /]# mount /dev/vdb1 /opt/

[root@alicloud-hb3-flume14-192177 /]# blkid

/dev/vda1: UUID="59d9ca7b-4f39-4c0c-9334-c56c182076b5" TYPE="ext4"

/dev/vdb1: UUID="32ad877a-3973-4a78-b6a4-024c025350d5" TYPE="xfs"

[root@alicloud-hb3-flume14-192177 /]#

[root@alicloud-hb3-flume14-192177 /]# cat /etc/fstab

# Created by anaconda on Fri Aug 18 03:51:14 2017

#

# Accessible filesystems, by reference, are maintained under ‘/dev/disk‘

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

UUID=59d9ca7b-4f39-4c0c-9334-c56c182076b5 /                       ext4    defaults        1 1

UUID=32ad877a-3973-4a78-b6a4-024c025350d5 /opt xfs defaults 1 1

[root@alicloud-hb3-flume14-192177 /]# ok了!!

 

1,aliyun 实际工作挂载

标签:fstab   The   jid   list   sele   max   let   span   tor   

原文地址:https://www.cnblogs.com/k8s-pod/p/13598608.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!