How to Check Device UUID or File System UUID. (Doc ID 1505398.1)
How to Check Device UUID or File System UUID. (Doc ID 1505398.1)
APPLIES TO:
Linux OS - Version Oracle Linux 5.0 and later
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64
Linux x86
GOAL
In Linux, sometimes the name of devices or file systems are not persistent which will bring system in trouble, in such situation specify UUID (universally unique identifier) is the solution to identify the only unique component in the system.
SOLUTION
1. Device uuid
In OL5.x:
# scsi_id -u -g -s /block/sda
35000c50032387713
In OL6.x:
# scsi_id --whitelisted /dev/sdd
3600144f0da627ad70000503ad6ce0006
Or:
# udevadm info --query=all --path=/sys/block/sda
P: /devices/pci0000:00/0000:00:01.0/0000:01:00.0/host0/target0:2:0/0:2:0:0/block/sda
N: sda
W: 99
S: block/8:0
S: disk/by-id/scsi-364403a78570b200018ac2cd20575ec04
S: disk/by-path/pci-0000:01:00.0-scsi-0:2:0:0
S: disk/by-id/wwn-0x64403a78570b200018ac2cd20575ec04
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/host0/target0:2:0/0:2:0:0/block/sda
E: MAJOR=8
E: MINOR=0
E: DEVNAME=/dev/sda
E: DEVTYPE=disk
E: SUBSYSTEM=block
E: MPATH_SBIN_PATH=/sbin
E: ID_SCSI=1
E: ID_VENDOR=LSI
E: ID_VENDOR_ENC=LSI
E: ID_MODEL=MRSASRoMB-4i
E: ID_MODEL_ENC=MRSASRoMB-4i
E: ID_REVISION=2.12
E: ID_TYPE=disk
E: ID_SERIAL_RAW=364403a78570b200018ac2cd20575ec04
E: ID_SERIAL=364403a78570b200018ac2cd20575ec04
E: ID_SERIAL_SHORT=64403a78570b200018ac2cd20575ec04
E: ID_WWN=0x64403a78570b2000
E: ID_WWN_VENDOR_EXTENSION=0x18ac2cd20575ec04
E: ID_WWN_WITH_EXTENSION=0x64403a78570b200018ac2cd20575ec04
E: ID_SCSI_SERIAL=0004ec7505d22cac1800200b57783a40
E: ID_BUS=scsi
E: ID_PATH=pci-0000:01:00.0-scsi-0:2:0:0
E: ID_PART_TABLE_TYPE=dos
E: LVM_SBIN_PATH=/sbin
E: DEVLINKS=/dev/block/8:0 /dev/disk/by-id/scsi-364403a78570b200018ac2cd20575ec04 /dev/disk/by-path/pci-0000:01:00.0-scsi-0:2:0:0 /dev/disk/by-id/wwn-0x64403a78570b200018ac2cd20575ec04
For multipath devices:
# multipath -ll -v 360080e500024a048000004044f3c64ee dm-0 SUN,LCSM100_F
size=95G features='1 queue_if_no_path' hwhandler='1 rdac' wp=rw
|-+- policy='round-robin 0' prio=6 status=active
| `- 7:0:0:0 sdb 8:16 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
`- 8:0:0:0 sdk 8:160 active ghost running
Note: the device uuid is fixed value, the uuid of dm-mp device should be identical with the uuid of its paths. In most of situation could not be modified unless the device supports dynamic uuid feature.
Usage:
The device uuid often being used to persistent the device name or dm-mpath name, following example bind the wwid with name oraasm1 persistently.
multipath {
wwid 36006048caf0b141598afa8e2875797a1
alias oraasm1
}
Note: the partition (such as sda1 sdb1) does not have uuid.
2. File system uuid
In OL5.x:
# blkid /dev/sda1
/dev/sda1: LABEL="/boot1" UUID="ae298adb-1b94-42a0-9dc9-a121c7561a5b" TYPE="ext3" SEC_TYPE="ext2" # /lib/udev/vol_id /dev/sda1
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=ae298adb-1b94-42a0-9dc9-a121c7561a5b
ID_FS_LABEL=/boot1
ID_FS_LABEL_SAFE=boot1
Note: the /dev/sdxx must be formated as file system.
Usage:
Could specify uuid in /etc/fstab to bind the device with mount directory persistently.
UUID=xxx-xxx-xxx-xxx /mount_dir ext3 defaults 1 2
Note: file system uuid will be changed after re-create file system.
3. LVM2 uuid
# pvs -v
PV VG Fmt Attr PSize PFree DevSize PV UUID
/dev/sda2 vg0 lvm2 a-- 48.81G 0 48.83G xCJzmN-oJmL-kMFl-JCrb-lfoH-movY-6x6K6O
/dev/sda3 vg0 lvm2 a-- 48.81G 0 48.83G 9iXmmM-kKqV-OYDb-eSVN-ymCw-wwVk-uY6fXo # lvs
LV VG #Seg Attr LSize Maj Min KMaj KMin Origin Snap% Move Copy% Log Convert LV UUID
lvroot vg0 3 -wi-ao 146.44G -1 -1 253 0 C0l0R2-KhH8-N7Nk-BhXn-MJhS-35dn-XXdL1B
lvasmlib vg1 1 -wi-a- 4.88G -1 -1 253 6 5nlcKy-1kvs-l7qb-eIts-tEs6-E2JG-RisWDx # vgs -v
VG Attr Ext #PV #LV #SN VSize VFree VG UUID
vg0 wz--n- 32.00M 3 1 0 146.44G 0 ereADB-2w9v-O2P9-58OS-RN9Q-t2pV-8wXpSc
vg1 wz--n- 4.00M 3 3 0 139.71G 9.95G LczKdV-Nq82-lNrr-EmI1-cerd-numb-1qV6m4
Usage:
In some case need recover some pv device, use the --uuid and --restorefile arguments of the pvcreate command to restore the physical volume. The following command restores the physical volume label with the backuped metadata.
# pvcreate --uuid "0YnHNn-1COx-dohx-bwPf-aLyl-pO8F-f5PI5R" --restorefile /etc/lvm/archive/vg0_00000-1324010847.vg /dev/sda2
Physical volume "/dev/sda2" successfully created
Note: lvm2 uuid will be changed after re-create.
How to Check Device UUID or File System UUID. (Doc ID 1505398.1)的更多相关文章
- com.android.ddmlib.SyncException: Read-only file system
通过eclipse运行Android 程序到测试机时候 控制台出现如下错误: [2014-02-13 15:06:03 - MPlay] Failed to install MPlay.apk on ...
- 云服务器 linux文件系统异常an error occurren during the file system check导致服务器启动失败
云服务器 linux文件系统异常an error occurren during the file system check导致服务器启动失败 文件系统宕机,重启后报错,无法启动 处理流程: 1.编辑 ...
- fail to start File System Check
fail to start File System Check 方法A: 输入root的密码 cd /etc 1 vim /etc/fstab 将所有分区最后的数字 1和2 全都改为0 reboot ...
- Linux系统启动错误 contains a file system with errors, check forced解决方法
/dev/sda1 contains a file system with errors, check forced./dev/sda1: Inodes that were part of a cor ...
- 电脑每次开机都出现check file system on:C 的解决办法
电脑每次开机都出现check file system on:C 的解决办法... ----------------------------------------- ----------------- ...
- linux系统启动报错:[contains a file system with errors, check forced]的解决方法参考
1.解决参考一Press enter for maintenance(or type Control-D to continue):/dev/sda3 contains a file system w ...
- redhat系统服务器重启后提示An error occurred during the file system check.
问题描述 浪潮一台NF8480M3外观红灯报警,鉴于无法登陆带外,只能对服务器进行断电重启操作 问题现象 重启后进入开机过程并报错,报错如下内容及图片如下所示,正常来说进入此界面后直接输入root密码 ...
- linux系统重启后提示An error occurred during the file system check.
一.问题描述 生产环境中一台浪潮NF8480M3外观红灯报警,鉴于无法登陆带外管理口,只能对服务器进行断电重启操作 二.问题现象 重启后进入开机过程并报错,正常来说进入此界面后直接输入root密码即可 ...
- 如何解决虚拟机克隆导致"Bringing up interface eth0: Error: No suitable device found: no device found for connection 'System eth0'."
在VMware的虚拟机中克隆CentOS,在重启网卡的时候报错: Bringing up interface eth0: Error: No suitable device found: no de ...
随机推荐
- 使用 Redis 进行阅读数统计并定时持久化
之前,统计每篇博文的阅读数的方式是经过筛选去重之后直接更新数据库,并发压力直接传导到数据库,假设1秒有1000个并发请求,传统方案会在1秒内并发进行1000次数据库更新操作. 为了降低数据库的并发压力 ...
- 数据安全管理:RSA加密算法,签名验签流程详解
本文源码:GitHub·点这里 || GitEE·点这里 一.RSA算法简介 1.加密解密 RSA加密是一种非对称加密,在公开密钥加密和电子商业中RSA被广泛使用.可以在不直接传递密钥的情况下,完成加 ...
- 搭建自己的企业级镜像仓库-Harbor
网上资料很多,在这记录一下思路 1 安装Docker 2 安装Docker Compose apt-get install docker-compose3 下载最新版Harbor在线安装包,例如 ha ...
- SQL server 安装成功到使用Sa SQL server验证登录等一系列问题
使用 Windows 身份验证方式登录 出现错误 无法连接到 本地服务器 解决问题: SQL server配置管理器:服务远程过程调用失败 https://blog.csdn.net/gfjjggg/ ...
- resource和autowired
spring不但支持自己定义的@Autowired注解,还支持几个由JSR-250规范定义的注解,它们分别是@Resource.@PostConstruct以及@PreDestroy. @Resour ...
- 测试工程师如何使用 CODING 进行测试管理
CODING 为您的企业提供从概念到软件开发再到产品发布的全流程全周期软件研发管理,为您的研发团队提供全程助力,帮助研发团队捋清需求.不断迭代.快速反馈并能实时追踪项目进度直到完成.同时 CODING ...
- ORA-27090: Unable to reserve kernel resources for asynchronous disk I/O
2019-08-19T09:27:33.225584+08:00Slave encountered ORA-27090 exception during crash recoveryRecovery ...
- APScheduler学习
说明 APScheduler是一个 Python 定时任务框架,使用起来十分方便.提供了基于日期.固定时间间隔以及 crontab 类型的任务,并且可以持久化任务.并以 daemon 方式运行应用. ...
- MySQL数据库文件的移动和权限设置
新型数据库层出不穷,MySQL一幅日薄西山的样子.其实还有很多人或者偏爱.或者使用以前遗留的系统,仍然生活在MySQL的世界. 我也是有很久不用了,这个很久超过十年. 不过前几天有个朋友让我帮忙为他们 ...
- Docker 运行应用程序
一.docker run 镜像 执行的命令 docker run组合来运行一个容器:镜像文件不存在的话,会自动拉取(下载): 下图执行的命令的具体意思:docker 以ubuntu:15.10镜像创建 ...