麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 網站 > 幫助中心 > 正文

linux云主機掛載硬盤

2024-07-09 22:49:52
字體:
來源:轉載
供稿:網友

1. ssh登錄云主機,查看磁盤狀況

[root@MyCloudServer ~]# fdisk -l

Disk /dev/xvda: 10.7 GB, 10737418240 bytes

255 heads, 63 sectors/track, 1305 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: 0x000858c5

 

    Device Boot      Start         End      Blocks   Id  System

/dev/xvda1   *           1          64      512000   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/xvda2              64        1306     9972736   8e  Linux LVM

 

Disk /dev/xvdb: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 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: 0x00000000

 

從查詢結果看出,一般我們需要掛載的是/dev/xvdb的盤

 

2. fdisk 對/dev/xvdb 進行分區

 

[root@MyCloudServer ~]# fdisk /dev/xvdb

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-2610, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-652, default 2610):

Using default value 2610

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

 

再次查看分區情況,多出來一個/dev/xvdb1 的區,這個1是我們在前面指定的,如果我們指定2,就變成 xvdb2了。

 

[root@MyCloudServer ~]# fdisk -l

 

Disk /dev/xvda: 10.7 GB, 10737418240 bytes

255 heads, 63 sectors/track, 1305 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: 0x000858c5

    Device Boot      Start         End      Blocks   Id  System

/dev/xvda1   *           1          64      512000   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/xvda2              64        1306     9972736   8e  Linux LVM 

 

Disk /dev/xvdb: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280

bytesSector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

   Device Boot      Start         End      Blocks   Id  System

/dev/xvdb1               1         652     5237158+  83  Linux

[root@MyCloudServer ~]# 

 

3. 格式化 /dev/xvdb1 分區

 

[root@MyCloudServer ~]# mkfs -t ext3 /dev/xvdb1

mke2fs 1.35 (28-Feb-2004)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

655360 inodes, 1309289 blocks

65464 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=1342177280

40 block groups

32768 blocks per group, 32768 fragments per group

16384 inodes per group

Superblock backups stored on blocks:

        32768, 98304, 163840, 229376, 294912, 819200, 884736

 

Writing inode tables: done

Creating journal (8192 blocks): done

Writing superblocks and filesystem accounting information: done

 

This filesystem will be automatically checked every 30 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

 

4. 在根目錄下創建目錄 并將 /dev/sdb1 掛在到該目錄下

 

[root@MyCloudServer ~]# cd / 

[root@MyCloudServer ~]# mkdir /data

[root@MyCloudServer ~]# ls

bin  boot  data  dev  etc  home  lib  lib64  lost+found  media  mnt  opt  proc  root  sbin  selinux  srv  sys  tmp  usr  var 

[root@MyCloudServer ~]# mount /dev/xvdb1 /data

 

5. 驗證掛載是否成功

[root@MyCloudServer ~]# df -k

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/xvda1              9131772   7066884   1601012  82% /

none                    454256         0    454256   0% /dev/shm

/dev/xvdb1              5154852     43040   4849956   1% /data

 

6. 設置開機自動掛載

 

[root@MyCloudServer ~]# vi /etc/fstab

在文本最下面添加

/dev/xvdb1               /data                 ext3    defaults        0 0

 

然后保存退出。

 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 成人在线观看免费爱爱 | 国产精品.com | 中文日韩在线视频 | 一级大片一级一大片 | 天天碰天天操 | 在线亚洲综合 | 91精品国啪老师啪 | 成人艳情一二三区 | 色妇视频| 国产精品久久久久无码av | av免费在线网 | 小情侣嗯啊哦视频www | 97伦理| 精品国产99久久久久久宅男i | 国产精品欧美久久久久一区二区 | 久久久国产精品视频 | 91成人一区二区三区 | 国产免费一级淫片 | 欧美一级美国一级 | 92看片淫黄大片一级 | 免费的性生活视频 | 久久久tv | 天堂成人国产精品一区 | 香蕉久久久久久 | 日韩黄色av | 久久久久久中文字幕 | 成人在线视频精品 | 日日碰日日操 | 久草视频免费 | 看免费黄色大片 | 成人一区二区三区在线 | 免费看欧美一级特黄a大片 久久免费视频一区二区三区 | 成人福利在线 | 欧美在线观看视频一区二区 | 成人在线视频在线观看 | 黄色网址免费入口 | 久久久久电影网站 | 精品人伦一区二区三区蜜桃网站 | 久久精品日产高清版的功能介绍 | 一区二区三区欧美在线 | 91精品国产日韩91久久久久久360 |