简介
本文档介绍如何修复SD卡不是ext4格式化时Docker守护程序无法在IE3400上启动的问题。
问题
IE3400使用SD卡存储与IOx应用相关的存储。如果SD卡未采用ext4格式,则会导致问题。
以下是症状:
当您尝试通过IOx GUI部署应用时,会看到以下消息:
Application Deployment Failed: Invalid Archive file: Unable to extract docker rootfs /flash11/iox/tmpArchiverPznor to /flash11/iox/tmpExtractYXZJbE/rootfs Error:global name 'app_mount_dir' is not defined
从日志/控制台,当您启用IOx或重新启动后IOx启动时,会看到这些消息。
ie3400#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ie3400(config)#iox
Warning: Do not remove SD flash card when IOx is enabled or errors on SD device could occur.
*Feb 21 12:45:27.045: %UICFGEXP-6-SERVER_NOTIFIED_START: R0/0: psd: Server iox has been notified to start
*Feb 21 12:45:30.737: %PMAN-3-PROCFAIL: R0/0: root: The process dockerd has failed (rc 1)
*Feb 21 12:45:32.184: %PMAN-3-PROCHOLDDOWN: R0/0: root: The process dockerd has been helddown (rc 1)
*Feb 21 12:46:57.983: %IM-6-IOX_ENABLEMENT: R0/0: ioxman: IOX is ready.
解决方案
此问题与SD卡的文件系统有关。如果卡的格式不是ext4,例如FAT/vFAT,则似乎会出现问题。
要检查SD卡上的当前文件系统,可以使用:
ie3400#sh sdflash: file
Filesystem: sdflash
Filesystem Path: /flash11
Filesystem Type: vfat
Mounted: Read/Write
如输出所示,此SD卡的格式为FAT/vFAT。
要解决此问题,请首先停止/禁用IOx。
ie3400#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ie3400(config)#no iox
Notify IOx to stop. To safely remove SD card, please wait until IOx is stopped.
*Feb 21 12:48:01.615: %UICFGEXP-6-SERVER_NOTIFIED_STOP: R0/0: psd: Server iox has been notified to stop
使用show iox命令确保完全停止。
ie3400#sh iox
IOx Infrastructure Summary:
---------------------------
IOx service (CAF) : Not Running
IOx service (HA) : Not Supported
IOx service (IOxman) : Not Running
IOx service (Sec storage) : Not Supported
Libvirtd 1.3.4 : Running
Dockerd : Not Running
接下来,正确格式化卡以用于IOx,您可以使用此命令。
请记住,这会清除SD卡上的所有数据。
ie3400#format sdflash: ext4
Format operation may take a while. Continue? [confirm]
Format operation will destroy all data in "sdflash:". Continue? [confirm]
format completed with no errors
Format of sdflash: complete
完成后,再次启动/启用IOx。
ie3400#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ie3400(config)#iox
Warning: Do not remove SD flash card when IOx is enabled or errors on SD device could occur.
*Feb 21 12:49:18.310: %UICFGEXP-6-SERVER_NOTIFIED_START: R0/0: psd: Server iox has been notified to start
*Feb 21 12:49:48.165: %IM-6-IOX_ENABLEMENT: R0/0: ioxman: IOX is ready.
如您所见,不再显示有关dockerd的错误消息,并使用此命令show iox检查状态。
ie3400#sh iox
IOx Infrastructure Summary:
---------------------------
IOx service (CAF) 1.10.0.1 : Running
IOx service (HA) : Not Supported
IOx service (IOxman) : Running
IOx service (Sec storage) : Not Supported
Libvirtd 1.3.4 : Running
Dockerd 18.03.0 : Running