Ошибка в ESXI 5.5 (Cannot unmount volume ‘Datastore Name:’ because file system is busy. Correct the problem and retry the operation) и неизвестные папки vsantraced и vmkdump
Обновлено 09.10.2014
Обновился я тут недавно с 5.1 на версию esxi 5.5 и появилась необходимость удалить не нужный LUN, но не тут то было. В ответ мне выскочило очень информативное окно с ошибкой: Cannot unmount volume ‘Datastore Name:’ because file system is busy. Correct the problem and retry the operation
![Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-01](/wp-content/uploads/2014/09/Cannot-unmount-volume-Datastore-Name-because-file-system-is-busy.-Correct-the-problem-and-retry-the-operation-01.jpg)
Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-01
Зайдя через встроенный файловый менеджер, который встроен в ESXi 5.5 я заметил, что появились две непонятные папки, vsantraced и vmkdump, которые явно не принадлежат виртуальным машинам.
![Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-02](/wp-content/uploads/2014/09/Cannot-unmount-volume-Datastore-Name-because-file-system-is-busy.-Correct-the-problem-and-retry-the-operation-02.jpg)
Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-02
После того как я погуглил, то выяснилось, что размер дампов в новой версии побольше и если места не хватает на локальном датасторе, то esxi размазывает их по lunам.
В тоге для того, чтобы появилась возможность отмантировать datastore вам нужно, выключить лишние процессы и удалить dump файлы, чем мы и займемся.
Удаляем vsantraced
Как рассказал гугл этот процесс vsantraced принадлежит VSAN, если вы им не пользуетесь, то нужно остановить службу. Включаем SSh на любом сервере ESXI. Конектимся к нему.
Стопаем службу командой:
/etc/init.d/vsantraced stop
![Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-03](/wp-content/uploads/2014/09/Cannot-unmount-volume-Datastore-Name-because-file-system-is-busy.-Correct-the-problem-and-retry-the-operation-03.jpg)
Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-03
После чего убираем автозагрузку службы.
chkconfig vsantraced off
![Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-04](/wp-content/uploads/2014/09/Cannot-unmount-volume-Datastore-Name-because-file-system-is-busy.-Correct-the-problem-and-retry-the-operation-04.jpg)
Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-04
Теперь папка vsantraced легко удалиться.
Если вы все же используете VSAN изменить датастор для хранения можно командой
esxcli vsan trace set -p your_datastore
Удаляем dump.
Теперь нам нужно найти полный путь до дампов вашего datastore. Для этого переходим в volumes.
cd /vmfs/volumes
Как мы видим список всех наших датасторов.
![Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-05](/wp-content/uploads/2014/09/Cannot-unmount-volume-Datastore-Name-because-file-system-is-busy.-Correct-the-problem-and-retry-the-operation-05.jpg)
Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-05
Выбираем нужный и переходим в него командой
Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-05
cd Название вашего датастора
Дальше в папку vmkdump
cd /vmkdump
Смотрим список файлов командой ls. И видим название наших файлов.
![Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-06](/wp-content/uploads/2014/09/Cannot-unmount-volume-Datastore-Name-because-file-system-is-busy.-Correct-the-problem-and-retry-the-operation-06.jpg)
Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-06
Дальше вводим команду.
vmkfstools -D /vmfs/volumes/…path…/xxxx.dumpfile
И из нее нам нужна концовка номера значения owner, это mac адрес сервера esxi который управляет данными логами.
![Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-07](/wp-content/uploads/2014/09/Cannot-unmount-volume-Datastore-Name-because-file-system-is-busy.-Correct-the-problem-and-retry-the-operation-07.jpg)
Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-07
![Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-08](/wp-content/uploads/2014/09/Cannot-unmount-volume-Datastore-Name-because-file-system-is-busy.-Correct-the-problem-and-retry-the-operation-08.jpg)
Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-08
Теперь мы знаем концовку нужного mac, но если у вас как и у меня не один или два хоста поиск его займет время, но есть быстрое решение с помощью PowerCLI. Конектимся к вашему vCenter. Командой:
Connect-VIServer -Server (FQDN вашего сервера)
Если у вас сквозная авторизация и вы имеете права вы сразу подконектитесь в противном случае вылезет форма авторизации.
Дальше вводите команду.
Get-View -ViewType HostSystem -propert name, hardware.systeminfo | select { $_.name, $_.hardware.systeminfo.uuid }
И выводится список всех mac адресов сетевых карточек.
![Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-09](/wp-content/uploads/2014/09/Cannot-unmount-volume-Datastore-Name-because-file-system-is-busy.-Correct-the-problem-and-retry-the-operation-09.jpg)
Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-09
После чего как вы выяснили что за хост, подключаемся к нему по ssh и вводим команду удаления dump.
esxcli system coredump file remove --force
![Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-10](/wp-content/uploads/2014/09/Cannot-unmount-volume-Datastore-Name-because-file-system-is-busy.-Correct-the-problem-and-retry-the-operation-10.jpg)
Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-10
После чего попытавшись снова сделать unmount нужного lun все будет ок.
![Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-11](/wp-content/uploads/2014/09/Cannot-unmount-volume-Datastore-Name-because-file-system-is-busy.-Correct-the-problem-and-retry-the-operation-11.jpg)
Cannot unmount volume Datastore Name because file system is busy. Correct the problem and retry the operation-11
Дальше советую поставить dump collector и перенаправить все логи на него. Но об этом в другой статье.
Добавить комментарий