28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

contains the JUNOS software (everything installed by the jinstall or jbundle command),<br />

the router’s SSH keys, and a few other files generated from the configuration.<br />

The hard disk has one filesystem, /var, which is a large partition that contains<br />

system logfiles, diagnostic dump files, archived configuration files, and user home<br />

directories. (Also on the hard disk are the /altroot and /altconfig partitions, which<br />

contain a copy of the JUNOS software and related files and a swap partition.) When<br />

booting from the flash drive, the router uses the software and files on the flash drive.<br />

If the boot fails, it automatically tries the software and files on the hard disk. For the<br />

boot failover process to work, you must have already created a snapshot from a<br />

working version of the software.<br />

There is one additional filesystem on the router, /tmp, which is a RAM disk (a memory<br />

filesystem).<br />

To verify that the snapshot was successful, you might want to list the contents of the<br />

filesystems (with the file list command). However, the /altroot and /altconfig filesystems<br />

are not mounted, so they are not visible even though the underlying directories<br />

are still present:<br />

aviva@router1> show system storage<br />

Filesystem Size Used Avail Capacity Mounted on<br />

/dev/ad0s1a 77M 39M 32M 55% /devfs<br />

16K 16K 0B 100% /dev/<br />

/dev/vn0 13M 13M 0B 100% /packages/mnt/jbase<br />

/dev/vn1 37M 37M 0B 100% /packages/mnt/jkernel-7.4R1.7<br />

/dev/vn2 12M 12M 0B 100% /packages/mnt/jpfe-M40-7.4R1.7<br />

/dev/vn3 2.3M 2.3M 0B 100% /packages/mnt/jdocs-7.4R1.7<br />

/dev/vn4 14M 14M 0B 100% /packages/mnt/jroute-7.4R1.7<br />

/dev/vn5 5.1M 5.1M 0B 100% /packages/mnt/jcrypto-7.4R1.7<br />

/dev/ad0s1e 12M 16K 11M 0% /config<br />

procfs 4.0K 4.0K 0B 100% /proc<br />

/dev/ad1s1f 9.4G 1.2G 7.4G 14% /var<br />

How do you know from the output of this command which partition is where? /dev/<br />

ad0s1a refers to a portion of a disk. It is drive ad0 (the storage device) slice 1 (the first<br />

“slice,” and there’s generally just one slice), partition a (which is the first partition on<br />

a disk and always refers to the root partition). Similarly, /dev/ad1s1f refers to drive<br />

ad1, slice 1, partition f.<br />

On most M- and T-series routers, ad0 is the flash disk. In the case of router1, an M20<br />

router that has an RE-2.0, ad0 is the flash disk and ad1 is the hard disk:<br />

aviva@router1> show chassis hardware detail<br />

Hardware inventory:<br />

Item Version Part number Serial number Description<br />

Chassis 25708 M20<br />

Backplane REV 03 710-002334 BB9738 M20 Backplane<br />

Power Supply A REV 06 740-001465 005234 AC Power Supply<br />

Display REV 04 710-001519 BA4681 M20 FPM Board<br />

Routing Engine 0 REV 06 740-003239 1000224893 RE-2.0<br />

Routing Engine 0<br />

58000007348d9a01 RE-2.0<br />

ad0 91 MB SanDisk SDCFB-96 i3238140903 Compact Flash<br />

44 | Chapter 1: Router Configuration and File Management<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!