1、在EXSI中新增磁盘
1.1、打开虚拟机属性窗口,点击添加
1.2、选择磁盘,点击下一步
1.3、选择创建新的虚拟磁盘
1.4、调整要新增的磁盘大小
1.5、后面一下步、完成。
2、在centos中挂载磁盘
2.1、查看新增的磁盘是否被系统识别
[root@bogon u01]# fdisk -l Disk /dev/sda: 53.7 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 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: 0x0008b1b1 Device Boot Start End Blocks Id System /dev/sda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 64 6528 51915776 8e Linux LVM Disk /dev/mapper/VolGroup-lv_root: 49.0 GB, 48997859328 bytes 255 heads, 63 sectors/track, 5956 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 Disk /dev/mapper/VolGroup-lv_swap: 4160 MB, 4160749568 bytes 255 heads, 63 sectors/track, 505 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
2.2、如果查看结果,没有新增的磁盘/dev/sdb,则执行下面操作,再执行fdisk -l,新增磁盘会出现。
[root@bogon dev]# ls /sys/class/scsi_host/ host0 host1 host2 [root@bogon dev]# echo "- - -" > /sys/class/scsi_host/host0/scan [root@bogon dev]# echo "- - -" > /sys/class/scsi_host/host1/scan [root@bogon dev]# echo "- - -" > /sys/class/scsi_host/host2/scan
2.3、格式化新增磁盘
[root@bogon dev]# mkfs.ext4 /dev/s scd0 sda1 sdb sg1 shm/ sr0 stdin systty sda sda2 sg0 sg2 snapshot stderr stdout [root@bogon dev]# mkfs.ext4 /dev/sd sda sda1 sda2 sdb [root@bogon dev]# mkfs.ext4 /dev/sd sda sda1 sda2 sdb [root@bogon dev]# mkfs.ext4 /dev/sdb mke2fs 1.41.12 (17-May-2010) /dev/sdb is entire device, not just one partition! 无论如何也要继续? (y,n) y 文件系统标签= 操作系统:Linux 块大小=4096 (log=2) 分块大小=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 58982400 inodes, 235929600 blocks 11796480 blocks (5.00%) reserved for the super user 第一个数据块=0 Maximum filesystem blocks=4294967296 7200 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 正在写入inode表: 完成 Creating journal (32768 blocks): 完成 Writing superblocks and filesystem accounting information: 完成 This filesystem will be automatically checked every 33 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
2.4、挂载新增磁盘
[root@bogon dev]# mkdir /u02 [root@bogon dev]# mount /dev/sdb /u02
2.5、查看新增的磁盘,有/dec/sdb /u02就算成功
[root@bogon dev]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 45G 3.1G 40G 8% / tmpfs 1.9G 0 1.9G 0% /dev/shm /dev/sda1 477M 39M 413M 9% /boot /dev/sdb 886G 72M 841G 1% /u02