azure 微软云 规范挂载附加数据磁盘
来源:互联网 发布:金山软件大厦 编辑:程序博客网 时间:2024/04/28 15:34
azure云上面,一般系统盘都很小,空间基本不够使用,所以我们需要附加磁盘,首先在管理界面附加一个SSD磁盘,一般默认的是/dev/sdc目录。在2016年的时候,附加磁盘可以直接使用mkfs.ext4 /dev/sdc进行数据磁盘初始化,但是在2017年就不可以了,如果直接mkfs.ext4 /dev/sdc的话,直接azure云上的vm虚拟机就down了罢工了,所以我们需要正确的进行磁盘挂载。
1,先使用fdisk进行磁盘分区,一般直接分成一个区
[root@crm_db_m01 ~]# fdisk /dev/sdcDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel with disk identifier 0xd788cc0a.Changes will remain in memory only, until you decide to write them.After that, of course, the previous content won't be recoverable.Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u').Command (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-133544, default 1): Using default value 1Last cylinder, +cylinders or +size{K,M,G} (1-133544, default 133544): Using default value 133544Command (m for help): mCommand action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition 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): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.[root@crm_db_m01 ~]#
2,分区后查看实际分好的分区磁盘目录名称
[root@crm_db_m01 ~]# fdisk -lDisk /dev/sda: 32.2 GB, 32212254720 bytes255 heads, 63 sectors/track, 3916 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000c23d3 Device Boot Start End Blocks Id System/dev/sda1 * 1 3789 30432256 83 Linux/dev/sda2 3789 3917 1024000 82 Linux swap / SolarisDisk /dev/sdb: 240.5 GB, 240518168576 bytes255 heads, 63 sectors/track, 29241 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x40a7f99c Device Boot Start End Blocks Id System/dev/sdb1 1 29242 234879936 83 LinuxDisk /dev/sdc: 1098.4 GB, 1098437885952 bytes255 heads, 63 sectors/track, 133544 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0xd788cc0a Device Boot Start End Blocks Id System/dev/sdc1 1 133544 1072692148+ 83 Linux
3,使用 mkfs.ext4 命令格式化磁盘成格式化成ext4各式的文件系统。
[root@crm_db_m01 ~]# mkfs.ext4 /dev/sdc1mke2fs 1.41.12 (17-May-2010)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks67043328 inodes, 268173037 blocks13408651 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=42949672968184 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000, 214990848Writing inode tables: done Creating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 27 mounts or180 days, whichever comes first. Use tune2fs -c or -i to override.[root@crm_db_m01 ~]#
4,开始挂载新的分区磁盘到/oracle
[root@crm_db_m01 ~]# mkdir /oracle[root@crm_db_m01 ~]# mount /dev/sdc1 /oracle[root@crm_db_m01 ~]#
5,开机启动挂载配置
需要用uuid的方式挂载,最好先用ulkid获取/dev/sdc1的uuid,然后再设置开机启动挂载配置
[root@crm_db_m01 ~]# blkid/dev/sda1: UUID="6d089360-3e14-401d-91d0-378f3fd09332" TYPE="ext4" /dev/sdc1: UUID="81796489-70bd-4707-b844-9088f8a1a209" TYPE="ext4" [root@crm_db_m01 ~]#
进行配置/etc/fstab,配置uuid
[root@crm_db_m01 ~]# vim /etc/fstab You have new mail in /var/spool/mail/root[root@crm_db_m01 ~]# more /etc/fstab ## /etc/fstab# Created by anaconda on Wed Jan 15 04:45:47 2014## 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=6d089360-3e14-401d-91d0-378f3fd09332 / ext4 defaults 1 1UUID=81796489-70bd-4707-b844-9088f8a1a209 /oracle ext4 defaults 1 2tmpfs /dev/shm tmpfs defaults 0 0devpts /dev/pts devpts gid=5,mode=620 0 0sysfs /sys sysfs defaults 0 0proc /proc proc defaults 0 0[root@crm_db_m01 ~]#
2 0
- azure 微软云 规范挂载附加数据磁盘
- Azure虚拟机挂载数据磁盘
- [Azure]如何定位虚拟机内部附加的数据磁盘
- 如何为Azure虚拟机附加磁盘
- 如何在 Azure 门户中将托管数据磁盘附加到 Windows VM
- 推出Azure云附加组件
- Azure 上删除虚机是否保留附加磁盘?
- 微软云 azure 数据迁移之oracle11g dataguard
- 关于微软Azure云服务器
- 在Azure 环境里安装 SharePoint 2013 系统(二)附加磁盘和 安装SharePoint 2013
- Azure云服务升级 微软公布Azure最新特性
- 微软云计算组件“Huron” – 将你的数据同步至云计算数据中心(Azure)
- 数据系列:探索Windows Azure驱动器,磁盘以及镜像
- 如何定位虚拟机内部附加的数据磁盘
- 如何定位虚拟机内部附加的数据磁盘
- 使用 PowerShell 将数据磁盘附加到 Windows VM
- 微软WINDOWS AZURE PLATFORM(云系统)
- 分享4台微软云Azure虚拟机
- leetcode解题报告17. Letter Combinations of a Phone Number
- Linux内核学习总结
- 第二次的实操任务
- 排序算法03:插入排序
- MySQL基础知识六
- azure 微软云 规范挂载附加数据磁盘
- DQL语言
- 时隔三月,我又回来了
- 在MFC图片控件中打开摄像头实时拍照
- 从0开始复习java(3)
- 小程序思维导图,让小程序不再难懂(二)
- 编程语言是部车,你选了其中哪辆?
- 【qscoj】喵哈哈村与哗啦啦村的大战(一)
- 使用ajax提交bootstrap表单数据