15
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

blkidコマンド(UUIDに対応するディスクパーティション確認)

Posted at

cat /etc/fstabをすると、RHEL6とかCentOS6の場合はパーティションの
UUIDとマウント先のディレクトリを確認できるけど、そのUUIDに対応する
ディスクパーティションは知ることができません。

blkidコマンドを使うとその情報を見ることができます。

/etc/fstab:

# cat /etc/fstab
# Created by anaconda on Thu Oct 24 16:16:48 2013
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=9aafaf91-7ed9-4b25-bd01-be39f6afb935 /                       ext4    defaults        1 1
UUID=38d14fa5-8772-44cd-8db2-550d4c3780d7 /boot                   ext4    defaults        1 2
UUID=bd336ec5-2011-4f4e-a503-08af5cfa829c swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=/data01           /usr/local/data01       ext4    defaults        1 2

blkid:

$ blkid
/dev/vda1: UUID="38d14fa5-8772-44cd-8db2-550d4c3780d7" TYPE="ext4"
/dev/vda2: UUID="bd336ec5-2011-4f4e-a503-08af5cfa829c" TYPE="swap"
/dev/vda3: UUID="9aafaf91-7ed9-4b25-bd01-be39f6afb935" TYPE="ext4"
/dev/mapper/vg_data01-lv_data01: LABEL="/data01" UUID="6d33e756-e794-48d4-a4d2-7211f9b11e7c" TYPE="ext4"
/dev/vdb: UUID="xI3sFz-3Wn6-3BdM-KmTP-vftc-31HD-sgnvuq" TYPE="LVM2_member"
15
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?