본문 바로가기

작업일지/Linux

dev의 UUID 알아내기

uuid를 알아내기 위해 vol_id를 사용 했는데 아래와 같은 에러가 발생할때...

# vol_id uuid /dev/sdb
uuid: error opening volume


다음처럼 blkid로 알아낼수 있다.
nas:~# blkid
/dev/sda1: UUID="a50d8d66-b46a-4464-b09f-c4a9d0d9d394" TYPE="ext2"
/dev/sda2: UUID="6w5Hqt-ERrE-RMLm-60wT-QBQJ-XYyN-o6uAzm" TYPE="lvm2pv"
/dev/dm-0: UUID="c39a0095-7a92-4ca2-a988-f4590a794dfd" TYPE="ext3"
/dev/dm-1: UUID="b21b71e0-bb45-436e-b488-cbd7ebb83809" TYPE="ext3"
/dev/dm-2: UUID="536e8ed7-dccb-419e-88ed-a97be8dac836" TYPE="ext3"
/dev/dm-3: TYPE="swap"
/dev/dm-4: UUID="14b772bc-992d-49f4-8150-3cc32ec8db2b" TYPE="ext3"
/dev/dm-5: UUID="ac04df9d-3cfe-445e-848b-79d1719fe67c" TYPE="ext3"
/dev/sdb: UUID="b700e3bd-fc0d-4a67-b7d3-a313e2128c99" TYPE="ext3"
/dev/sdc: UUID="a7fbdd2e-b95a-4907-b943-c2b565f16d9c" TYPE="ext3" 




반대로 findfs를 이용해서 UUID로  장치를 알아낼수 있다.

 
nas:~# findfs  UUID="83c91473-4617-4f83-9bae-3e2087dfd948"
/dev/sde
nas:~#