[root@centos7 ~]# mkfs.ext4 /dev/testvg/testlv mke2fs 1.42.9 (28-Dec-2013) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 327680 inodes, 1310720 blocks 65536 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=1342177280 40 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
Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done
3.挂载逻辑卷设备至临时目录,并复制需要迁移的数据。(以下以home家目录为例进行数据迁移)
1 2 3 4 5
[root@centos7 ~]# mkdir /testdir [root@centos7 ~]# mount /dev/testvg/testlv /testdir/ [root@centos7 ~]# cp -a /home/. /testdir/ [root@centos7 ~]# ls /testdir lost+found masuri