In Linux, you can configure the fstab file to have the file systems of data disks automatically mounted on the startup of an Elastic Compute Service (ECS) instance. fstabファイルが不適切に設定され、ディスクのアタッチ順序が変更された場合、再起動後にECSインスタンスが正常に実行されない可能性があります。 This topic describes how to configure universally unique identifiers (UUIDs) in the fstab file to automatically mount the system files of data disks. これにより、前述の再起動例外を処理できます。
始める前に
このタスクについて
fstabを使用すると、/dev/vdb1などのディスクパーティション名を使用するか、UUIDを使用してファイルシステムを識別できます。 2つの方法は、次の点で異なります。
- ディスクパーティション名を使用してfstabファイル内のファイルシステムを識別する場合、ディスクのアタッチ順序が変更された場合、ディスクパーティションは元のマウントポイントにマウントされない可能性があります。 In this case, applications that run on your ECS instance may be affected.
- If UUIDs are used to identify file systems in the fstab file, the disk partitions can still be mounted to the original mount points if the attach sequence of the disks is changed. したがって、UUIDを使用してファイルシステムを識別することを推奨します。
手順
fstabファイルが設定された後、ECSインスタンスを再起動した後、システムはデータディスクをアタッチします。