CentOS에서 NTFS 파일 시스템을 마운트하려면 어떻게 하나요?
💡 요약 정리
- CentOS 5.x에서 NTFS 파일 시스템을 사용하려면 EPEL 저장소를 설치해야 합니다.
fuse,fuse-ntfs-3g,ntfsprogs패키지를 설치하여 마운트를 지원합니다.- 마운트를 위해 디스크 파티션 식별 후
mount -t ntfs-3g명령어를 실행합니다. - 정확한 패키지명과 명령어를 순서대로 입력해야 에러 없이 마운트됩니다.
1. 설치 환경
- CentOS 5.x (64bit)
2. NTFS 패키지 설치
NTFS 관련 패키지를 설치해야 합니다. 기본 yum 저장소에는 없으므로 EPEL 저장소를 추가합니다.
2-1. EPEL 저장소 설정
아래 링크에서 본인의 CentOS 버전에 맞는 epel-release 패키지를 다운로드합니다.
- 테스트 서버는 CentOS 5.x 버전이므로, 아래 링크에서 'epel-release-5-4.noarch' 파일을 다운로드 합니다.
EPEL이란? Extra Packages for Enterprise Linux의 약자로, 기본 저장소에 없는 다양한 RPM 패키지를 제공하는 저장소입니다.
2-2. EPEL 저장소 설치
다운로드 받은 epel-release-5-4.noarch.rpm 파일을 서버에 업로드한 후 다음 명령어로 설치합니다.
[root@cafe24 src]# rpm -Uvh epel-release-5-4.noarch.rpm
warning: epel-release-5-4.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
[root@cafe24 src]#
2-3. NTFS 관련 패키지 설치
다음 명령어를 통해 NTFS 패키지를 설치합니다.
[root@cafe24 ~]# yum install fuse fuse-ntfs-3g dkms ntfsprogs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.tt.co.kr
* epel: ftp.neowiz.com
* extras: centos.tt.co.kr
* updates: centos.tt.co.kr
Setting up Install Process
Package ntfsprogs is obsoleted by ntfsprogs, trying to install 2:ntfsprogs-2011.4.12-5.el5.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package dkms.noarch 0:2.2.0.3-2.el5 set to be updated
---> Package fuse.x86_64 0:2.7.4-8.el5 set to be updated
---> Package ntfs-3g.i386 2:2011.4.12-5.el5 set to be updated
---> Package ntfs-3g.x86_64 2:2011.4.12-5.el5 set to be updated
---> Package ntfsprogs.x86_64 2:2011.4.12-5.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================
Package Arch Version Repository Size
===========================================================================
Installing:
dkms noarch 2.2.0.3-2.el5 epel 107 k
fuse x86_64 2.7.4-8.el5 base 83 k
ntfs-3g i386 2:2011.4.12-5.el5 epel 319 k
ntfs-3g x86_64 2:2011.4.12-5.el5 epel 301 k
ntfsprogs x86_64 2:2011.4.12-5.el5 epel 289 k
Transaction Summary
===========================================================================
Install 5 Package(s)
Upgrade 0 Package(s)
Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): fuse-2.7.4-8.el5.x86_64.rpm | 83 kB 00:00
(2/5): dkms-2.2.0.3-2.el5.noarch.rpm | 107 kB 00:00
(3/5): ntfsprogs-2011.4.12-5.el5.x86_64.rpm | 289 kB 00:01
(4/5): ntfs-3g-2011.4.12-5.el5.x86_64.rpm | 301 kB 00:00
(5/5): ntfs-3g-2011.4.12-5.el5.i386.rpm | 319 kB 00:00
---------------------------------------------------------------------------
Total 297 kB/s | 1.1 MB 00:03
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ntfs-3g 1/5
Installing : dkms 2/5
Installing : fuse 3/5
Installing : ntfsprogs 4/5
Installing : ntfs-3g 5/5
Installed:
dkms.noarch 0:2.2.0.3-2.el5
fuse.x86_64 0:2.7.4-8.el5
ntfs-3g.i386 2:2011.4.12-5.el5
ntfs-3g.x86_64 2:2011.4.12-5.el5
ntfsprogs.x86_64 2:2011.4.12-5.el5
Complete!
[root@cafe24 ~]#
3. NTFS 파일 시스템 마운트
3-1. 파티션 정보 확인
[root@cafe24 ~]# fdisk -l
Disk /dev/xvda: 100.0 GB, 100002693120 bytes
255 heads, 63 sectors/track, 12157 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 25 200781 83 Linux
/dev/xvda2 26 280 2048287+ 82 Linux swap / Solaris
/dev/xvda3 281 12157 95402002+ 83 Linux
Disk /dev/xvde: 100.0 GB, 100000595968 bytes
255 heads, 63 sectors/track, 12157 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/xvde1 1 12157 97651071 7 HPFS/NTFS
[root@cafe24 ~]#
3-2. 마운트 실행
[root@cafe24 ~]# mount -t ntfs-3g /dev/xvde1 /mnt
[root@cafe24 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda3 89G 4.3G 80G 6% /
/dev/xvda1 190M 21M 160M 12% /boot
tmpfs 1.0G 0 1.0G 0% /dev/shm
/dev/xvde1 94G 91M 94G 1% /mnt
[root@cafe24 ~]#
NTFS 파일은 /mnt 디렉토리에 성공적으로 마운트되었습니다.
추가 정보
- NTFS는 Windows에서 사용되는 파일 시스템입니다. CentOS 기본 환경에서는 NTFS 마운트를 지원하지 않기 때문에, 위의 절차를 따라 추가 패키지를 설치해야 합니다.
- 데이터 손상 방지를 위해 NTFS 마운트 후에는 파일 시스템에 대한 쓰기 테스트를 한 뒤 실제 사용하세요.
- 마운트 해제는
umount /mnt명령어로 가능합니다.