가상서버 생성 후 device sda1 I/O error 발생 (block bitmap and bg descriptor inconsistent)
- qcow2 file 가상 nbd로 만들기
root@:~# qemu-nbd –connect=/dev/nbd0 /var/lib/libvirt/images/file.qcow2 ( 마스터 서버에서 가상서버 file.qcow2 경로 ) root@:~# fdisk /dev/nbd0 -l Device Boot Start End Sectors Size Id Type |
- 바로 진행 시 아래와 같은 에러 발생
root@:~# e2fsck -vycf /dev/nbd0p1 |
- partx -a /dev/nbd0 명령어로 위와 같은 에러 해결
root@:~# partx -a /dev/nbd0 root@:~# !find |
- 문제가 발생한 qcow2 파일 파일시스템 검사 시작
root@:~# e2fsck -vycf /dev/nbd0p1 Inodes that were part of a corrupted orphan linked list found. Fix? yes Inode 3848 was part of the orphaned inode list. FIXED. Inode 256155, i_blocks is 1275192, should be 1275216. Fix? yes Inode 257572, i_blocks is 178776, should be 178784. Fix? yes Inode 263183, i_blocks is 241728, should be 241744. Fix? yes Inode 2304319, i_blocks is 32, should be 16. Fix? yes Inode 2304326, i_blocks is 32, should be 16. Fix? yes Inode 2304333, i_blocks is 32, should be 16. Fix? yes Inode 2304340, i_blocks is 32, should be 16. Fix? yes Inode 2304347, i_blocks is 32, should be 16. Fix? yes Inode 2304354, i_blocks is 32, should be 16. Fix? yes Inode 2305468, i_blocks is 32, should be 16. Fix? yes Inode 2305475, i_blocks is 32, should be 16. Fix? yes …. |
- 파일 시스템 검사 확인 후 정상적으로 vm 운영 가능
cloudimg-rootfs: ***** FILE SYSTEM WAS MODIFIED ***** 705492 inodes used (22.05%, out of 3200000) 680174 regular files |
- 완료 후 /dev/nbd0 제거
root@:~# partx -d /dev/nbd0 root@:~# qemu-nbd –disconnect /dev/nbd0 root@:~# fdisk -l Device Boot Start End Sectors Size Id Type |