Translated message

A translation of this page exists in English.

Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

UUID を使用してファイルシステムをマウントする

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6

Issue

現在、デバイスパスを使用してファイルシステムがマウントされていますが、問題が発生するのを防ぐために UUID を使用したいです。

Resolution

デバイスは、ブロックデバイスへの完全パス (“/dev/sda3” など)、ユニバーサルユニーク識別子 (UUID: “UUID=34795a28-ca6d-4fd8-a347-73671d0c19cb” など)、またはボリュームラベル (“LABEL=home” など) で特定できます。

  • 特定デバイスの UUID を特定します。
~]# blkid /dev/sda3
/dev/sda3:LABEL="home" UUID="34795a28-ca6d-4fd8-a347-73671d0c19cb" TYPE="ext3"
  • /etc/fstab ファイルを編集します。UUID のデバイスパスを以下のように変更します。
UUID=34795a28-ca6d-4fd8-a347-73671d0c19cb    /home                   ext4    defaults        1 2

次に再起動する時に、UUID でファイルシステムがマウントされます。

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments