Dell Networking SONiC Firmware version 3.x, 4.0.0 How to Mount USB and copy file between switch and USB

摘要: This article explains how to mount USB and copy file between switch and USB in Dell Networking SONiC version 3.x, 4.0.0

本文适用于 本文不适用于 本文并非针对某种特定的产品。 本文并非包含所有产品版本。

说明

This article is applicable for the following releases
3.0, 3.1, 3.2 3.3, 3.4, 3.5, 4.0.0
 
For 4.0.1 and above firmware click below link
Dell Networking SONiC How to mount and unmount USB
 


Command Syntax

 
Command  Explanation
admin@sonic:~$ sudo blkid Check the USB device drive location (Mostly it will be /dev/sdb or /dev/sdb1)
admin@sonic:~$ sudo mkdir /mnt/usb Create the USB mount location /mnt/usb.
admin@sonic:~$ sudo mount <USB device drive location> /mnt/usb       Mount the USB drive to the USB mount directory /mnt/usb. 
admin@sonic:~$ sudo umount /mnt/usb Unmount USB
 

Sample Output


In the below example, the USB is located in /dev/sdb. (Output Trimmed for brevity)
admin@sonic:~$ sudo blkid
/dev/sda1: SEC_TYPE="msdos" LABEL_FATBOOT="EFI System" LABEL="EFI System" UUID="XXXXXXXXXXXXXXXXXXXXXX" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="XXXXXXXXXXXXXXXXXXXXXX"
/dev/sda2: LABEL="ONIE-BOOT" UUID="XXXXXXXXXXXXXXXXXXXXXX" TYPE="ext4" PARTLABEL="ONIE-BOOT" PARTUUID="XXXXXXXXXXXXXXXXXXXXXX"
/dev/sda3: LABEL="SONiC-OS" UUID="XXXXXXXXXXXXXXXXXXXXXX" TYPE="ext4" PARTLABEL="SONiC-OS" PARTUUID="XXXXXXXXXXXXXXXXXXXXXX"
/dev/loop0: TYPE="XXXXXXXXXXXXXXXXXXXXXX"
/dev/loop1: UUID="XXXXXXXXXXXXXXXXXXXXXX" TYPE="ext4"
/dev/loop2: UUID="XXXXXXXXXXXXXXXXXXXXXX" TYPE="ext4"
/dev/sdb: LABEL="USB" UUID="XXXXXXXXXXXXXXXXXXXXXX" TYPE="vfat"
/dev/ramdisk: UUID="XXXXXXXXXXXXXXXXXXXXXX" TYPE="ext4

Create /mnt/usb directory and mount the USB in the directory. 
admin@sonic:~$ sudo mkdir /mnt/usb
admin@sonic:~$ sudo mount /dev/sdb /mnt/usb
 
To Unmount usb
admin@sonic:~$ sudo umount /mnt/usb
 

Copy File to and from a USB Drive Inserted in the Switch

Use cp command to copy a file from/to the mounted directory.

For example, in the below output, we are copying the show tech file (sonic_dump_sonic_20230520_013638) in /var/dump to /mnt/usb directory.
 
admin@sonic:~$ sudo cp /var/dump/sonic_dump_N3248TE-Sonic-Leaf42_20230520_013638.tar /mnt/usb/

受影响的产品

Enterprise SONiC Distribution, PowerSwitch E3200-ON Series, 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 ...
文章属性
文章编号: 000213916
文章类型: How To
上次修改时间: 25 5月 2023
版本:  3
从其他戴尔用户那里查找问题的答案
支持服务
检查您的设备是否在支持服务涵盖的范围内。