Migrate VG in SUSE Linux to Redhat System

Source: Internet
Author: User

 

1. in the SUSE system, a new storage disk is larger than the size of 5.4T to be migrated, because converting XFS to EXT3 will occupy more storage space than the original one. I am suspended for about 6 TB, the attached storage method depends on the storage brand and type. Let me talk about EMC CX700, that is, first record the WWN of the HBA card, connect the HBA to the storage switch, configure the ZONE, connect its server to the storage, and install EMC's POWERPATH on the server, use the powerpath config command to identify the storage.

2. After the storage preparation is complete on the SUSE System (you can see the new hard disk by using pvdisplay on SUSE), you must first create a PV. Command is pvcreat/dev/[Hard Disk name]. You need to build all the new hard disks into a PV.

3. Create a New VG. Command: vgcreate [vg name]/dev/[pv name]. You can use multiple PVS to create a VG at the same time.

4. Create a new LV. Command: lvcreate-n [lv name]-L 6.4 T/dev/[vg name]

5. Create a file system. Command: mkfs. ext3/dev/[vg name]/[lv name].

The above commands are all absolute paths and can be modified as needed.

6. mount the new file system to a directory. Command: mount [lv name] [directory to be mounted]

7. Run the df command to check the permission of the mount directory.

8. first, copy the content of the original file system to the directory of the new mount. The purpose is to convert the content of the original xfs File System to the ext3 format. Because of the large data volume, it took about 36 hours to copy the file (I didn't have a hard time sleeping)

9. After the copy is complete, umount creates a new directory. Command: umount [directory name]

10. modify the status of the newly created VG. Command: vgchange-an/dev/[vg name]

11. Connect the new storage to the Redhat system on the storage and switch at this time. Note that it is best to disconnect from the suse system at this time to avoid data read/write operations.

12. I have installed EMC's POWERPATH and AGENT software on the system. The command is also powerpath config, And you can view it by using the fdisk command or pvdisplay.

13. Now we can see the newly created vg In The suse system. You can run the vgdisplay command to view the created vg. You only need to activate its status. Command: vgchange-ay [vg name]

14. After activating VG, mount the file system to a directory. The migration of the entire VG is accomplished.

The entire process seems simple, but there are still operational risks, mainly to avoid the dual-host view of storage at the same time, resulting in dual-Host Data writing at the same time.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.