Dell Networking SONiC 如何装载和卸载 USB

Summary: 本文介绍如何在 Dell Networking SONiC 中装载和卸载 USB。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

提醒:要在网络交换机中的 DELL Networking SONiC 上使用 USB,我们必须确保配置 usb enable。默认情况下,usb 处于禁用状态。

本文适用于 Dell SONiC 4.0.1 及更高版本。对于较旧的固件版本,请使用以下链接。
 Dell Networking SONiC 固件版本 3.x、4.0.0 如何在交换机和 USB 之间装载 USB 和拷贝文件


Dell SONiC 在 USB 介质上支持 FAT32、vfat、ext2、ext3 和 ext4 文件系统


命令语法

命令  说明
sonic :~$ sonic-cli 输入 Dell Sonic CLI
sonic# 配置终端 进入配置模式
sonic(config)# usb enable 启用 usb
sonic(config)# no usb 禁用 usb
sonic(config)# exit 退出配置模式
sonic# usb 支架  安装 usb
sonic# usb un-mount  卸载 USB


使用以下命令验证 USB 是否已连接

命令  说明
sonic# show usb 显示 USB 信息
sonic# show usb partitions(sonic# 显示 USB 分区) 显示检测到的 usb 设备分区
sonic# show usb devices(sonic# 显示 USB 设备) 显示检测到的 USB 设备
sonic# dir usb:/  显示 usb 的内容
 

装载 USB 后,我们可以使用 copy 命令在 usb 和交换机之间拷贝文件,这在备份配置、拷贝技术支持文件等方面非常有用。 


输出示例

配置 USB 启用
sonic# 
sonic# configure terminal
sonic(config)# usb enable 
sonic(config)# exit
sonic# 

验证配置
sonic# show running-configuration | grep "usb enable"
usb enable
sonic# 

安装 USB
sonic# usb mount 

检查 USB 是否已装载及其内容
sonic# show usb
Auto Detection: Enabled
--------------------------------------------------------------------
Mount Dir        Device Name      Filesystem      
--------------------------------------------------------------------
/media/usb0      /dev/sdb         vfat

sonic# show usb partitions 
--------------------------------------------------------------------
Device name      Mount Dir        Filesystem      
--------------------------------------------------------------------
/dev/sdb                          vfat 

sonic# show usb devices 
--------------------------------------------------------------------
Device name      Manufacturer     Model Name      
--------------------------------------------------------------------
/dev/sdb         Generic          Flash Disk  

sonic# dir usb:/ 
-------------------------------------------------------------------------
Date(Last Modified)      Size(Bytes)    Type      Filename                        
-------------------------------------------------------------------------
XXXX-XX-XX XX:XX         XXXXX          -         XXX 
XXXX-XX-XX XX:XX         XXXXX          -         XXX        
XXXX-XX-XX XX:XX         XXXXX          -         XXX

卸载 USB
sonic# usb un-mount

Affected Products

Enterprise SONiC Distribution, Dell EMC Networking N3200-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch Z9264F-ON, PowerSwitch Z9332F-ON, PowerSwitch Z9432F-ON
Article Properties
Article Number: 000212218
Article Type: How To
Last Modified: 25 May 2023
Version:  3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.