将SUSE操作系统升级到SLES 15 SP4后,用户无法访问/dev/raw*设备

在升级前/dev/raw设备状态如下:

[root@shizhanxia.com~ ]# systemctl status raw.service
● raw.service - raw devices
     Loaded: loaded (/usr/lib/systemd/system/raw.service; disabled; vendor preset: disabled)
     Active: active (exited) since Fri 2023-04-21 10:57:06 IST; 2min 18s ago
    Process: 1672 ExecStart=/bin/sh -c /sbin/modprobe raw; /sbin/udevadm settle;   for i in `grep -v ^# /etc/raw`; do rawdev=`echo $i | cut -f>
   Main PID: 1672 (code=exited, status=0/SUCCESS)
Apr 21 10:57:06 shizhanxia.com systemd[1]: Starting raw devices...
Apr 21 10:57:06 shizhanxia.com systemd[1]: Finished raw devices.
[root@shizhanxia.com~ ]# ls -l /dev/raw*
total 0
crw-rw---- 1 root disk 162, 0 Apr 21 10:57 rawctl

升级到SLES15 SP4后,无法访问原始设备:

[root@shizhanxia.com~ ]# systemctl status raw.service
Unit raw.service could not be found.
[root@shizhanxia.com~ ]# ls -l /dev/raw*
ls: cannot access '/dev/raw*': No such file or directory

解决方案

原因是从SLES15 SP4开始,应用程序应该使用带有O_DIRECT标志的打开设备文件,如/dev/sda1。从SLES15 SP4开始,原始实用程序已被弃用以下是SLES15 SP4发行说明中的片段:将SUSE操作系统升级到SLES 15 SP4后,用户无法访问/dev/raw*设备

剩余内容需解锁观看

解锁查看全文

立即回复
已经回复?立即刷新

原创文章,作者:保哥,如若转载,请注明出处:https://www.shizhanxia.com/1411.html

(0)
上一篇 2023年4月25日 10:54
下一篇 2023年4月26日 18:11

相关推荐

发表回复

登录后才能评论