SRX

last person joined: yesterday 

Ask questions and share experiences about the SRX Series, vSRX, and cSRX.
  • 1.  Mount USB on J-series routers and High end SRX

    Posted 10-03-2011 10:51

    Hi Experts

     

    On SRX (Branch) and EX swtiches, I am able to mount the USB using command "mount -t msdosfs /dev/da0s1 /mnt/usb"

    BUT on SRX high end and J-Series I am not able to mount the USB. I found some KB ttp://kb.juniper.net/InfoCenter/index?page=content&id=KB10800. But it is showing that, we have to format and label the USB before mountin on the J-series router using dd command from shell.

     

    1- Why for J-series and high end SRX we need to first format and then we can mount the USB

    2- On EX switch, I can make any directory like usb in /mnt BUT I was trying on SRX240, It gave me below error
    root@SRX210% mkdir /mnt/usb
    mkdir: /mnt/usb: Read-only file system
    root@SRX210%

     

    Thanks



  • 2.  RE: Mount USB on J-series routers and High end SRX

    Posted 10-05-2011 12:37

    Hi

     

    Is there any one?



  • 3.  RE: Mount USB on J-series routers and High end SRX

    Posted 10-05-2011 12:40

    Try creating your mount point under /tmp instead of /mnt.

     

    % mkdir /tmp/usb

     



  • 4.  RE: Mount USB on J-series routers and High end SRX

    Posted 10-09-2011 11:19

    So this means, we cannot make any directory in some of the directores like /mnt. I checked I am able to create usb directory under /tmp.

     

    1- Why is that so? Its not the case with EX switch?

    2- Also Why we need to format usin dd commands if we need to mount to the J-series router according to the kb I mentioned in my previous post?

     

    Thanks



  • 5.  RE: Mount USB on J-series routers and High end SRX
    Best Answer

    Posted 10-09-2011 21:31

    dd is useful for copying images, but it isn't necessary. You can create msdos formated USB and mount it. I did a recent upgrade to 11 using a msdos formated USB. To mount use the UNIX mount command:

     

    mount -t msdos /dev/da1s1 /var/tmp/usb

     

    From there you can access your junos file on your SRX:

     

    request system software add no-validate no-copy /var/tmp/usb/junos-srxsme-11.2R2.4-domestic.tgz reboot

     

    Just verify where the usb device was created in /dev. Take a look first in the /dev directory before you plugin the USB. Note what is currently mounted (df -k). You can verify the plugged in USB device (in this case /dev/da1s1) is installed. Typically you would have just one partition on the USB (slice 1 aka da1s1).

     

    The nice thing about Juniper EX and SRX is they sit on UNIX os. Very cool, IMHO. If you think as a sysadmin, some of these procedures tend to be straightforward. In this case you can note where you can mount by file permissions and whether or not the file system is mounted read only or not.

     

     



  • 6.  RE: Mount USB on J-series routers and High end SRX

    Posted 10-10-2011 10:06

    Hi

     

    Thanks for the reply. Actually my confusion is still in EX, it did not give the read-only file system error when I create the directory any where BUT in SRX/J it gives me error. Is there any command to know which is the read only directory or which is not?

     

    Thanks



  • 7.  RE: Mount USB on J-series routers and High end SRX

    Posted 10-10-2011 11:09

    The unix mount command will let you know if it is RW or RO. Example:

     

    root@% mount
    /dev/da0s2a on / (ufs, local, noatime)
    devfs on /dev (devfs, local)
    /dev/md0 on /junos (cd9660, local, noatime, read-only, verified)
    /cf on /junos/cf (nullfs, local, noatime)
    devfs on /junos/dev/ (devfs, local, noatime, noexec, read-only)
    procfs on /proc (procfs, local, noatime)
    /dev/bo0s3e on /config (ufs, local, noatime)
    /dev/bo0s3f on /cf/var (ufs, local, noatime)
    /dev/md1 on /mfs (ufs, asynchronous, local, noatime)
    /cf/var/jail on /jail/var (nullfs, local, noatime)
    /cf/var/log on /jail/var/log (nullfs, local, noatime)
    devfs on /jail/dev (devfs, local, noatime, noexec, read-only)
    /dev/md2 on /mfs/var/run/utm (ufs, asynchronous, local, noatime)
    /dev/md3 on /jail/mfs (ufs, asynchronous, local, noatime)



  • 8.  RE: Mount USB on J-series routers and High end SRX

    Posted 10-14-2011 15:11

    @aeroplane wrote:

    Thanks for the reply. Actually my confusion is still in EX, it did not give the read-only file system error when I create the directory any where BUT in SRX/J it gives me error. Is there any command to know which is the read only directory or which is not?


    You can use "ls -ld <directory>" to see what the permissions are for the directory.

     

    On the SRX, /mnt is a read-only directory:

     

    root@srx240% ls -ld /mnt
    dr-xr-xr-x  2 root  wheel  2048 May  6 00:15 /mnt

    The permissions are r-xr-xr-x, meaning the owner (root), the group owner (wheel), and everyone else (other) all have read and execute permitions, but not write permissions.

     

    However, on a EX2200 that I have sitting here...

     

    root@:RE:0% ls -ld /mnt
    drwxr-xr-x  2 root  wheel  512 Jul 25 03:04 /mnt

    Here, root also has write access to the /mnt directory.

     

    The EX is running Junos 9.4 (pretty old).  The SRX is running Junos 10.4.  Maybe they changed something in the default permissions between releases, or maybe the EX software image doesn't have the same system permissions as the SRX software image.



  • 9.  RE: Mount USB on J-series routers and High end SRX

    Posted 02-19-2013 03:12

    Hi all together,

     

    I am new here. First of all thank you for this great site with hints and tips.

    Maybe this in the wrong post, but don´t know where to post else. 

    I try to upgrade a j4350 from 21.1R2.5 to 5.5.

    Went through after you desription shown in KB10800

    Everything looks perfect:

    root@% df -h
    Filesystem Size Used Avail Capacity Mounted on
    /dev/ad0s1a 460M 389M 66M 85% /
    devfs 1.0K 1.0K 0B 100% /dev
    /dev/md0 548M 548M 0B 100% /junos
    /cf 460M 389M 66M 85% /junos/cf
    devfs 1.0K 1.0K 0B 100% /junos/dev/
    procfs 4.0K 4.0K 0B 100% /proc
    /dev/bo0s1e 19M 7.0K 19M 0% /config
    /dev/md1 168M 168M -13M 109% /mfs
    /cf/var/jail 460M 389M 66M 85% /jail/var
    /cf/var/log 460M 389M 66M 85% /jail/var/log
    devfs 1.0K 1.0K 0B 100% /jail/dev
    /dev/md2 39M 4.0K 36M 0% /mfs/var/run/utm
    /dev/da0 939M 6.0K 863M 0% /cf/var/tmp/usb

     

    but when I do  a copy I receive this error message:

    root> ...5.131/junos-jsr-12.1R5.5-domestic.tgz /var/tmp/usb
    /var/tmp//...transferring.file.........jN51Rh/ 35% of 198 MB 1156 kBps 01m55s
    /: write failed, filesystem is full
    /var/tmp//...transferring.file.........jN51Rh/ 35% of 198 MB 1128 kBps 01m56s
    fetch-secure: /var/tmp//...transferring.file.........jN51Rh/junos-jsr-12.1R5.5-domestic.tgz: No space left on device
    error: file-fetch failed
    error: could not fetch local copy of file

    No matter what i try it doesn´t use the usb stick a storrage.

    It would be great if you could help me.

    Best regards,

    Michael Fries



  • 10.  RE: Mount USB on J-series routers and High end SRX

    Posted 02-19-2013 09:26

    Hi Michael,

     

    Be careful when you specify your paths...

     

    You have your USB device mounted on /cf/var/tmp/usb -- however you're copying to /var/tmp/usb which can be seen in the error message.

     

    Try your copy command again and make sure you have the full path of /cf/var/tmp/usb.