Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

resize2fs: Bad magic number in super-block while trying to open /dev/.../root

아래의 글에서 설명한 방법을,

Hyper-V에 설치한 리눅스 VM의 VHD 크기 늘리는 방법
; https://www.sysnet.pe.kr/2/0/1742

CentOS 7에서 적용하는데 resize2fs 단계에서 다음과 같은 식의 오류가 발생합니다.

# vgextend centos /dev/sda5
Volume group "centos" successfully extended

# lvresize -l +100%FREE /dev/centos/root
Size of logical volume centos/root changed from <30.50 GiB (7807 extents) to 51.49 GiB (13182 extents).
Logical volume centos/root successfully resized.

# resize2fs /dev/centos/root
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/centos/root
Couldn't find valid filesystem superblock.

실제로 df -h를 통해 확인해 봐도 용량이 늘지 않았는데요, 이에 대해 검색해 보면,

OS/CentOS 파티션 SIZE 늘리기
; https://pooh0928.tistory.com/63

centos7의 경우 파일 시스템이 (ext4가 아니라) xfs라서 그렇다고 합니다.

# df -Th
Filesystem              Type      Size  Used Avail Use% Mounted on
devtmpfs                devtmpfs  2.0G     0  2.0G   0% /dev
tmpfs                   tmpfs     2.0G     0  2.0G   0% /dev/shm
tmpfs                   tmpfs     2.0G  8.6M  2.0G   1% /run
tmpfs                   tmpfs     2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/mapper/centos-root xfs        52G  5.9G   46G  12% /
/dev/sda1               xfs      1014M  207M  808M  21% /boot
tmpfs                   tmpfs     393M     0  393M   0% /run/user/1000

따라서 xfs_growfs를 이용해 늘리면 된다는!

# xfs_growfs /dev/centos/root
meta-data=/dev/mapper/centos-root isize=512    agcount=4, agsize=1998592 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=7994368, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=3903, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 7994368 to 13498368




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 12/10/2019]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 91  92  93  94  95  96  97  98  99  100  101  102  [103]  104  105  ...
NoWriterDateCnt.TitleFile(s)
11065정성태10/15/201622269Windows: 121. 윈도우 운영체제의 시간 함수 (2) - Sleep 함수의 동작 방식 [1]
11064정성태10/14/201614444.NET Framework: 610. C# - WaitOnAddress Win32 API 사용파일 다운로드1
11063정성태10/14/201630062Windows: 120. 윈도우 운영체제의 시간 함수 (1) - GetTickCount와 timeGetTime의 차이점 [5]파일 다운로드1
11062정성태10/12/201612315오류 유형: 361. WCF .svc 호출 시 Could not find a base address that matches scheme net.tcp 예외
11061정성태10/12/201623088오류 유형: 360. IIS - 500.19 오류 (0x80070021)
11060정성태10/12/201616151오류 유형: 359. WCF - .svc 요청시 404 Not Found
11059정성태10/11/201619577.NET Framework: 609. WPF - 다중 스레드 환경에서 데이터 바인딩의 INotifyPropertyChanged.PropertyChanged에 대한 배려 [1]파일 다운로드1
11058정성태10/8/201615093개발 환경 구성: 303. Windows 10 Bash Shell - 한글 환경을 영문으로 바꾸고 싶다면?
11057정성태10/8/201611911오류 유형: 358. Windows 10 bash shell - sudo: unable to resolve host ...
11056정성태10/8/201613530개발 환경 구성: 302. Windows 10 bash shell 시작 시 [...] packages can be updated.
11055정성태10/8/201614612.NET Framework: 608. double 값을 구할 때는 반드시 피연산자를 double로 형변환! [6]
11054정성태10/5/201617407개발 환경 구성: 301. "Let's Encrypt" SSL 인증서를 Azure Cloud Services(classic)에 업데이트하는 방법
11053정성태10/5/201613379.NET Framework: 607. C# try/catch/finally의 IL 코드 표현
11052정성태9/27/201626953개발 환경 구성: 300. C# DLL에서 Win32 C/C++처럼 dllexport 함수를 제공하는 방법 [7]파일 다운로드1
11051정성태9/25/201614934개발 환경 구성: 299. docker - c:\programdata\docker\windowsfilter 폴더 정리하는 방법파일 다운로드1
11050정성태9/24/201616878VC++: 101. 반올림하지 않고 double 변수 값 출력하는 방법 [3]
11049정성태9/24/201613876오류 유형: 357. 윈도우 백업 시 오류 - 0x81000037
11048정성태9/24/201614919VC++: 100. 전역 변수 유형별 실행 파일 크기 차이점
11047정성태9/21/201618436기타: 61. algospot.com - 양자화(Quantization) 문제 [2]파일 다운로드1
11046정성태9/15/201620015개발 환경 구성: 298. Windows 10 - bash 실행 시 시작 디렉터리 자동 변경
11045정성태9/15/201613220Windows: 119. Windows 10 - bash 명령어 창을 실행했는데 바로 닫히는 경우
11044정성태9/15/201613440VS.NET IDE: 112. Visual Studio 확장 - 편집 화면 내에서 링크를 누르면 외부 웹 브라우저에서 열기
11043정성태9/15/201615436.NET Framework: 606. .NET 스레드 콜 스택 덤프 (7) - ClrMD(Microsoft.Diagnostics.Runtime)를 이용한 방법 [1]파일 다운로드1
11042정성태9/14/201613676오류 유형: 356. Unknown custom metadata item kind: 6
11041정성태9/10/201612646.NET Framework: 605. CLR4 보안 - yield 구문 내에서 SecurityCritical 메서드 사용 불가 - 2번째 이야기
11040정성태9/10/201618995.NET Framework: 604. C# Windows Forms - Drag & Drop 예제 코드 [2]파일 다운로드1
... 91  92  93  94  95  96  97  98  99  100  101  102  [103]  104  105  ...