Juniper OS upgrade 사전 테스트
- 사전 Config
set system root-authentication encrypted-password "$6$dClM4ieF$DT/bhVyfl6yjRoNOeHORkGLYH2CR77QfZ3KXWtsG/jzS.nvY3.8lHn/bOiZXDBfyHXrkAU9Dd8simXJrsUCet1"
set system login user snet uid 2001
set system login user snet class super-user
set system login user snet authentication encrypted-password "$6$sHNGYNXZ$IltWhWLceNzthHyMWaANLKoxu5JBoJij9csEq3HHoClIZZdCGHWfMTiq/eciZoUdrU8YCV6h1YNFo5sX/IjH0."
set system services ssh
set system services telnet
set system syslog file messages any notice
set interfaces ge-0/0/46 unit 0 family ethernet-switching vlan members 1 // ssh 접속 PC 연결 포트
set interfaces irb unit 1 family inet address 10.1.1.1/24 // ssh 접속 IP
set vlans default vlan-id 1
set vlans default l3-interface irb.1
- 초기 상태(show version)
{master:0}[edit]
snet# run show version
fpc0:
--------------------------------------------------------------------------
Model: ex3400-48t
Junos: 21.4R2.10
JUNOS OS Kernel 32-bit [20220228.82e60e3_builder_stable_12_214]
JUNOS OS libs [20220228.82e60e3_builder_stable_12_214]
JUNOS OS runtime [20220228.82e60e3_builder_stable_12_214]
JUNOS OS time zone information [20220228.82e60e3_builder_stable_12_214]
JUNOS py extensions [20220520.015932_builder_junos_214_r2]
JUNOS py base [20220520.015932_builder_junos_214_r2]
JUNOS OS crypto [20220228.82e60e3_builder_stable_12_214]
JUNOS OS boot-ve files [20220228.82e60e3_builder_stable_12_214]
JUNOS network stack and utilities [20220520.015932_builder_junos_214_r2]
JUNOS libs [20220520.015932_builder_junos_214_r2]
JUNOS runtime [20220520.015932_builder_junos_214_r2]
JUNOS na telemetry [21.4R2.10]
JUNOS Web Management Platform Package [20220520.015932_builder_junos_214_r2]
JUNOS ex runtime [20220520.015932_builder_junos_214_r2]
JUNOS Routing aggregated [20220520.015932_builder_junos_214_r2]
JUNOS probe utility [20220520.015932_builder_junos_214_r2]
JUNOS ex platform support [20220520.015932_builder_junos_214_r2]
JUNOS Openconfig [21.4R2.10]
JUNOS dcp network modules [20220520.015932_builder_junos_214_r2]
JUNOS modules [20220520.015932_builder_junos_214_r2]
JUNOS ex modules [20220520.015932_builder_junos_214_r2]
JUNOS ex libs [20220520.015932_builder_junos_214_r2]
JUNOS ex Data Plane Crypto Support [20220520.015932_builder_junos_214_r2]
JUNOS daemons [20220520.015932_builder_junos_214_r2]
JUNOS SDN Software Suite [20220520.015932_builder_junos_214_r2]
JUNOS Extension Toolkit [20220520.015932_builder_junos_214_r2]
JUNOS Phone-home [20220520.015932_builder_junos_214_r2]
JUNOS Packet Forwarding Engine Support (EX34XX) [20220520.015932_builder_junos_214_r2]
JUNOS jdocs ex [20220520.015932_builder_junos_214_r2]
JUNOS jail runtime [20220228.82e60e3_builder_stable_12_214]
JUNOS FIPS mode utilities [20220520.015932_builder_junos_214_r2]
JUNOS dsa dsa [21.4R2.10]
- OS파일 옮긴 후 용량 상태 (파일 위치 /tmp/os) → os 디렉토리는 임시 생성 폴더
{master:0}
snet> show system storage
fpc0:
--------------------------------------------------------------------------
Filesystem Size Used Avail Capacity Mounted on
/dev/gpt/junos 1.3G 866M 391M 69% /.mount
tmpfs 685M 330M 355M 48% /.mount/tmp
tmpfs 324M 464K 323M 0% /.mount/mfs
{master:0}
snet> start shell
% ls /tmp/os
junos-arm-32-21.4R3-S6.5.tgz
- OS 업그레이드 실행
// 콘솔케이블 제거 후 ssh접속하여 진행
{master:0}[edit]
snet# run request system software add /tmp/os/junos-arm-32-21.4R3-S6.5.tgz no-validate force reboot
Removing /packages/sets/previous
Removing /var/log/wtmp.1.gz
Removing /var/log/wtmp.0.gz
Removing /var/log/chassisd.0.gz
Removing /var/log/cscript.log.0.gz
Removing /var/log/jdhcplog.1.gz
Removing /var/log/jdhcplog.0.gz
Removing /var/log/messages.gz
Removing /var/log/messages.0.gz
Removing /packages/sets/snap.20240328.142737
--- 중 략 ---
shutdown: [pid 20456]
*** FINAL System shutdown message from root@ ***
System going down IMMEDIATELY
Shutdown NOW!
Shutdown NOW!
System shutdown time has arrived\\x07\\x07
- OS 업그레이드 후 결과
{master:0}
snet> show version
fpc0:
--------------------------------------------------------------------------
Model: ex3400-48t
Junos: 21.4R3-S6.5
JUNOS OS Kernel 32-bit [20231222.0e1e878_builder_stable_12_214]
JUNOS OS libs [20231222.0e1e878_builder_stable_12_214]
JUNOS OS runtime [20231222.0e1e878_builder_stable_12_214]
JUNOS OS time zone information [20231222.0e1e878_builder_stable_12_214]
JUNOS py extensions [20240223.202022_builder_junos_214_r3_s6]
JUNOS py base [20240223.202022_builder_junos_214_r3_s6]
JUNOS OS crypto [20231222.0e1e878_builder_stable_12_214]
JUNOS OS boot-ve files [20231222.0e1e878_builder_stable_12_214]
JUNOS network stack and utilities [20240223.202022_builder_junos_214_r3_s6]
JUNOS libs [20240223.202022_builder_junos_214_r3_s6]
JUNOS runtime [20240223.202022_builder_junos_214_r3_s6]
JUNOS na telemetry [21.4R3-S6.5]
JUNOS Web Management Platform Package [20240223.202022_builder_junos_214_r3_s6]
JUNOS ex runtime [20240223.202022_builder_junos_214_r3_s6]
JUNOS Routing aggregated [20240223.202022_builder_junos_214_r3_s6]
JUNOS probe utility [20240223.202022_builder_junos_214_r3_s6]
JUNOS ex platform support [20240223.202022_builder_junos_214_r3_s6]
JUNOS Openconfig [21.4R3-S6.5]
JUNOS dcp network modules [20240223.202022_builder_junos_214_r3_s6]
JUNOS modules [20240223.202022_builder_junos_214_r3_s6]
JUNOS ex modules [20240223.202022_builder_junos_214_r3_s6]
JUNOS ex libs [20240223.202022_builder_junos_214_r3_s6]
JUNOS ex Data Plane Crypto Support [20240223.202022_builder_junos_214_r3_s6]
JUNOS daemons [20240223.202022_builder_junos_214_r3_s6]
JUNOS SDN Software Suite [20240223.202022_builder_junos_214_r3_s6]
JUNOS Extension Toolkit [20240223.202022_builder_junos_214_r3_s6]
JUNOS Phone-home [20240223.202022_builder_junos_214_r3_s6]
JUNOS Packet Forwarding Engine Support (EX34XX) [20240223.202022_builder_junos_214_r3_s6]
JUNOS jdocs ex [20240223.202022_builder_junos_214_r3_s6]
JUNOS jail runtime [20231222.0e1e878_builder_stable_12_214]
JUNOS FIPS mode utilities [20240223.202022_builder_junos_214_r3_s6]
JUNOS dsa dsa [21.4R3-S6.5]
{master:0}
snet> show system storage
fpc0:
--------------------------------------------------------------------------
Filesystem Size Used Avail Capacity Mounted on
/dev/gpt/junos 1.3G 815M 441M 65% /.mount
tmpfs 623M 152K 623M 0% /.mount/tmp
tmpfs 324M 440K 323M 0% /.mount/mfs
- OS 업그레이드(재부팅) 후 /tmp/os 디렉토리 및 OS파일 상태
{master:0}
snet> start shell user root
Password:
root@:RE:0% ls /tmp/os
ls: /tmp/os: No such file or directory
// tmp폴더는 임시폴더로 /tmp 디렉토리는 시스템 재부팅 시 즉시 제거
- 추가 테스트 → OS파일 /var/tmp/os에 옮긴 후 재진행
root@:RE:0% ls /var/tmp/os
junos-arm-32-21.4R3-S6.5.tgz
{master:0}
snet> show system storage
fpc0:
--------------------------------------------------------------------------
Filesystem Size Used Avail Capacity Mounted on
/dev/gpt/junos 1.3G 1.1G 111M 91% /.mount
tmpfs 373M 152K 373M 0% /.mount/tmp
tmpfs 324M 452K 323M 0% /.mount/mfs
// 결과
{master:0}
snet> show system storage
fpc0:
--------------------------------------------------------------------------
Filesystem Size Used Avail Capacity Mounted on
/dev/gpt/junos 1.3G 462M 794M 37% /.mount
tmpfs 616M 152K 616M 0% /.mount/tmp
tmpfs 324M 448K 323M 0% /.mount/mfs
snet> file list /var/tmp/os
/var/tmp/os:
/// os 압축파일은 업그레이드 후 삭제됨 확인
- 결과
-
작업 step
- usb 마운트
mount -t msdosfs /dev/da1s1 /mnt // da1s1은 usb연결 로그 확인하여 올라오는 usb명으로 수정 필요 // 마운트를 굳이 mnt에 하지 않아도 됨- 마운트 된 /mnt 내 OS파일 장비 내부 저장소로 복사
// 1. 옮길 폴더 생성 mkdir /tmp/os // 2. 파일 복사 cp /mnt/junos~~~.tar /tmp/os/junos~~~.tar- usb umount
umount -f /dev/da1s1 of umount -f /mnt // da1s1은 마운트 됐던 usb명으로 맞춰야함- OS업그레이드
request system software add /tmp/os 파일명 force no-validate reboot -
참고사항
- /tmp폴더에 폴더 생성 후 OS파일 옮겨 OS업그레이드 시 완료후에 생성한 폴더까지 삭제됨 → tmp는 임시폴더라 재부팅 후 내용 삭제됨
- /var/tmp에 폴더 생성 후 OS파일 옮겨 OS업그레이드 진행 시 폴더는 남아있으나 OS파일은 압축해제 후 삭제됨 → 임시 생성한 폴더 삭제 필요
-
No comments to display
No comments to display