- Ошибка device or resource busy
- Что означает «device or resource busy»?
- Как исправить device or resource busy?
- Выводы
- Ошибка device or resource busy
- Что означает «device or resource busy»?
- Как исправить device or resource busy?
- Выводы
- /etc/hostname Device or resource busy #9295
- Comments
- ocxo commented Nov 23, 2014
- vbatts commented Nov 24, 2014
- ocxo commented Nov 24, 2014
- eigood commented Nov 25, 2014
- x.x.x.x $app_service.config
- ocxo commented Dec 2, 2014
- epcim commented Jan 16, 2015
- epcim commented Jan 26, 2015
- jessfraz commented Feb 28, 2015
- jdmulloy commented Aug 10, 2015
- hdeadman commented Sep 15, 2015
- lamont-granquist commented Mar 11, 2016
- marzzz21 commented Mar 30, 2016
- lamont-granquist commented Mar 30, 2016
- Device or resource busy (16) #20
- Comments
- ryanpamplin commented Jun 17, 2017
- Device or resource busy android
Ошибка device or resource busy
Часто при работе с флешками, дисками, образами или другими подобными объектами может возникать ошибка device or resource busy. Она может выводится, когда вы пытаетесь отмонтировать внешний диск, раздел, а также при попытке переместить или удалить файл.
В этой небольшой статье мы рассмотрим, почему может возникать данная ошибка, а также пути её устранения. Конечно, в случае с флешкой вы можете просто вынуть её из компьютера, но это не решение, потому что высока вероятность потерять не сохранённые данные. Есть пути обхода этой проблемы.
Что означает «device or resource busy»?
Если переводить дословно с английского, то это сообщение означает, что устройство или ресурс занято. Если объяснять более подробно — файл, который вы пытаетесь удалить или диск, который нужно отмонтировать, ещё используется одной из запущенных программ.
Это могло произойти потому, что программа ещё не завершила свою работу, зависла, возникли какие-либо проблемы в процессе её работы. Это актуально как для файлов, так и для съёмных носителей.
Как исправить device or resource busy?
Самое первое, что можно посоветовать — закрыть программы, которые могут использовать этот файл или один из файлов на съёмном носителе. Например, если сейчас воспроизводится один из видеофайлов, то проигрыватель надо закрыть. И только поле этого пробовать ещё раз выполнять операции.
Если вы не знаете какая программа мешает вам выполнить операцию, то это можно очень просто узнать с помощью команды lsof. Просто выполните её и отсейте только те записи, которые относятся к точке монтирования вашего носителя:
Чтобы отсеять нужные процессы в самой утилите, используйте опцию +D, так даже лучше, потому что она не будет показывать системные службы, а отобразит только программу, которую надо завершить:
Теперь вы можете видеть все процессы, которые используют файлы на нашем носителе, и завершить их с помощью команды kill. В нашем случае надо завершить плеер totem с PID 5616:
Также, чтобы посмотреть, какие процессы используют файл, можно использовать команду fuser:
Здесь вы тоже увидите всю необходимую информацию: будет отображаться пользователь, от имени которого запущен процесс. Точно так же можно его завершить:
Если вы закрыли все программы, но это не помогло, можно попытаться очистить файловый кэш системы с помощью такой команды:
Выводы
В этой небольшой статье мы рассмотрели, как бороться с ошибкой device or resource busy Linux. Как видите, её очень просто исправить, даже если по началу кажется, что совсем непонятно, что можно сделать.
Источник
Ошибка device or resource busy
Часто при работе с флешками, дисками, образами или другими подобными объектами может возникать ошибка device or resource busy. Она может выводится, когда вы пытаетесь отмонтировать внешний диск, раздел, а также при попытке переместить или удалить файл.
В этой небольшой статье мы рассмотрим, почему может возникать данная ошибка, а также пути её устранения. Конечно, в случае с флешкой вы можете просто вынуть её из компьютера, но это не решение, потому что высока вероятность потерять не сохранённые данные. Есть пути обхода этой проблемы.
Что означает «device or resource busy»?
Если переводить дословно с английского, то это сообщение означает, что устройство или ресурс занято. Если объяснять более подробно — файл, который вы пытаетесь удалить или диск, который нужно отмонтировать, ещё используется одной из запущенных программ.
Это могло произойти потому, что программа ещё не завершила свою работу, зависла, возникли какие-либо проблемы в процессе её работы. Это актуально как для файлов, так и для съёмных носителей.
Как исправить device or resource busy?
Самое первое, что можно посоветовать — закрыть программы, которые могут использовать этот файл или один из файлов на съёмном носителе. Например, если сейчас воспроизводится один из видеофайлов, то проигрыватель надо закрыть. И только поле этого пробовать ещё раз выполнять операции.
Если вы не знаете какая программа мешает вам выполнить операцию, то это можно очень просто узнать с помощью команды lsof. Просто выполните её и отсейте только те записи, которые относятся к точке монтирования вашего носителя:
lsof | grep /media/sergiy/83AE-2346
Чтобы отсеять нужные процессы в самой утилите, используйте опцию +D, так даже лучше, потому что она не будет показывать системные службы, а отобразит только программу, которую надо завершить:
lsof +D /media/sergiy/83AE-2346
Теперь вы можете видеть все процессы, которые используют файлы на нашем носителе, и завершить их с помощью команды kill. В нашем случае надо завершить плеер totem с PID 5616:
Также, чтобы посмотреть, какие процессы используют файл, можно использовать команду fuser:
fuser -vm /home/sergiy/83AE-2346
Здесь вы тоже увидите всю необходимую информацию: будет отображаться пользователь, от имени которого запущен процесс. Точно так же можно его завершить:
Если вы закрыли все программы, но это не помогло, можно попытаться очистить файловый кэш системы с помощью такой команды:
sync && echo 2 > /proc/sys/vm/drop_caches
Выводы
В этой небольшой статье мы рассмотрели, как бороться с ошибкой device or resource busy Linux. Как видите, её очень просто исправить, даже если по началу кажется, что совсем непонятно, что можно сделать.
Источник
/etc/hostname Device or resource busy #9295
Comments
ocxo commented Nov 23, 2014
I am using Chef to update /etc/hostname and /etc/hosts which fails with this error:
This was supposedly fixed in 1.2.0. Any ideas what I could be doing wrong or if this is a regression?
I am running on OS X 10.10 via boot2docker on Ubuntu 12.04.
Here are some more environment details:
The text was updated successfully, but these errors were encountered:
vbatts commented Nov 24, 2014
ocxo commented Nov 24, 2014
Sorry about that, will follow up soon as I can.
eigood commented Nov 25, 2014
The issue is that even though you can «write» to those files, you can’t rename them. This is due to both files being bind mounted. I am using ansible to automatically update /etc/hosts with references to either other machines, or to localhost. I then place lines like the following in the file:
x.x.x.x $app_service.config
The method that ansible uses to update a file, is to write it to a temporary location, then do an atomic rename. This is a fairly standard way to update files, while ensuring safety that the new file has been saved to disk.
ocxo commented Dec 2, 2014
@vbatts I’ve updated the issue with more detail about my env.
epcim commented Jan 16, 2015
(the ability to write/modify /etc/hosts, /etc/resolv.conf and possibbly other tools is key for any deployment CI testing on docker on any image and any tooling (chef, ansible, puppet, salt)).
@vbatts — The ability to specify —dns —add-host is fine. But the use case is to run deployment testing within a docker container. So since the deployment tools running test modify filesystem withing the image they must have an option to modify any part of the FS. Even the performance will be affected.
epcim commented Jan 26, 2015
I have found the same issue on Docker 1.3, 1.4. The cause was not in docker. The chef hostfile cokbook was using a file resource (which ootb enables atomic_update: true) and that caused the issue on /etc/hosts file update.
When I logged in the new docker image
sudo docker run -i -t epcim/docker-chefdk:latest /bin/bash I could manually modify /etc/hosts (rw). I could do it also using recipe and chef-apply. However whent I extended a recipe to match 1:1 the failed deployment — so it was also including a diff attribute from file resource then the chef-apply failed with the «Resource Busy» clausule while the atomic_update was true:
However, with false it works:
The solution could be to use chef_client config option on .kitchen.yml:
However I guess, chef_client cookbook do not set this option at the current state: chef-boneyard/chef-client#248
Also I run immediately to another issue while modifing /etc/resolv.conf with template resource:
jessfraz commented Feb 28, 2015
closed see comment about problem not within docker but chef #9295 (comment)
jdmulloy commented Aug 10, 2015
@epcim I found out that the correct place to put the setting in .kitchen.yml is in the provisioner section like so.
You can also put this in the global provisioner section if you wish.
hdeadman commented Sep 15, 2015
For future people that come across this issue, I thought I would leave link to the documentation in Docker that explains why Puppet, Chef, etc can’t update /etc/hosts, /etc/resolv.conf, & /etc/hostname in a container (at least not if they are doing an atomic rename that they would normally do).
That documentation explains how those three files are special overlays managed by Docker as part of its networking support. Essentially your provisioning scripts ought to leave them alone and you can pass command-line arguments to docker to influence their contents. From the docs —
. you should leave the files themselves alone and use the following Docker options instead.
lamont-granquist commented Mar 11, 2016
@jdmulloy Hi, I’m the software developer at chef who actually wrote the file_atomic_update code. You should not be abusing the global setting in that way. The right way to fix this is to update only the specific file resources that need to use it. Your workaround will work right up until it invalidates your testing and you deploy code to production that fails which passed in your preproduction testing. And if you deploy this setting to production and flip every file resource in your production runs to not be atomic you incur a severe risk of incurring data loss, corruption of files and crashing.
I’ll be updating the Chef::Config internal documentation and the chef.docs.io website with big warnings not to tweak that global setting, along with updating the docs.chef.io site with warnings against doing that.
I’ve also released a chef_hostname cookbook which has the right setting and supports docker containers:
marzzz21 commented Mar 30, 2016
@lamont-granquist , so how do we properly rectify this issue?
lamont-granquist commented Mar 30, 2016
set atomic_updates false only on the resource which is updating /etc/hosts or /etc/hostname or whatever in the docker container and /when/ it is running inside a docker container.
you can even re-open file or template resources used by other resources and patch them to apply it in a wrapper recipe:
throw that in a recipe somewhere after template «/etc/hosts» do . end has been created on the resource collection.
for editing /etc/hostname and/or /etc/hosts to set the hostname the chef_hostname resource does that for you, just use it:
if you are using some other cookbook to edit /etc/hosts then that cookbook should get patched, but you can use the previous technique to open up the resource collection and dynamically patch the resource it creates.
Источник
Device or resource busy (16) #20
Comments
ryanpamplin commented Jun 17, 2017
Hello! I’m super grateful for your amazing work! I was planning to try to do this myself until I came across your work. You saved me so much time!
I have 18 Move units and really want to get them working with the RB PI 3 I bought for this project. It’s running the latest Raspbian with all of the required libs.
I’ve scanned for the CSRMESH using «sudo hcitool lescan» and found my MAC is the same as yours and everyone else’s: «LE Scan . 43:C5:5B:04:00:06 CSRmesh»
I reset my Move units and set the pin to 8888, because I used a 5 digit before. I powered off all but 1 unit for testing and to get this working. It’s working in the app, and I shut off the app before trying the following.
When I run «./csrmesh-cli move —dest 43:C5:5B:04:00:06 —pin 8888 —position 0» from pi@raspberrypi:
/Desktop/csrmesh/bin, I get this output:
«Running: gatttool -b 43:C5:5B:04:00:06 —char-write-req -a 0x0021 -n 44a78b0080a06dba678d37d188b5d988f832ff
connect: Device or resource busy (16)
After 100s of tries it said it wrote to the Move successfully once, but it didn’t react physically.
Your help would be greatly, greatly appreciated! Happy to donate to you or a cause of your choice to show you some appreciate beyond my gratitude for your project! Thank you again!
The text was updated successfully, but these errors were encountered:
Источник
Device or resource busy android
Ерунду не городим, не зная. Индекс правильный указан для глобалки:
Англо-китай: MAMCNEA
Глобалка (если это она или когда появится): MAMMIEA
До 8.1.x.x включительно — буквы DI
До 8.2.5.0 включительно — буквы DL (меняется пока только последняя буква)
У 4X единственного пока прошивка 8.2.7.0, это новая ветка разработки. Поэтому меняются уже две последние буквы: D на E (последующую), а L — на A (начальную). До 8.3.x.x опять будет меняться только последняя буква, т.е. для 4X следующая сборка 8.2.x.x будет с индексом MAMCNEB.
Сообщение отредактировал Camerado — 20.03.17, 19:52
Сообщение отредактировал vaalf — 30.08.17, 22:53
Если не работает МТР. При подключении кабеля к компьютеру не видно телефон. Проблему нашел на MUILTIROM
Необходимо прописать в system/build.prop следующие строки:
Взято из темы 4 Prime (за что им спасибо):
Сообщение отредактировал snekt — 14.05.17, 13:51
Сообщение отредактировал max9620 — 07.04.17, 13:17
Xiaomi Miui Hellas 7.1 Santoni V9 XTRV + arΩma
https://androidfilehost.com/?w=files&flid=50341
Находите версию (к примеру, последняя на данный момент 7.12.14) переходите в папку, ищем Santoni, или в первой папке Aroma (если надо с Aroma-инсталлером.
Ενσωμάτωση των Gkalen Tweaks
Kατάργηση του Pre-Root σε όλες τις συσκευές
Αναβάθμιση του SuperSU στην τελευταία V2.82 έκδοση
Νέο MiuiHellas.apk από τον @iAmLiakos
- Kernel supporting init.d
- Build.prop και init.d tweaks και scripts
- Ram optimization scripts
- Battery optimization scripts
- 3way Power menu ( από την προηγούμενη version )
- Gps.conf tweaks
- Sysctl tweaks
- Μερικα Smiui tweaked binaries
- Sqlite optimizer
- Apps zipalign at boot
- Disabled HW acceleration
- Αλλαγή του default θέματος
Сообщение отредактировал djdante — 23.12.17, 16:16
dimonius747,
ag70, особенности:
• Ядро поддерживает init.d
• Build.prop и init.d твики и скрипты
• сценарии оптимизации Ram
• сценарии оптимизации батареи
• 3way питание меню (от предыдущей версии)
• Gps.conf твики
• SYSCTL твики
• Некоторые Smiui отлажены двоичные файлы
• Sqlite оптимизатор
• Apps zipalign при загрузке
• Выключено HW ускорение
• Изменение темы по умолчанию
(Тоже самое есть под спойлером changelog)
Сам пользуюсь, только на другом утройстве.
Внешне ничем не отличается, но много добавили системного. Несколько сторонних приложений, гугл сервисы, Root explore, Dolby Atmos, CM transfer, Flash player.
Сообщение отредактировал djdante — 08.04.17, 16:05
Источник