USB Automount

USB automount

USB automount is a file system feature that mounts a supported USB device automatically so that you can access the device as the disk2: file system.

USB automount behavior

USB automount behavior depends on the device and the virtual machine where the USB device is used.

Table 1. USB automount behavior by device

Device

Behavior

Cisco NCS 1002

When you insert a USB device, the device is automatically mounted in sysadmin-vm with read and write permissions and remains unmounted in Cisco IOS XR by default. Automatic mounting in sysadmin-vm is supported only when the USB file system is FAT or FAT32.

Cisco NCS 1001

The USB device is automatically mounted in both sysadmin-vm and Cisco IOS XR.

Mount the USB device in sysadmin-vm

Mount the USB device to restore file access from sysadmin-vm before you read from or write to the device.

The USB device is usually mounted automatically. Use this procedure only when you must mount the device again after an unmount operation.

Procedure


Mount the USB device in sysadmin-vm.

Use the usb device operation mount command.

Example:


sysadmin-vm:0_RP0#usb device operation mount
Fri Jul 13 09:26:00.821 UTC success usb mounted

The USB device is mounted in sysadmin-vm.


You can access the USB device as the disk2: file system.

Mount the USB device in Cisco IOS XR

Mount the USB device to restore file access from Cisco IOS XR before you read from or write to the device.

Use this procedure only when you must mount the USB device again after an unmount operation.

Procedure


Mount the USB device in Cisco IOS XR.

Use the unmount disk2: undo command.

Example:


RP/0/RP0/CPU0:ios#unmount disk2: undo
Fri Jul 13 14:56:34.326 IST
disk2: mounted successfully.

The USB device is mounted in Cisco IOS XR.


You can access the USB device as the disk2: file system.

Copy files to the USB device

Copy files to the USB device when you must save logs, archives, or other files outside the device storage.

Before you begin

Mount the USB device before you copy files to it.

Procedure


Step 1

Copy the file to the USB device.

Use the scp command and set the destination to /disk2\:.

Example:

[sysadmin-vm:0_RP0:~/showtech]$scp showtech-envmon-admin-2018-Jul-04.171400.IST.tgz /disk2\:

Step 2

Change to the USB device directory.

Use the cd /disk2\: command.

Example:

[sysadmin-vm:0_RP0:~/showtech]$cd /disk2\:

Step 3

List the directory contents.

Use the ls -lrt command.

Example:

[sysadmin-vm:0_RP0:/disk2:]$ls -lrt
total 122424
drwxr-xr-x 2 root root      8192 Jul 12  2017 System Volume Information
drwxr-xr-x 2 root root      8192 Jun 11 16:16 boot
drwxr-xr-x 3 root root      8192 Jun 11 16:17 EFI
-rwxr-xr-x 1 root root 125306880 Jul 10 13:50 calvVarLog.tar
-rwxr-xr-x 1 root root     23023 Jul 13 05:23 showtech-envmon-admin-2018-Jul-04.171400.IST.tgz

The copied file appears in the USB device directory.


Unmount the USB device from sysadmin-vm

Unmount the USB device from sysadmin-vm to complete file system operations before you remove the device.

Procedure


Unmount the USB device from sysadmin-vm.

Use the usb device operation unmount command.

Example:


sysadmin-vm:0_RP0#usb device operation unmount
Fri Jul 13 09:25:24.531 UTC success usb unmounted

The USB device is unmounted from sysadmin-vm.


Unmount the USB device from Cisco IOS XR

Unmount the USB device from Cisco IOS XR to complete file system operations before you remove the device.

Procedure


Unmount the USB device from Cisco IOS XR.

Use the unmount disk2: command.

Example:


RP/0/RP0/CPU0:ios#unmount disk2:
Fri Jul 13 14:56:46.393 IST
disk2: unmounted successfully.

The USB device is unmounted from Cisco IOS XR.