# Use of External Memory

### 1. Function Overview

This product provides the following functions using external memory.

- SD card boot (firmware, config)

  - The system can be started using a firmware file and config file from an SD card.

- Applying SD card booting automatically (firmware, config)

  - The firmware and config file used for SD card booting can be applied the next time the product is booted, even if the SD card is unavailable.

- Firmware Update

  - This unit’s firmware can be updated by loading a firmware file from an SD card.

- Saving and copying a config file

  - The running-config that is currently running on the system can be saved to an SD card, and config files can be copied from the SD card to the unit’s flash ROM or from the unit’s flash ROM to the SD card.

- Saving a log file

  - By executing the save logging command you can back up the log file to an SD card.

- Saving technical support information

  - Technical support information (the result of executing the show tech-support command) can be saved to an SD card.

- Saving statistical information

  - Observations of resource information and traffic information are backed up regularly.

  - This statistical information can be saved as a CSV format file.

- Backing up and restoring system information

  - System information (including configurations) can be backed up to an SD card.

  - Backed up system information can be restored into the unit’s flash ROM.

### 2. Definition of Terms Used

None

### 3. Function Details

#### 3.1. External memory that can be used

Requirements for external memory that can be used are as follows.

- Card type: microSD card / microSDHC card

- File format: FAT16/FAT32

#### 3.2. Folder structure

The SD card must contain the following folder structure.

    Device name   +-- firmware          Firmware file storage folder
                  |
                  |
                  +-- startup-config    Startup config storage folder
                  |
                  |
                  +-- log               SYSLOG storage folder
                  |
                  |
                  +-- techsupport       Technical support information storage folder
                  |
                  |
                  +-- data              System-wide folder
                  |
                  |
                  +-- backup-system     System backup folder

#### 3.3. Mounting and unmounting the SD card

If the SD card is inserted when starting up or after startup, it is automatically mounted and becomes available.

To prevent loss of files, execute the unmount sd command or execute the unmount operation from the Web GUI before removing the SD card.
If the SD card is unmounted, it cannot be used.
If you want to once again use the SD card after executing the unmount sd command, you must execute the following.

- Remove and reinsert the SD card

- Execute the mount sd command

- Execute mount from the Web GUI

#### 3.4. SD card boot (firmware, config)

The system can be started using a firmware file and config file from an SD card.
In order to use SD card boot, the following conditions must be satisfied.

- SD card using a firmware file

  - The SD card is connected when the system starts up.

  - The following files exist in the SD card.

    - /swx2310p/firmware/swx2310p.bin

  - boot prioritize sd enable is set.

- boot prioritize sd enable is set in the factory default setting.

- SD card boot using a config file

  - The SD card is connected when the system starts up.

  - The following files exist in the SD card.

    - /swx2310p/startup-config/config.txt

  - startup-config select sd is set.

- startup-config select sd is set in the factory default setting.

The file used for SD card booting can also be automatically saved to internal flash ROM memory using the automatic SD card booting function (see Automatic SD card booting).

You can use the show environment command to check whether SD card boot was successful.

- In the case of SD card boot using a firmware file, “Startup Firmware” will indicate “exec(SD).”

- In the case of SD card boot using a config file, “Startup Configuration” will indicate “config(SD).”

In the case of SD card boot using a config file, executing the write and copy running-config startup-config commands will update the config file on the SD card.
If SD card boot using a config file fails, startup config #0 is loaded.
Also, the following message is shown in the console and in SYSLOG.

    Loading config0 because can't read config in SD card.

#### 3.5. Applying SD card booting automatically (firmware, config)

The firmware and config used for SD card booting can be automatically saved to internal flash ROM memory.
This function can be used to easily install previously prepared firmware and config files in newly purchased devices (with factory settings).

##### 3.5.1. Preparations before using automatic saving

In order to use this function, the following conditions must be satisfied.

- SD card booting is enabled by either of the following methods. (For details, see SD card booting.)

  - The boot prioritize sd enable command is specified and firmware is installed with an appropriate path for SD cards.

  - startup-config select sd is specified and the config file is installed with an appropriate path.

- The automatic SD card booting function is enabled.

  - The automatic SD card booting function can be enabled using the boot auto-apply enable command.
    (This function is enabled in the factory default settings)

  - The show environment command “boot auto-apply” display results can be used to confirm whether the function is enabled or disabled.

- Prepare a file for automatically applying the automatic SD card booting function.

  - If firmware is applied automatically

    - Prepare an auto-apply.txt file (empty text file) in the firmware folder in the SD card.

          /swx2310p/firmware/auto-apply.txt

  - If a config file is applied automatically

    - Prepare an auto-apply.txt file (empty text file) in the startup-config folder in the SD card.

          /swx2310p/startup-config/auto-apply.txt

##### 3.5.2. Procedure for automatic SD card booting

Use the following procedure to automatically apply SD card booting.

1. Implement preparations. (See Preparations before using automatic saving)

2. Insert the SD card and boot the network switch.

3. When SD card booting is finished, automatically save the specified file in internal flash memory. (Booting by automatic SD card booting takes longer than normal.)

4. Save the results from automatic SD card booting. (See Automatic SD card booting results.)

5. Automatically unmount the SD card.

6. Automatically switch off the microSD LED.

##### 3.5.3. Automatic SD card booting results

Automatic SD card booting results are saved in the SD card.

File name and directory path | Log
--- | ---
/swx2310p/startup-config/auto-apply-result.txt | Serial: Date and time: Result
/swx2310p/firmware/auto-apply-result.txt | Serial: Date and time: Result

##### 3.5.4. Location for saving config file

To change the config location to a user-specified config ID, rename the auto-apply.txt file created, as indicated below.
If no config location is specified, the default config ID of 0 is applied.

File name and directory path | Config ID
--- | ---
/swx2310p/startup-config/auto-apply.txt | 0
/swx2310p/startup-config/auto-apply0.txt | 0
/swx2310p/startup-config/auto-apply1.txt | 1
/swx2310p/startup-config/auto-apply2.txt | 2
/swx2310p/startup-config/auto-apply3.txt | 3
/swx2310p/startup-config/auto-apply4.txt | 4

##### 3.5.5. Points of Caution

Note the following precautions when using this function.

- When the automatic SD card booting is successful, the function is automatically disabled.
  To avoid it being disabled automatically, the character string “keep” must be included at the top of the auto-apply.txt file created, as shown below.

      keep

- This function is disabled if the stack function is enabled.

- If the SD card does not contain an auto-apply.txt file, the function is disabled.

- If the device was not booted from the SD card, the automatic SD card booting function will fail even if an auto-apply.txt file exists.
  Refer to SD card booting to confirm that the file in the SD card and the SD card booting function are enabled.

- If automatic SD card booting fails, only the SD card will be unmounted without automatically disabling the function.

- To prevent malfunction, be sure to delete the auto-apply.txt file if the automatic SD card booting function is not used.

#### 3.6. Firmware Update

This unit’s firmware can be updated by loading a firmware file from an SD card.

In order to use this function, the following conditions apply.

- The following files exist in the SD card.

  - /swx2310p/firmware/swx2310p.bin

If the above file exists on the inserted SD card, executing the firmware-update sd execute command updates the firmware in flash ROM using the firmware in the SD card.

When the firmware-update sd execute command is executed, the user will be asked whether to maintain the mounted state of the SD card when the firmware file has finished loading. Remove the SD card as necessary after it is unmounted.
Note that if the SD card is left inserted during the automatic reboot in conjunction with firmware update, the system will start up with the firmware file on the SD card.

The firmware in member switches of a stack configuration can also be updated by executing the firmware-update sd execute command from the main switch.

#### 3.7. Saving and copying a config file

The running-config that is currently running on the system can be saved to an SD card. (The copy running-config startup-config command and the write command)

You can copy the config file from the SD card to internal flash ROM, or from internal flash ROM to the SD card. (The copy startup-config command)

The contents of startup-config in the SD card can be erased or viewed. (The erase startup-config command and the show startup-config command)

The following folder in the SD card is affected.

- /swx2310p/startup-config

#### 3.8. Saving a log file

By executing the save logging command you can back up the log file to an SD card.

The logging backup sd command enables SYSLOG backup to the SD card.
If SYSLOG backup to the SD card is enabled, executing the save logging command will save the following log file with its save date to the SD card.

- /swx2310p/log/YYYYMMDD_log.txt
  *YYYYMMDD=year month day

The log files in the SD card cannot be viewed or erased.

#### 3.9. Saving technical support information

Technical support information (the result of executing the show tech-support command) can be saved to an SD card.
Executing the copy tech-support sd command will save the following technical support information file with its save date to the SD card.

- /swx2310p/techsupport/YYYYMMDDHHMMSS_techsupport.txt *YYYYMMDD=year month day, HHMMSS=hours minutes seconds

The technical support information files in the SD card cannot be viewed or erased.

If the copy tech-support sd command is executed from the main switch in a stack configuration, a file containing technical support information for member switches is saved.

#### 3.10. Saving statistical information

Observations of resource information and traffic information are backed up regularly.
To enable backup of statistical information to the SD card, you must make settings via the Web GUI in [Administration]–[Maintenance]–[Summary data management].

This statistical information for the observed data can be saved via the Web GUI as a CSV format file.

#### 3.11. Backing up and restoring system information

This unit’s system information can be backed up to an SD card, and the backed up system information can be restored to a desired network switch.
With an SD card connected to this unit, executing the backup system command will create a system information backup in the following folder.

- /swx2310p/backup-system

If the file swx2310p.bin exists in the /swx2310p/firmware/ folder when backup is executed, it is backed up as a firmware file.

To restore the backed up system information, connect the SD card containing the system information backup to the desired network switch, and execute the restore system command.
If the firmware file was backed up, a firmware update is also performed using that file.
When restore is completed, the system will restart.

The system information backup contains the following.

- Settings associated with the unit

  - startup-config #0 - #4 and associated information

  - Setting values for the startup-config select command

  - Setting values for the boot prioritize sd command

- Firmware file

- Only if the specified folder of the SD card contained a firmware file when the backup was executed.

For this reason, when replacing a unit due to malfunction or another reason, the replacement unit can be returned to the same condition as the original unit simply by restoring the backed up system information.
Do not edit or delete the backed up system information.

### 4. List of related commands

Related commands are indicated below.
For details, refer to the Command Reference.

Operations | Operating commands
--- | ---
Mount SD card | mount sd
Unmount SD card | unmount sd
Set SD card backup of log | logging backup sd
Back up log | save logging
Saving technical support information | copy tech-support sd
Save running config | copy running-config startup-config
Save running config | write
Copy startup config | copy startup-config
Erase startup config | erase startup-config
Show startup config | show startup-config
Back up system information | backup system
Restore system information | restore system

### 5. Examples of Command Execution

#### 5.1. Unmount SD card

Unmount the SD card.

    Yamaha>unmount sd

#### 5.2. Mount SD card

Mount the SD card.

    Yamaha>mount sd

#### 5.3. Back up log file

By executing the save logging command you can back up the log file to the SD card as well.

    Yamaha(config)#logging backup sd enable (1)
    Yamaha(config)#exit
    Yamaha#save logging (2)

1 | Enable SD card backup of logs
2 | Back up logs

#### 5.4. Saving technical support information

Save technical support information.

    Yamaha#copy tech-support sd

### 6. Points of Caution

None

### 7. Related Documentation

- Config Management

- SYSLOG

- Firmware Update

- Performance Observations

Search result
No more search results.
There are no topics that match your search query.