시스코 장비에도 휴지통이 있다!
혹시 이런 경험 없으신가요?
ios를 교체 하려고, 기존 ios를 지웠는데도,
지운 ios크기 만큼 용량이 늘어나지 않는 상황!
해결 방법은 3가지가 있습니다.
erase란 명령어로 지우거나,
해당 영역을 format 하거나,
squeeze 란 명령어로 해당 영역을 정리를 하는 것 입니다.
저는 squeeze란 명령어를 몰라서, erase로 지웠는데,
erase란 명령어가 안 먹히는 장비도 있더군요.
format을 하면 해결 되지만, 설마 비싼 장비를 이 모양으로 만들지는
않았겠지....하고 찾아보니까, squeeze란 명령어를 사용하면 해결 되는
간단한 문제 였습니다.
----------------------------------------------------------
TEST#dir
Directory of bootflash:/
1 -rwx 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
2 -rwx 9181508 Jun 9 2010 00:01:02 +00:00 cat4000-i9s-mz.121-20.EW2.bin
61341696 bytes total (40032052 bytes free)
TEST#show bootf
TEST#show bootflash:
-#- ED ----type---- --crc--- -seek-- nlen -length- ---------date/time--------- name
1 .. image FC388696 C10F08 33 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
2 .. image DFF03116 14D28CC 29 9181508 Jun 9 2010 00:01:02 +00:00 cat4000-i9s-mz.121-20.EW2.bin
40032052 bytes available (21309644 bytes used)
TEST#era
TEST#erase ? <-------------------------------erase 로 bootflash 영역의 파일을 지울 수가 없습니다.
/all Erase all files(in NVRAM)
cat4000_flash: Filesystem to be erased
nvram: Filesystem to be erased
startup-config Erase contents of configuration memory
TEST#del
TEST#delete bootf
TEST#delete bootflash:?
bootflash:cat4000-i9s-mz.121-20.EW2.bin
bootflash:cat4500-ipbase-mz.122-31.SGA8.bin
TEST#delete bootflash:cat4000-i9s-mz.121-20.EW2.bin <------------------------------- 일단 delete 로 지웁니다.
Delete filename [cat4000-i9s-mz.121-20.EW2.bin]?
Delete bootflash:cat4000-i9s-mz.121-20.EW2.bin? [confirm]
TEST#dir <--------------------- 현재 내가 있는 폴더 내에 파일을 보여줍니다. 지운 파일이 보이지 않는군요. 하지만,
Directory of bootflash:/
1 -rwx 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
61341696 bytes total (40032052 bytes free) <------- 지운 파일 9M 만큼 파일용량이 늘어나지 않고, 그냥 그대로 입니다.
TEST#show bootf
TEST#show bootflash: <------------------------------- show 명령어로 보면 지운 줄 알았던 파일이 보입니다.
-#- ED ----type---- --crc--- -seek-- nlen -length- ---------date/time--------- name
1 .. image FC388696 C10F08 33 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
2 .D image DFF03116 14D28CC 29 9181508 Jun 9 2010 00:01:02 +00:00 cat4000-i9s-mz.121-20.EW2.bin <-------하지만 D 라는 이니셜이 새겨져 있습니다.(간단히 쓰레기 통에 들어간 상태라고 보시면 됩니다.)
40032052 bytes available (21309644 bytes used)
TEST#unde
TEST#unde?
undebug undelete
TEST#undel
TEST#undelete ?
<1-1024> File index number
TEST#undelete 2 ?
bootflash: Filesystem name
slot0: Filesystem name
TEST#undelete 2 bootf
TEST#undelete 2 bootflash: ? <-------------------- 쓰레기 통에 들어 간 파일을 복구 해 보겠습니다.
<cr>
TEST#undelete 2 bootflash:
TEST#dir
Directory of bootflash:/
1 -rwx 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
2 -rwx 9181508 Jun 9 2010 00:01:02 +00:00 cat4000-i9s-mz.121-20.EW2.bin <---------------와우 복구!!
61341696 bytes total (40032052 bytes free)
TEST#show bootf
TEST#show bootflash:
-#- ED ----type---- --crc--- -seek-- nlen -length- ---------date/time--------- name
1 .. image FC388696 C10F08 33 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
2 .. image DFF03116 14D28CC 29 9181508 Jun 9 2010 00:01:02 +00:00 cat4000-i9s-mz.121-20.EW2.bin <-------- D 라는 이니셜이 사라졌습니다.
40032052 bytes available (21309644 bytes used)
TEST#del
TEST#delete bootf
TEST#delete bootflash:cat4000-i9s-mz.121-20.EW2.bin <--------다시 delete 로 삭제 합니다.
Delete filename [cat4000-i9s-mz.121-20.EW2.bin]?
Delete bootflash:cat4000-i9s-mz.121-20.EW2.bin? [confirm]
TEST#dir
Directory of bootflash:/
1 -rwx 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
61341696 bytes total (40032052 bytes free) <----------------------------당연히 아직 그대로 입니다.
TEST#show bootf
TEST#show bootflash:
-#- ED ----type---- --crc--- -seek-- nlen -length- ---------date/time--------- name
1 .. image FC388696 C10F08 33 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
2 .D image DFF03116 14D28CC 29 9181508 Jun 9 2010 00:01:02 +00:00 cat4000-i9s-mz.121-20.EW2.bin
40032052 bytes available (21309644 bytes used)
TEST#sque
TEST#squeeze ?
/nolog Squeeze without squeeze logs
/quiet Squeeze without progress update
bootflash: Filesystem to be squeezed
slot0: Filesystem to be squeezed
TEST#squeeze bootf
TEST#squeeze bootflash: ?
<cr>
TEST#squeeze bootflash: <------------------- squeeze 라는 명령어로 해당 영역을 정리 합니다.
All deleted files will be removed. Continue? [confirm]
Squeeze operation may take a while. Continue? [confirm]
Squeeze of bootflash complete
TEST#dir
Directory of bootflash:/
1 -rwx 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
61341696 bytes total (49213688 bytes free) <----------------- 용량이 지운 파일 크기 만큼 늘어났습니다.
TEST#show bootf <-----------------show 명령어를 통해서 봐도 깔끔하게 사라졌습니다.(한마디로 휴지통 비우기를 실행 한 거죠!)
-#- ED ----type---- --crc--- -seek-- nlen -length- ---------date/time--------- name
1 .. image FC388696 C10F08 33 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
49213688 bytes available (12128008 bytes used)
TEST#undele
TEST#undelete ?
<1-1024> File index number
TEST#undelete 2 ?
bootflash: Filesystem name
slot0: Filesystem name
TEST#undelete 2 bootf
TEST#undelete 2 bootflash: ?
<cr>
TEST#undelete 2 bootflash: <-----------------심심해서 다시 한 번 복구 시도 해 보았습니다.
%Error undelete bootflash (File not found) <-----------------파일 없다네요~
TEST#dir
Directory of bootflash:/
1 -rwx 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
61341696 bytes total (49213688 bytes free)
TEST#show bootf
TEST#show bootflash:
-#- ED ----type---- --crc--- -seek-- nlen -length- ---------date/time--------- name
1 .. image FC388696 C10F08 33 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
49213688 bytes available (12128008 bytes used)
TEST#undel
TEST#undelete 1 bootf
TEST#undelete 1 bootflash: ?
<cr>
TEST#undelete 1 bootflash: <-----------------심심해서 멀쩡한 파일 복구 시도 해 보았습니다.
%Error undelete bootflash (Invalid file ID) <----------------- 역시 안 되네요.^^
TEST#dir
Directory of bootflash:/
1 -rwx 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
61341696 bytes total (49213688 bytes free)
TEST#show bootf
TEST#show bootflash:
-#- ED ----type---- --crc--- -seek-- nlen -length- ---------date/time--------- name
1 .. image FC388696 C10F08 33 12127880 Apr 14 2010 19:51:33 +00:00 cat4500-ipbase-mz.122-31.SGA8.bin
49213688 bytes available (12128008 bytes used)
-----------------------------------------------------------------------------------------------------------
알고 보면 별거 아닌데, 포멧까지 해 보면서 알아 본 생활의 발견 이었습니다.^^
예전에 쓴 글인데 이 곳에 다시 작성 했습니다.
즐거운 하루 되세요!!
'Network' 카테고리의 다른 글
[cisco asa5505 TEST] (0) | 2021.12.01 |
---|---|
[SNMP_OID 값이 무엇인가?] (0) | 2021.11.26 |
[CF 카드와 6509 부팅 이미지에 관한 Test] (0) | 2021.11.20 |
[Static routing Last Theorem] (0) | 2021.11.15 |
[스태틱 라우팅 좀 더 이해하기] (0) | 2021.11.14 |