加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – lsattr:设备的不适当的ioctl在读取标志时

发布时间:2020-12-13 17:59:54 所属栏目:Linux 来源:网络整理
导读:对于我们运行CentOS 6.0的 Linux服务器之一,如果我执行lsattr / home,我会得到类似的东西(以root身份): $lsattr /homelsattr: Inappropriate ioctl for device While reading flags on /home/userlsattr: Inappropriate ioctl for device While reading fla
对于我们运行CentOS 6.0的 Linux服务器之一,如果我执行lsattr / home,我会得到类似的东西(以root身份):
$lsattr /home
lsattr: Inappropriate ioctl for device While reading flags on /home/user
lsattr: Inappropriate ioctl for device While reading flags on /home/user
lsattr: Inappropriate ioctl for device While reading flags on /home/DIR

现在,我尝试用chattr改变一些东西

$chattr -R -i /home
chattr: Inappropriate ioctl for device while reading flags on /home

装载回报:

$mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda3 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)

我不知道如何解决这个问题.有人可以帮忙吗?

解决方法

/ home所在的文件系统必须支持 Extended Attributes.由于/ home很可能位于LogVol00分区上(而不是NFS挂载或其他东西),因此必须使用user_xattr挂载选项挂载文件系统:

mount -o remount,user_xattr /

请注意,对于ext4,user_xattr和acl都是enabled by default.这对于其他文件系统而言会有所不同.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读