简体   繁体   English

BLKRASET:设备的不适当的ioctl

[英]BLKRASET: Inappropriate ioctl for device

I'm receiving this error 我收到此错误

BLKRASET: Inappropriate ioctl for device BLKRASET:设备的不适当的ioctl

when trying to run 尝试跑步时

sudo blockdev --setra 256 /data sudo blockdev --setra 256 /数据

on my Linux server. 在我的Linux服务器上。 The server is being used as a MongoDB server and /data is where it stores it's data. 该服务器被用作MongoDB服务器,/ data是其存储数据的位置。

I initially tried to run this command when I received this warning when starting my MongoDB shell: 启动MongoDB Shell时收到以下警告时,我最初尝试运行此命令:

Wed Mar 20 22:40:49.850 [initandlisten] 3月20日,星期三22:40:49.850 [initandlisten]

Wed Mar 20 22:40:49.850 [initandlisten] ** WARNING: Readahead for /data/db is set to 2048KB 周三3月20日22:40:49.850 [initandlisten] **警告:/ data / db的预读设置为2048KB

Wed Mar 20 22:40:49.850 [initandlisten] ** We suggest setting it to 256KB (512 sectors) or less Wed Mar 20 22:40:49.850 [initandlisten] **我们建议将其设置为256KB(512个扇区)或更小

Wed Mar 20 22:40:49.850 [initandlisten] ** http://dochub.mongodb.org/core/readahead 3月20日,星期三22:40:49.850 [initandlisten] ** http://dochub.mongodb.org/core/readahead

The blockdev --setra command is supposed to set the readahead value for that directory and resolve the issue but I'm running into this issue blockdev --setra命令应该为该目录设置预读值并解决问题,但是我遇到了这个问题

The blockdev command operates on block devices (disks), not directories. blockdev命令在块设备(磁盘)上而非目录上运行。 You need to pass it the name of the device in /dev/ where your data directory is stored. 您需要在存储数据目录的/dev/中将设备的名称传递给它。 If you df /data it will tell you which device is currently mounted there. 如果您使用df /data ,它将告诉您当前在那安装了哪个设备。 Then you can run blockdev --setra 512 /dev/whatever 然后您可以运行blockdev --setra 512 /dev/whatever

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM