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

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

Este artículo se aplica a Este artículo no se aplica a Este artículo no está vinculado a ningún producto específico. No se identifican todas las versiones del producto en este artículo.

Instrucciones

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/

Productos afectados

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 ...
Propiedades del artículo
Número del artículo: 000213916
Tipo de artículo: How To
Última modificación: 25 may. 2023
Versión:  3
Encuentre respuestas a sus preguntas de otros usuarios de Dell
Servicios de soporte
Compruebe si el dispositivo está cubierto por los servicios de soporte.