Home  >  Article  >  Operation and Maintenance  >  Replace the system disk by replacing the system disk (non-public mirror)

Replace the system disk by replacing the system disk (non-public mirror)

坏嘻嘻
坏嘻嘻Original
2018-09-18 11:11:373331browse

This article introduces how to replace the system disk (non-public image) by replacing the system disk, and focuses on the specific operation steps.

Replacing the system disk (non-public image)

Replacing the system disk means reassigning a system disk for you (the system disk ID will be updated), and the original system disk will be released. If you choose the wrong operating system when creating an ECS instance, or if you need to expand the system disk capacity or use another operating system as your business develops, you can do this by replacing the system disk. You can change the system disk image to a public image, shared image, custom image or any image in the image market.

Description

Microsoft has stopped supporting Windows Server 2003. In order to ensure the security of your data, Alibaba Cloud does not recommend that ECS instances continue to use the Windows Server 2003 system, and this image is no longer provided. For more information, please refer to About Alibaba Cloud no longer supports Windows Server 2003 system images.

After replacing the system disk,

Your instance will be assigned a new system disk, the system disk ID will be updated, and the original system disk will be released.

The cloud disk type of the system disk cannot be changed.

The IP address and MAC address of the instance remain unchanged.

To ensure that there are enough snapshot quotas to complete the automatic snapshot policy of the new system disk, you can delete unnecessary old system disk snapshots.

This article describes how to replace the system disk image with a non-public image. If you need to use a public image, please refer to the document Replacing the System Disk (Public Image).

Notes

Replacing the system disk is a high-risk operation, so please be sure to read the following precautions carefully before replacing the system disk .

Risks

Replacing the system disk has the following risks:

Replacing the system disk requires stopping the instance, thus interrupting your business.

After the replacement is completed, you need to redeploy the business operating environment in the new system disk, which may cause long-term interruption to your business.

Replacing the system disk means reassigning a system disk to your instance. The disk ID will change, so snapshots created based on the old system disk cannot be used to roll back the new system disk.

Note

After replacing the system disk, the snapshots you created manually will not be affected, and you can still use these snapshots to create custom images. If you set an automatic snapshot policy for the old system disk and set the automatic snapshot to be released along with the disk, the automatic snapshot policy will no longer apply to the new system disk, and the automatic snapshots of the old system disk will be automatically deleted.

Notes on cross-operating system replacement

Cross-operating system replacement refers to replacing Windows and Linux systems with each other.

Note

Regions outside mainland China do not currently support the exchange of Linux and Windows systems. Only replacement between different Linux distributions or different Windows versions is supported.

When changing across operating systems, the file system format of the data disk may not be recognized.

If your data disk does not have important data, it is recommended that you re-initialize the data disk and then format it to the default file system of the corresponding system.

If there is important data on your data disk, you need to do the following:

Change the Windows system to a Linux system: You need to install software identification separately, such as NTFS-3G, etc., because Linux lacks The NTFS format cannot be recognized under normal circumstances.

Changing the Linux system to a Windows system: You need to install separate recognition software, such as Ext2Read, Ext2Fsd, etc., because Windows cannot recognize file system formats such as ext3, ext4, and XFS by default.

If you change the operating system from Windows to Linux, you can choose to use password authentication or SSH key pair authentication.

Prerequisites

Before replacing the system disk image with a non-public image, you must complete the following work:

If you change to a custom image:

If you want to use the image on an ECS instance, you must create a snapshot of the system disk of the specified instance and use the snapshot to create a custom image. If this instance is not in the same region as the instance where you want to replace the system disk, you need to copy the image.

If you want to use a local physical image file, you need to import the image in the console or use Packer to create and import the local image. The image must be in the same region as your instance.

If you want to use an image from another region, you need to copy the image first.

Description

The images obtained through the above method will appear in the drop-down list of Custom Image when replacing the system disk.

If you want to use the image of another Alibaba Cloud account, you must share the image first.

If you change to a Linux system and choose SSH key pair authentication, you must first create an SSH key pair.

Because replacing the system disk is a high-risk operation that may cause data loss or business interruption. In order to minimize the impact of replacing the system disk on your business, it is recommended to create a snapshot of the current system disk before replacing the system disk.

Note

Avoid creating snapshots during your business peak periods to avoid affecting your business. A 40 GiB snapshot takes about 40 minutes to create the first time. So please allow enough time. Moreover, creating snapshots may reduce block storage I/O performance (generally within 10%), causing temporary slowdowns.

When creating a snapshot, please ensure that the system disk has enough space. It is recommended to reserve 1 GiB of space. Otherwise, the system may not start normally after the system disk is expanded and replaced.

Operation steps

Log in to the ECS management console.

In the left navigation bar, click Instances.

Select a region.

Find the instance where the system disk needs to be replaced, and in the Operation column, select More > Stop.

When the instance status changes to Stopped, it means that the instance has been stopped successfully.

In the Action column, select More > Replace system disk.

In the pop-up dialog box, after carefully reading the precautions for replacing the system disk, click OK to replace the system disk.

On the Change System Disk page,

Image type: select custom image, shared image or image market, and select the required image.

System disk: You cannot change the cloud disk type of the system disk, but you can expand the system disk according to business needs and new image requirements, with a maximum capacity of 500 GiB. The minimum capacity that can be set during expansion is related to the current capacity of the system disk and the mirror, as shown in the following table.

Replace the system disk by replacing the system disk (non-public mirror)

Note

If you have done the renewal and downgrade operation, you cannot modify the system disk capacity before entering the next billing cycle.

Security settings:

If the new operating system is a Windows system, you can only use password authentication.

If your instance is an I/O optimized instance and the new operating system is Linux, you can choose to use password authentication or SSH key pair authentication. You must set a login password or bind an SSH key pair.

Confirm Configuration fee: Generally refers to the cost of the system disk. For system disk prices, please see the cloud product pricing page. If the custom image you choose comes from the image market, there may be a fee, which is also included in the configuration fee. For mirroring billing information, please refer to Billing Overview.

Description

System disk price description: The system disk is sold based on the starting capacity and charged based on the starting price. After the starting capacity is exceeded, each additional 1 GiB is charged according to the linear billing price. For the system disk with the initial capacity, the annual and monthly subscription price is in RMB/month, and the pay-as-you-go price is in RMB/hour.

After confirming that everything is correct, click OK to change.

Log in to the ECS console to monitor the system status. It will take about 10 minutes to complete the operating system replacement. Once completed, the instance starts automatically.

Follow-up operations

After replacing the system disk, you may need to do the following:

(optional) for new Set the automatic snapshot policy for the system disk. The automatic snapshot policy is bound to the disk ID. After replacing the system disk with a new one, the automatic snapshot policy applied on the old disk will automatically become invalid. You need to set an automatic snapshot policy for the new system disk.

If the system is Linux before and after the replacement, and the data disk was originally mounted on the instance and the partition was automatically mounted at startup: After the system disk is replaced, the data disk partition mounting information in the original system disk is lost. . You must write the new partition information in the /etc/fstab file of the new system disk and mount the partition. There is no need to format and partition the data disk. The operation steps are as follows. For specific operation commands, refer to Linux formatting and mounting data disk:

(recommended) Back up etc/fstab.

Write new partition information to /etc/fstab.

View the new partition information in /etc/fstab.

Run the mount command to mount the partition.

Check the file system space and usage: Run the command df -h.

After the mounting operation is completed, you can start using the new data disk without restarting the instance.

Related API

ReplaceSystemDisk

The above is the detailed content of Replace the system disk by replacing the system disk (non-public mirror). For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn