#####################################################
##如有转载,请务必保留本文链接及版权信息
##欢迎广大运维同仁一起交流linux/unix网站运维技术!
##QQ:335623998
##E-mail:[email protected]
<b>1、系统环境</b>
[root@mail1 ~]# cat /etc/redhat-release
CentOS release 6.3 (Final)
You have new mail in /var/spool/mail/root
[root@mail1 ~]# uname -m
x86_64
[root@mail1 ~]# uname -r
2.6.32-279.el6.x86_64
<b>5、CentOS6.3 64bit挂载MD3220虚拟磁盘</b>
5.1 扫描新增的虚拟磁盘
rescan_dm_devs 命令扫描主机服务器系统,查找映射至主机服务器的现有和新增的虚拟磁盘。
[root@mail1 ~]# rescan_dm_devs
Host adapter mpt2sas host1 controller /sys/class/scsi_host/host1/device/bsg found.
scanning host 1 ctrl /sys/class/scsi_host/host1/device/bsg result
LUN 0 is not mapped to a disk on controller /sys/class/scsi_host/host1/device/bsg
scsi remove-single-device mpt2sas 1 0 /sys/class/scsi_host/host1/device/bsg 0
rescan the devices on mpt2sas host1 controller /sys/class/scsi_host/host1/device/bsg ...
Done.
5.2 显示多路径设备拓扑
[root@mail1 ~]# multipath -ll
mpathb (3690b11c00022bafc000005725105d5df) dm-0 DELL,MD32xx
size=2.2T features='3 queue_if_no_path pg_init_retries 50' hwhandler='1 rdac' wp=rw
`-+- policy='round-robin 0' prio=6 status=active
`- 1:0:0:0 sdb 8:16 active ready running
5.3 新建分区
[root@mail1 ~]# fdisk -l /dev/mapper/mpathb
Disk /dev/mapper/mpathb: 2398.4 GB, 2398352687616 bytes
255 heads, 63 sectors/track, 291583 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
5.4 磁盘空间大于2T,使用parted新建分区
[root@mail1 ~]# parted /dev/mapper/mpathb
GNU Parted 2.1
Using /dev/mapper/mpathb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
(parted) mkpart primary 0% 100%
(parted) print
Model: Linux device-mapper (multipath) (dm)
Disk /dev/mapper/mpathb: 2398GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 2398GB 2398GB primary
(parted) quit
Information: You may need to update /etc/fstab.
5.5 向 Device Mapper 添加新分区
kpartx 命令可将 fdisk 新创建的分区添加至 Device Mapper 的可用分区列
表。请参阅以下示例,其中 mpath<x> 是要在其上创建分区的设备节点。
# kpartx –a /dev/mapper/mpath<x>
如果成功执行,则命令不会显示输出。要验证命令是否成功并查看确切的分 区命名,用户可使用这些命令查看分配的完整分区名
[root@mail1 mdstoragemanager]# cd /dev/mapper/
[root@mail1 mapper]# ls
control mpathb mpathbp1
5.6 在 Device Mapper 分区上创建文件系统
[root@mail1 mapper]# mkfs -t ext4 /dev/mapper/mpathbp1
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
146391040 inodes, 585534976 blocks
29276748 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
17870 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, 512000000, 550731776
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@mail1 mapper]# tune2fs -c -1 /dev/mapper/mpathbp1
tune2fs 1.41.12 (17-May-2010)
Setting maximal mount count to -1
mount /dev/mapper/mpathbp1 /data
5.8 查看分区状况
[root@mail1 ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext4 12G 604M 11G 6% /
tmpfs tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/sda1 ext4 504M 54M 425M 12% /boot
/dev/sda9 ext4 794G 79G 676G 11% /home
/dev/sda2 ext4 247G 188M 234G 1% /index
/dev/sda6 ext4 12G 622M 11G 6% /opt
/dev/sda7 ext4 12G 1.2G 11G 11% /usr
/dev/sda8 ext4 12G 232M 11G 3% /var
/dev/mapper/mpathbp1
ext4 2.2T 167G 1.9T 8% /data
<b>4、卸载 PowerVault MD 存储软件</b>
从 Linux 中卸载 MD 存储软件
4.1 默认情况下, PowerVault MD Storage Manager 安装在 /opt/dell/mdstoragemanager 目录中。如果在安装过程中使用其他目录, 则应在执行卸载过程之前浏览至该目录。
# cd /opt/dell/mdstoragesoftware/mdstoragemanager
4.2 从安装目录中,打开 Uninstall Dell MD Storage Software 目录。
# cd Uninstall\ PowerVault\ Modular\ Disk\ Storage\ Manager/
# ls
InstallScript.iap_xml Uninstall PowerVault Modular Disk Storage Manager
installvariables.properties Uninstall PowerVault Modular Disk Storage Manager.lax
uninstaller.jar
4.3 运行文件Uninstall PowerVault Modular Disk Storage Manager
# ./Uninstall\ PowerVault\ Modular\ Disk\ Storage\ Manager
Preparing SILENT Mode Uninstallation...
===============================================================================
PowerVault Modular Disk Storage Manager (created with InstallAnywhere)
-------------------------------------------------------------------------------
Uninstalling...
………略………
*************************
Uninstallation Complete. #卸载完毕
接下来将使用Iometer 测试MD3220 IO性能。
MD3220 四部曲:
本文转自pandazhai 51CTO博客,原文链接:http://blog.51cto.com/dreamway/1131557