阿里云数据盘挂载

1.fdisk -cul
    找到磁盘
2. mkdir  /data         ##  /data 为空目录

3. 格式化磁盘
   mkfs.ext4 /dev/vdb

4. 挂载
    mount /dev/vdb  /data

5. 开机时自动挂载磁盘
   vim /etc/fstab
   新加一行: /dev/vdb                /data                   ext4    defaults        0 0



#### log

[root@iZj6ccvxma7yo7f8w36wuxZ home]# mkdir  /data
[root@iZj6ccvxma7yo7f8w36wuxZ home]# fdisk -cul

Disk /dev/vda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders, total 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 identifier: 0x00053156

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048    83886079    41942016   83  Linux

Disk /dev/vdb: 107.4 GB, 107374182400 bytes
16 heads, 63 sectors/track, 208050 cylinders, total 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
Disk identifier: 0x00000000

[root@iZj6ccvxma7yo7f8w36wuxZ home]# mkfs.ext4
mkfs.ext4     mkfs.ext4dev  
[root@iZj6ccvxma7yo7f8w36wuxZ home]# mkfs.ext4 /dev/vdb
mke2fs 1.41.12 (17-May-2010)
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=4294967296
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

Writing inode tables: done                            
Creating journal (32768 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.
[root@iZj6ccvxma7yo7f8w36wuxZ home]# mount /dev/vdb  /data
[root@iZj6ccvxma7yo7f8w36wuxZ home]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        40G   37G  899M  98% /
tmpfs           3.9G     0  3.9G   0% /dev/shm
/dev/vdb         99G   60M   94G   1% /data
[root@iZj6ccvxma7yo7f8w36wuxZ home]# vim /etc/fstab
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值