Заполнен раздел /mnt/data/

Полностью забит раздел /mnt/data/var/log

 # df -h
 Файловая система Размер Использовано  Дост Использовано% Cмонтировано в
 /dev/root          980M         466M  448M           51% /
 devtmpfs           241M            0  241M            0% /dev
 tmpfs              249M            0  249M            0% /dev/shm
 tmpfs              249M          14M  236M            6% /run
 tmpfs              5,0M            0  5,0M            0% /run/lock
 tmpfs              249M            0  249M            0% /sys/fs/cgroup
 /dev/mmcblk0p6     1,3G         1,2G     0          100% /mnt/data
 tmpfs               50M            0   50M            0% /run/user/0

Файл /mnt/data/message.1 занимает 1 Гб!!
Что делать? Почему?

О, что-то в лог интесивно сыпет. Посмотрите, от какого процесса там много сообщений?

Вероятно Modbus Счетчие Legrand
Частота опроса может быть большая?

А у вас отладка на порту включена? Можете показать, что там в большом количестве в логе?

12

Да стояла отладка (
Отключил

Здравствуйте.

Подскажите, что пишет в данный каталог? Очень много памяти на него уходит…
/mnt/data/root/.npm/_cacache

/mnt/data
8,0K /mnt/data/uploads
16K /mnt/data/lost+found
297M /mnt/data/makesimple
756K /mnt/data/etc
541M /mnt/data/root
284M /mnt/data/var
1,1G /mnt/data

/mnt/data/root
14M /mnt/data/root/.cache
165M /mnt/data/root/.node-red
20K /mnt/data/root/.config
363M /mnt/data/root/.npm
12K /mnt/data/root/.local
541M /mnt/data/root

/mnt/data/root/.npm
4,0K /mnt/data/root/.npm/_logs
363M /mnt/data/root/.npm/_cacache
4,0K /mnt/data/root/.npm/_locks
363M /mnt/data/root/.npm

/mnt/data/root/.npm/_cacache
4,0K /mnt/data/root/.npm/_cacache/tmp
21M /mnt/data/root/.npm/_cacache/index-v5
342M /mnt/data/root/.npm/_cacache/content-v2
363M /mnt/data/root/.npm/_cacache

Что-то я не помню npm в дистре. Это что-то новенькое, или Вы сами натянули node.js?

Это тестовый контроллер, год на стенде уже висит, поэтому точно не помню и скорей всего Node-Red устанавливался по этой инструкции Wiren Board 6: Node-RED — Wiren Board

Здравствуйте! Попробуйте выполнить следующую команды и покажите вывод:

 fuser -auv /mnt/data/root/.npm

 fuser -auv /mnt/data/root/.npm/_cacache/content-v2

Здравствуйте.

fuser -auv /mnt/data/root/.npm
ПОЛЬЗ-ЛЬ PID ДОСТУП КОМАНДА
/mnt/data/root/.npm:

fuser -auv /mnt/data/root/.npm/_cacache/content-v2
ПОЛЬЗ-ЛЬ PID ДОСТУП КОМАНДА
/mnt/data/root/.npm/_cacache/content-v2:

Вот здесь пишут так (macos - what is ~/.npm dir for? - Stack Overflow):

~/.npm is a cache that npm uses to avoid re-downloading the same package multiple times. There’s no harm in removing it. You can empty it with the command:

> npm cache clean

То есть эта папка - просто кэш для npm. Думаю, можно просто удалить (переместить) папку для начала. Посмотреть будет ли она снова создаваться и увеличиваться в размере.

1 лайк

Спасибо, помогло.

npm cache clean
    npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data ex        tracted from the cache is guaranteed to be valid. If you want to make sure everyt        hing is consistent, use 'npm cache verify' instead. On the other hand, if you're         debugging an issue with the installer, you can use `npm install --cache /tmp/empt        y-cache` to use a temporary cache instead of nuking the actual one.
    npm ERR!
    npm ERR! If you're sure you want to delete the entire cache, rerun this command w        ith --force.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-06-28T11_17_47_262Z-debug.log


npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.



/dev/mmcblk0p6     1,3G         766M  447M           64% /mnt/data

du -h -d 1 /mnt/data/root
14M     /mnt/data/root/.cache
165M    /mnt/data/root/.node-red
20K     /mnt/data/root/.config
16K     /mnt/data/root/.npm
12K     /mnt/data/root/.local
178M    /mnt/data/root