How to get UUID value and disk device attributes in Linux ?


How to view UUID values and print block device attributes in linux?



Option 1 : Using blkid command

Option 2 : Using dumbe2fs command
Option 3: using  #ls -l /dev/disk/by-uuid


To view UUID values and block device attributes:



[root@serverA ~]# blkid

/dev/cciss/c0d0p1: LABEL="/boot" UUID="0e811819-43e9-44dc-b63d-2fb8f74a9793" SEC_TYPE="ext3" TYPE="ext2"
/dev/dm-0: UUID="1607f7e2-330f-49cc-bbbb-56dbc7153bd9" SEC_TYPE="ext3" TYPE="ext2"
/dev/dm-1: UUID="605c8097-e59f-4f42-a63f-4668d457a9b2" SEC_TYPE="ext3" TYPE="ext2"
/dev/dm-2: UUID="9c6abcac-dbc8-4512-a36f-98fad866032d" SEC_TYPE="ext3" TYPE="ext2"
/dev/dm-3: UUID="ff42077e-1b86-423b-948c-c69b98b404da" SEC_TYPE="ext3" TYPE="ext2"
/dev/dm-4: UUID="51ed13d1-e0ea-430b-8dc4-a30ffdd3ca22" SEC_TYPE="ext3" TYPE="ext2"
/dev/dm-5: TYPE="swap" UUID="32e63d41-d037-49c0-9864-654d968e4436"
/dev/dm-6: UUID="4014b540-6809-4d72-aa30-588031e5c37c" TYPE="swap"
/dev/dm-7: UUID="de51f7a8-7dca-4551-b02b-8f6123349085" SEC_TYPE="ext3" TYPE="ext2"



Gather information about I/O limits:



[root@serverA ~]# blkid -i /dev/sda1

MINIMUM_IO_SIZE=70825883316781568
PHYSICAL_SECTOR_SIZE=70825883316781568
LOGICAL_SECTOR_SIZE=51169347011346944


Option2: dumpe2fs command


[root@serverA ~]# dumpe2fs  /dev/sda3 | grep UUID

dumpe2fs 1.41.12 (17-May-2010)
Filesystem UUID:          7b84a8a0-08cb-48f0-9d80-a0d2a52990d9

OR


Option 3 : ls -l /dev/disk/by-uuid/


[root@serverA ~]# ls -l /dev/disk/by-uuid/

total 0
lrwxrwxrwx 1 root root 10 Jul 18 19:42 54BC9BC5BC9B9FD2 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 18 19:41 7b84a8a0-08cb-48f0-9d80-a0d2a52990d9 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jul 18 19:41 a5808574-4c35-4f13-86ae-706668ac3e3b -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jul 18 19:42 E0987DB6987D8BB2 -> ../../sda5
lrwxrwxrwx 1 root root 10 Jul 18 19:41 f29e8378-5850-47ad-b02f-803e928abff4 -> ../../dm-0




1 comments:

Post a Comment

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks