CentOS 에서 FreeBSD UFS 파일시스템 마운트 하기
작성자 : neosky (www.seroot.com, www.nple.com)
작성일 : 2010년 5월 20일
CentOS 에서는 FreeBSD 파티션인 UFS 파일시스템을 마운트하기 위한 모듈이 기본적으로 포함되어 있지 않습니다.
그렇다고 커널 컴파일해서 올릴수도 없고;;
이럴때 다음과 같은 방법으로 간단히 해결할 수 있어 소개합니다.
1. UFS 지원하는 plus 커널 설치하기
먼저, CentOS 다운로드 사이트에서 centosplus 라는 디렉토리가 보일 것입니다.
서버에 맞는 커널을 다운로드 받아 서버에 설치해줍니다.
참고로, 필자가 다운로드 받았던 위치를 올려둡니다. (64bit)
http://mirror.khlug.org/centos/5.5/centosplus/x86_64/RPMS/
파일형식은 kernel-2.6.xx-xxx.xx.x.el.centos.plus.x86_64.rpm 으로 되어 있습니다.
설치는 아래 명령으로 강제 설치해줍니다.
rpm -ivh --force kernel-2.6.18-164.15.1.el.centos.plus.x86_64.rpm
grub.conf 를 열어보면 위에서 설치한 커널 이미지가 0번으로 설정되어 있는 것을 볼 수 있습니다.
# vi /boot/grub/grub.conf
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-164.15.1.el5.centos.plus)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.15.1.el5.centos.plus ro root=LABEL=/
initrd /initrd-2.6.18-164.15.1.el5.centos.plus.img
title CentOS (2.6.18-194.3.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.3.1.el5 ro root=LABEL=/
initrd /initrd-2.6.18-194.3.1.el5.img
title CentOS (2.6.18-164.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=LABEL=/
initrd /initrd-2.6.18-164.el5.img
2. centosplus 커널로 부팅하기
위와 같이 설정되었다면 리부팅을 하고, centosplus 커널로 올라왔는지 확인합니다.
# uname -a
Linux apiserver 2.6.18-164.15.1.el5.centos.plus #1 SMP Wed Mar 17 19:54:20 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
Linux apiserver 2.6.18-164.15.1.el5.centos.plus #1 SMP Wed Mar 17 19:54:20 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
3. FreeBSD UFS 파일 시스템 마운트하기
mount -r -t ufs -o ufstype=ufs2 /dev/sdb1 /data
<옵션설명>
-r : read only
-t ufs : 파일시스템 타입은 ufs
-o : option
ufstype : 44bsd, ufs2
/dev/sdb1 : 마운트할 FreeBSD 파티션
/data : 마운트 위치
4. 마운트 확인하기
정상적으로 마운트되어 있는지 아래 명령으로 확인해봅니다.
# mount -l
...
/dev/sdb1 on /data type ufs (ro,ufstype=ufs2)
# df -Th
...
/dev/sdb1 ufs 496M 109M 348M 24% /data
...
/dev/sdb1 on /data type ufs (ro,ufstype=ufs2)
# df -Th
...
/dev/sdb1 ufs 496M 109M 348M 24% /data
SEROOT.COM에서 작성한 문서입니다.
자유롭게 가져가실 수 있으나, 갈무리하신 후에는 출처를 밝혀주세요.
감사합니다. ^^


당신의 의견을 작성해 주세요.