2010年5月7日 星期五

linux block device uuid and major-minor number


1. uuid

1) vol_id
# sudo vol_id /dev/sda1

2) ls
# ls -l /dev/disk/by-uuid/

3) blkid
# blkid /dev/sda1

software raid
#mdadm -d /dev/md0

refer to: http://www.cyberciti.biz/faq/linux-finding-using-uuids-to-update-fstab/

2.major-minor number
1)
# cat /proc/partitions
major minor #blocks name

8 0 286513152 sda
8 1 104391 sda1
8 2 286390755 sda2
8 16 488243200 sdb
8 17 488239416 sdb1
8 32 976588800 sdc
8 33 976583286 sdc1
253 0 284327936 dm-0
253 1 2031616 dm-1

2)
# cat /sys/block/sda/sda1/dev
8:1
# cat /sys/block/sda/sda2/dev
8:2

沒有留言:

張貼留言

文章分類