阿里雲CentOS 7系統掛載SSD雲端硬碟的教程_Linux

來源:互聯網
上載者:User

一、查看SSD雲端硬碟

sudo 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: 0x635e6c7d   Device Boot  Start   End  Blocks Id System /dev/vda1   2048 83886079 41942016 83 Linux  Disk /dev/vdb: 107.4 GB, 107374182400 bytes, 209715200 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 

可以看到SSD系統已經識別為/dev/vdb

二、格式化雲端硬碟

sudo mkfs.ext4 /dev/vdb mke2fs 1.42.9 (28-Dec-2013) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 6553600 inodes, 26214400 blocks 1310720 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=2174746624 800 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks:   32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,   4096000, 7962624, 11239424, 20480000, 23887872  Allocating group tables: done        Writing inode tables: done        Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done  

三、掛載

sudo mount /dev/vdb /opt 

將雲端硬碟掛載到/opt目錄下。

四、配置開機自動掛載

修改/etc/fstab檔案,檔案末尾添加

/dev/vdb /opt ext4 defaults 0 0 

五、重啟檢查

使用

init 6 

優雅的重啟系統。

使用

sudo df -h Filesystem  Size Used Avail Use% Mounted on /dev/vda1  40G 3.6G 34G 10% / devtmpfs  1.9G  0 1.9G 0% /dev tmpfs   1.9G  0 1.9G 0% /dev/shm tmpfs   1.9G 8.4M 1.9G 1% /run tmpfs   1.9G  0 1.9G 0% /sys/fs/cgroup /dev/vdb   99G 61M 94G 1% /opt tmpfs   380M  0 380M 0% /run/user/1000 

可以看到系統已掛載了SSD雲端硬碟。

總結

以上就是阿里雲CentOS 7掛載SSD雲端硬碟方法的全部內容,希望本文的內容對大家的學習或者工作能帶來一定的協助,如果有疑問大家可以留言交流。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.