메뉴 닫기

mkfs를 통한 포맷이 안 되는 경우

1. mkfs를 통한 파일시스템 생성시 아래와 같은 메세지와 함께 파일시스템 작성이 불가능할 경우가 있습니다.

[root@keyclass1 ~]# 
[root@keyclass1 ~]# 
[root@keyclass1 ~]# mkfs.ext3 /dev/sdb2
mke2fs 1.39 (29-Oct-2015)
/dev/sdb2 is apparently in use by the system; will not make a filesystem here!

2. dmsetup라는 명령어를 통하여 현재 시스템에서 사용중인 Disk Device에 대한 상태정보를 확인 후

    시스템에서 실제 사용중이지 않은 Garbage정보를 Clear 한 후 파일 시스템 작성이 가능합니다.

[root@keyclass1 ~]# 
[root@keyclass1 ~]# dmsetup status
VG_XenStorage–050248de–7d7c–28e7–dcde–0ea15f4b3816-MGT: 0 8192 linear 
VolGroup00-LogVol01: 0 2097152 linear 
VolGroup00-LogVol00: 0 18612224 linear 
[root@keyclass1 ~]# dmsetup remove_all
[root@keyclass1 ~]# dmsetup status
VolGroup00-LogVol01: 0 2097152 linear 
VolGroup00-LogVol00: 0 18612224 linear 
[root@keyclass1 ~]# mkfs.ext3 /dev/sdb2
mke2fs 1.42 (29-Oct-2015)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
5242880 inodes, 10484412 blocks
524220 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
350 block groups
32770 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
32768, 98304, 163840, 236376, 237912, 819200, 884736, 1605632, 2654208, 
4096000, 7962624

Writing inode tables: done 
Creating journal (32256 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

3.  원인은 multipath나 LVM에 매핑되어 있던 정보가 깨끗하게 clear 되어지지 않아 발생하는  것으로 유추됩니다.

     위와 같이 dmsetup 명령으로 clear 시키면 다시 파일시스템 생성이 가능합니다.

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 항목은 *(으)로 표시합니다