mysql数据文件放置在/data目录
1、修改/etc/fstab
[root@pt218 /]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Fri May 17 16:05:37 2013
#
# 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=5526c0f1-49ee-41f7-a450-dc31109e1006 / ext4 defaults 1 1
UUID=5526c0f1-49ee-41f7-a450-dc31109e1006 / ext4 noatime 1 1
UUID=50cd6d2d-7a59-4b25-bae9-af6d5b028021 /boot ext4 defaults 1 2
/dev/mapper/vg_data1-lv_var /var ext4 defaults 1 2
/dev/mapper/vg_data1-lv_swap swap swap defaults 0 0
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
/dev/mapper/vg_data1-lv_app /app ext4 defaults 1 2
/dev/mapper/vg_data1-lv_home /home ext4 defaults 1 2
2、重新加载mount
mount -o remount /
3、检查是否成功修改
[root@pt218 /]# mount
/dev/mapper/ddf1_44656c6c202020201028001510281f033e632b06c3572061p2 on / type ext4 (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/mapper/ddf1_44656c6c202020201028001510281f033e632b06c3572061p1 on /boot type ext4 (rw)
/dev/mapper/vg_data1-lv_var on /var type ext4 (rw)
/dev/mapper/vg_data1-lv_app on /app type ext4 (rw)
/dev/mapper/vg_data1-lv_home on /home type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)