ISCSI로 타겟서버로 접근하려고 하는데 에러가 발생했다...
원인은 이미 윈도우에서 누군가 타겟서버로 마운트걸고 있음으로 발생되는 에러이다.
친절하게도 다음과 같이 에러메세지가 발생해준다.
root@ mojily ~ # mount -t ntfs /dev/sda1 /ISCSI_TEST/
$LogFile indicates unclean shutdown (0, 0) Failed to mount '/dev/sda1': 명령이 지원되지 않음 Mount is denied because NTFS is marked to be in use. Choose one action:
Choice 1: If you have Windows then disconnect the external devices by clicking on the 'Safely Remove Hardware' icon in the Windows taskbar then shutdown Windows cleanly.
Choice 2: If you don't have Windows then you can use the 'force' option for your own responsibility. For example type on the command line:
mount -t ntfs-3g /dev/sda1 /ISCSI_TEST/ -o force
Or add the option to the relevant row in the /etc/fstab file:
/dev/sda1 /ISCSI_TEST/ ntfs-3g defaults,force 0 0 |
윈도우에서 마운트 걸고있는걸...제외시키고서 다시 마운트를 걸어주던지 force 옵션을 주고 마운트를 해주면 된다.
# 기존 마운트된 시스템해제후 마운트
root@ mojily ~ # mount -t ntfs /dev/sda1 /ISCSI_TEST/
# force 옵션으로 강제마운트
root@ mojily ~ # mount -t ntfs-3g /dev/sda1 /ISCSI_TEST/ -o force
root@ mojily ~ # df -Th Filesystem Type Size Used Avail Use% Mounted on /dev/hda3 ext3 996M 503M 442M 54% / /dev/hda1 ext3 996M 73M 872M 8% /boot tmpfs tmpfs 248M 0 248M 0% /dev/shm /dev/hda9 ext3 19G 16G 2.3G 87% /home /dev/hda8 ext3 996M 34M 911M 4% /tmp /dev/hda7 ext3 3.6G 2.4G 975M 72% /usr /dev/hda5 ext3 6.7G 4.1G 2.3G 65% /usr/local /dev/hda6 ext3 3.8G 2.2G 1.5G 61% /var /dev/sda1 fuseblk 235G 2.5G 233G 2% /ISCSI_TEST |
※ 리눅스에서는 ntfs 파일파티션을 읽기만 가능하며 쓰기는 할수 없으며 ntfs-3g를 이용하면 윈도우 파일포맷인 ntfs 읽기/쓰기 가능하다.
한글깨짐은 locale 옵션을 ko_KR.utf8 로 바꾸어 다시 마운트하면 해결된다.