This article provides a work-around for the error, usb media missing or invalid , when running the request system snapshot command.
usb media missing or invalid
request system snapshot
This issue is applicable to PPC based platforms, e.g. MX5, MX10, MX40, MX80 and MX104.
When there is a need to deploy quickly a customized Junos image on several MX80 or MX104 routers, a USB disk can be used to achieve this purpose. The USB device contains a backup image previously created on the source router using the command ' request system snapshot media usb '.
request system snapshot media usb
Following is a description of the procedure.
Due to a known platform limitation, step 4 will fail to complete properly on the MX80, and the following error message might be reported:
> request system snapshot error: usb media missing or invalid
The procedure fails because the /etc/fstab file has /altroot and /altconfig mountpoints pointing to the USB device.
/etc/fstab
/altroot
/altconfig
% cat /etc/fstab #version 3 # Device Mountpoint FStype Options Dump Pass# /dev/da1s1a / ufs rw 1 1 /dev/da1s1e /config ufs rw 2 2 proc /proc procfs rw 0 0 /dev/da1s1f /var ufs rw,noauto 2 2 /dev/da0s1b none swap sw 0 0 /dev/da1s1b /tmp mfs rw,noauto 0 0 /dev/da1s1b /mfs mfs rw,noauto 0 0 /dev/da2s1a /altroot ufs rw,noauto 2 0 <-- USB device /dev/da2s1e /altconfig ufs rw,noauto 2 0
A workaround to resolve this issue is through editing /etc/fstab and adding the correct mountpoints manually, after step 4 above:
>start shell user root
Then add these two commands:
# sed -i.bak1 's/da2s1a/da0s1a/g' /etc/fstab # sed -i.bak2 's/da2s1e/da0s1e/g' /etc/fstab
After performing the above changes, /etc/fstab will look as follows:
% cat /etc/fstab #version 3 # Device Mountpoint FStype Options Dump Pass# /dev/da1s1a / ufs rw 1 1 /dev/da1s1e /config ufs rw 2 2 proc /proc procfs rw 0 0 /dev/da1s1f /var ufs rw,noauto 2 2 /dev/da0s1b none swap sw 0 0 /dev/da1s1b /tmp mfs rw,noauto 0 0 /dev/da1s1b /mfs mfs rw,noauto 0 0 /dev/da0s1a /altroot ufs rw,noauto 2 0 /dev/da0s1e /altconfig ufs rw,noauto 2 0
Then request system snapshot will be executed properly without errors.
> request system snapshot Doing the initial labeling... Verifying compatibility of destination media partitions... Running newfs (899MB) on internal media / partition (da0s1a)... Running newfs (99MB) on internal media /config partition (da0s1e)... Copying '/dev/da1s1a' to '/dev/da0s1a' .. (this may take a few minutes) Copying '/dev/da1s1e' to '/dev/da0s1e' .. (this may take a few minutes) The following filesystems were archived: / /config