#启动多路径multipathd服务
service multipathd restart
#设置开机自动启动multipathd服务
chkconfig multipathd on
#查看信息
multipath -ll
划分存储の注意大小 2TB以上的挂载方法
parted
parted /dev/mapper/mpath0
mklabel gpt
show print
mkpart primary 0% 100%
show print
quit
格式化存储分区文件
mkfs.ext3 -F /dev/mapper/mpath0p1
挂载存储
mount /dev/mapper/mpath1p1 /caiwu/
设置开机自动挂载 方法一
vi /etc/fstab
/dev/mapper/mpath1p1 /caiwu ext3 defaults 0 0
设置开机自动挂载 方法二
vi /etc/rc.local
mount /dev/mapper/mpath1p1 /caiwu
配置大于16TB的存储容量
开始安装xfs
—————————————————————————————
yum install kmod-xfs xfsprogs //安装xfs文件系统模块
modprobe xfs //载入xfs文件系统模块
lsmod |grep xfs //查看是否载入了xfs模块
用xfs格式化并挂载
—————————————————————————————
[root@ ~]$ mkfs.xfs /dev/mapper/date
mount /dev/mapper/datep1 /data/
添加至fstab 让系统启动自动挂载
—————————————————————————————————————-
vi /etc/fstab //打开fstab
UUID=c3749d2d-08b5-45a3-9aa4-312b6161d471 /data xfs defaults 1 2 //添加挂载信息指定文件系统xfs (uuid 通过blkid /dev/sdb1 命令获取)
#创建物理卷
pvcreate /dev/mapper/mpathnpvcreate /dev/mapper/mpatho #逻辑卷组
#创建VG
vgcreate vg_1 /dev/mapper/mpathn /dev/mapper/mpatho #
#创建lv逻辑卷
lvcreate -n lv_1 -L 100T vg_1
#建立文件系统
mkfs.ext4 vg_1-lv_1
#挂载文件系统
mount -t ext4 /dev/mapper/vg_1-lv_1 /oradate
#添加rc.local 让系统启动自动挂载
vim /etc/rc.local
###################################################################
添加mount命令
mount /dev/mapper/datep1 /date
创建VG
[root@LF-MYSQL-151-108 mapper]# vgcreate data_backup /dev/mapper/date_backup1p1 /dev/mapper/date_backup2p1 /dev/mapper/date_backup3p1 /dev/mapper/date_backup4p1
激活VG
[root@LF-MYSQL-151-108 mapper]# vgchange -a y data_backup
创建LV
# lvcreate -L 105T -n lv_data_backup data_backup
格盘:
# yum install kmod-xfs xfsprogs
# modprobe xfs
# mkfs.xfs /dev/data_backup/lv_data_backup
挂载:
# mount /dev/data_backup/lv_data_backup /data_backup
其他:
删除vg
lvremove /dev/data_backup/lv_data_backup