azure 微软云 规范挂载附加数据磁盘(转)

1,先使用fdisk进行磁盘分区,一般直接分成一个区

[[email protected]_db_m01 ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building 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): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-133544, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-133544, default 133544):
Using default value 133544

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
   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): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[[email protected]_db_m01 ~]# 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48

2,分区后查看实际分好的分区磁盘目录名称

[[email protected]_db_m01 ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 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: 0x000c23d3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3789    30432256   83  Linux
/dev/sda2            3789        3917     1024000   82  Linux swap / Solaris

Disk /dev/sdb: 240.5 GB, 240518168576 bytes
255 heads, 63 sectors/track, 29241 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: 0x40a7f99c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       29242   234879936   83  Linux

Disk /dev/sdc: 1098.4 GB, 1098437885952 bytes
255 heads, 63 sectors/track, 133544 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: 0xd788cc0a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      133544  1072692148+  83  Linux
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32

3,使用 mkfs.ext4 命令格式化磁盘成格式化成ext4各式的文件系统。

[[email protected]_db_m01 ~]# mkfs.ext4 /dev/sdc1
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
67043328 inodes, 268173037 blocks
13408651 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
8184 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, 71663616, 78675968,
    102400000, 214990848

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[[email protected]_db_m01 ~]# 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26

4,开始挂载新的分区磁盘到/oracle

[root@crm_db_m01 ~]# mkdir /oracle
[root@crm_db_m01 ~]# mount /dev/sdc1 /oracle
[root@crm_db_m01 ~]# 

  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5

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 ~]# 
  • 1
  • 2
  • 3
  • 4
  • 1
  • 2
  • 3
  • 4

进行配置/etc/fstab,配置uuid

[[email protected]_db_m01 ~]# vim /etc/fstab
You have new mail in /var/spool/mail/root
[[email protected]_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 1
UUID=81796489-70bd-4707-b844-9088f8a1a209           /oracle                   ext4    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
[[email protected]_db_m01 ~]# 
时间: 2024-08-10 05:00:30

azure 微软云 规范挂载附加数据磁盘(转)的相关文章

Microsoft Azure 微软云平台系列新品发布

在移动为先,云为先的今天,微软为拥抱云文化的企业提供了技术和工具.利用创新且全面的移动解决方案和开发者工具,微软有独到之处,它帮助所有客户在云为先时代中发现潜在价值. 正如希望加快云创新步伐的你们所期待的,自 WPC 2015 之后我们已经为大家提供了跨越微软云平台的产品.以下就是一份最新整合的 Microsoft Azure 微软云平台系列新品发布名单. 这次更新包括以下方面: 企业移动 Azure 应用市场 Azure Pack v2 UR7 Visual Studio 企业移动 微软企业移

阿里云服务器挂载新数据盘

首先查看数据盘的信息,找到新添加的数据盘,如/dev/xvdb fdisk -l 然后将数据盘分区 fdisk /dev/xvdb #然后根据提示 #输入 n ,表示设定新的分区 #输入 p ,表示Primary partition(主分区) #输入 1 ,表示只分1个区. 再次查看数据盘的信息,便会发现数据盘分区成功,如新建了分区/dev/xvdb1 fdisk -l 然后开始格式化分区,使用ext4格式(也可以查看ext3等其他分区格式) mkfs.ext4 /dev/xvdb1 格式化成功

Azure上如何在Linux下挂载数据磁盘

在Azure上创建了虚拟机之后,我们在一些情况下会需要添加更多的数据磁盘来存储持久化数据,本文介绍如何快速的在Azure Linux的虚拟机上添加数据磁盘并初始化: 登陆Azure的管理界面,并创建虚拟机,本文使用CentOS 6.5作为示例操作系统,其他Linux操作系统类似 我们先使用SSH登录到改Linux操作系统,检查下当前系统的磁盘状态: 我们可以看到,目前的Linux系统下只有/sda和/sdb设备,其中/dev/sdb1是系统自动分配的临时磁盘,请不要将重要数据存储在上面,重要的数

Windows Azure Virtual Machine (29) 修改Azure VM 数据磁盘容量

<Windows Azure Platform 系列文章目录> 当我们使用Windows Azure管理界面,创建Azure虚拟机的时候,默认挂载的磁盘是固定大小的 1.比如我创建1个Windows Server虚拟机 2.需要挂载额外的数据磁盘,一开始我初始化数据磁盘的容量为500G 3.经过一段时间以后,500GB容量不够了,我需要将这块数据磁盘扩容 注意:Azure A系列和D系列的虚拟机,磁盘容量是用多少算多少.比如我们挂载了1TB的数据磁盘,但是实际只使用1GB的存储空间. 微软只会

关于Azure中虚拟机数据磁盘大小

首先,在Azure中关于数据存储的付费规则中规定,只要你使用的不是Azure的XIO高级存储提供的I/O密集型的高吞吐低延迟的服务,那么得益于Azure存储设计中采用的稀疏文件方式存储,存储虚拟机VHD的存储只会按照实际的写入数据的使用量进行付费,因此最佳实践就是建立VHD磁盘文件的时候就最好设置为1023GB,也就是Azure订阅所支持的最大值 1TB大小.当然这里讨论的是使用单个磁盘的问题,不包括出于性能或者容量限制等问题采用多个VHD数据磁盘到Azure虚拟机中,并在上面构建软RAID解决

如何为Azure虚拟机添加数据磁盘

记得以前好像写过一篇Azure虚拟机添加磁盘的博文,今天再写这个是因为有了一些更新.在Azure种新建一台虚拟机在默认情况下只有一块操作系统磁盘和一块临时磁盘.临时磁盘不是永久化的磁盘,它的读写速度要略高于系统磁盘或者普通的附加磁盘,所以通常用于存放一些临时数据,进行swap分区或者虚拟内存的配置,或者存放一些安装程序来使用.注意:临时磁盘上的数据在虚拟机关闭重新开机后数据会丢失.系统磁盘同样不适用于存放应用的数据,原因是系统磁盘空间本身不大,对于Windows虚拟机而言,默认的系统磁盘只有12

Azure 经典Windows虚拟机数据磁盘扩容

1, 登录Azure Account PS C:\Users\jia.xiaolei> Add-AzureAccount -Environment AzureChinaCloud Id Type Subscriptions -- ---- ------------- [email protected] User 09383bd9-0ddc-4647-a128-0417a82dc725... PS C:\Users\jia.xiaolei> 2, 指定订阅ID PS C:\Users\jia.x

微软云基础架构Hyper-scale Datacenter

每天醒来,可能很多人的习惯都是打开手机,看看微信,刷刷朋友圈,或者看看新闻,去咖啡店,打开电脑搜索一些关键字,观看视频,电视剧--可是你有没有想过你每一次键盘的敲击,每一次微信的语音的发送,数据会流向哪里,会怎么传播,我们怎么会快速的得到离我最近的餐厅信息?事实上,你所使用的所有这些服务,都运行在一个个的数据中心中,而数据中心正是信息世界中数据交换,流动,计算的心脏. 越来越多的大型IT公司将自己的数据中心和云端基础设施作为其重要的战略资产和核心竞争力的一部分,也有人可能看到过网上流出的goog

微软云基础架构 Hyper-scale Datacenter

每天醒来,可能很多人的习惯都是打开手机,看看微信,刷刷朋友圈,或者看看新闻,去咖啡店,打开电脑搜索一些关键字,观看视频,电视剧--可是你有没有想过你每一次键盘的敲击,每一次微信的语音的发送,数据会流向哪里,会怎么传播,我们怎么会快速的得到离我最近的餐厅信息?事实上,你所使用的所有这些服务,都运行在一个个的数据中心中,而数据中心正是信息世界中数据交换,流动,计算的心脏. 越来越多的大型IT公司将自己的数据中心和云端基础设施作为其重要的战略资产和核心竞争力的一部分,也有人可能看到过网上流出的goog