CentOS use ext3 file system, and it do not support reiserfs. Therefore if you try to mount a drive with reiserfs partition, it give error
1 |
mount: fs type reiserfs not supported by kernel |
It’s possible to see what filesystems are supported by running this command:
1 |
cat /proc/filesystems |
On my fairly default install CentOS 4 machine, the output of the above command was this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
nodev sysfs nodev rootfs nodev bdev nodev proc nodev sockfs nodev binfmt_misc nodev usbfs nodev usbdevfs nodev futexfs nodev tmpfs nodev pipefs nodev eventpollfs nodev devpts ext2 nodev ramfs nodev hugetlbfs iso9660 nodev relayfs nodev mqueue ext3 nodev rpc_pipefs nodev autofs nodev nfs nodev nfs4 |
So clearly reiserfs was not available for mounting a filesyetem. To enable it, you need to edit the /etc/yum.repos.d/CentOS-Base.repo file and then install a special CentOS Plus kernel which includes reiserfs support. Using your favourite text editor (nano in the example below), run the following command to edit the file, running it either as the root user or using sudo:
1 |
nano /etc/yum.repos.d/CentOS-Base.repo |
Look for the [centosplus] section and change the enabled flag from 0 to 1 and add the includepkgs line as shown below:
1 2 3 4 5 |
[centosplus] ... enabled=1 ... includepkgs=kernel* reiserfs-utils |
Then add the following to the [base] and [updates] sections:
1 |
exclude=kernel kernel-devel kernel-smp-* kernel-hugemem* kernel-largesmp* |
Now run
1 |
yum install reiserfs-utils kernel |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
[root@server ~]# yum install reiserfs-utils kernel Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.cisp.com * base: mirror.hmc.edu * centosplus: mirror.web-ster.com * extras: mirrors.tummy.com * updates: mirrors.ecvps.com addons | 951 B 00:00 base | 2.1 kB 00:00 centosplus | 1.9 kB 00:00 centosplus/primary_db | 78 kB 00:00 extras | 2.1 kB 00:00 updates | 1.9 kB 00:00 Excluding Packages from CentOS-5 - Base Finished Reducing CentOS-5 - Plus to included packages only Finished Excluding Packages from CentOS-5 - Updates Finished Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package kernel.i686 0:2.6.18-194.11.1.el5.centos.plus set to be installed ---> Package reiserfs-utils.i386 2:3.6.19-2.4.1 set to be updated --> Finished Dependency Resolution --> Running transaction check ---> Package kernel.i686 0:2.6.18-164.15.1.el5 set to be erased --> Finished Dependency Resolution Dependencies Resolved ========================================================================================== Package Arch Version Repository Size ========================================================================================== Installing: kernel i686 2.6.18-194.11.1.el5.centos.plus centosplus 18 M reiserfs-utils i386 2:3.6.19-2.4.1 centosplus 482 k Removing: kernel i686 2.6.18-164.15.1.el5 installed 41 M Transaction Summary ========================================================================================== Install 2 Package(s) Upgrade 0 Package(s) Remove 1 Package(s) Reinstall 0 Package(s) Downgrade 0 Package(s) Total download size: 19 M Is this ok [y/N]: y Downloading Packages: (1/2): reiserfs-utils-3.6.19-2.4.1.i386.rpm | 482 kB 00:00 (2/2): kernel-2.6.18-194.11.1.el5.centos.plus.i686.rpm | 18 MB 00:16 ------------------------------------------------------------------------------------------ Total 1.1 MB/s | 19 MB 00:17 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : kernel 1/3 Installing : reiserfs-utils 2/3 Cleanup : kernel 3/3 Removed: kernel.i686 0:2.6.18-164.15.1.el5 Installed: kernel.i686 0:2.6.18-194.11.1.el5.centos.plus reiserfs-utils.i386 2:3.6.19-2.4.1 Complete! |
Reboot server using reboot command
1 |
[root@server ~]# reboot |
After rebooting, cat /proc/filesystems will now show this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
nodev sysfs nodev rootfs nodev bdev nodev proc nodev sockfs nodev binfmt_misc nodev usbfs nodev usbdevfs nodev futexfs nodev tmpfs nodev pipefs nodev eventpollfs nodev devpts ext2 nodev ramfs nodev hugetlbfs iso9660 nodev relayfs nodev mqueue ext3 nodev rpc_pipefs nodev autofs nodev nfs nodev nfs4 reiserfs |
Note that reiserfs is now listed at the bottom, and you will be able to now successfully mount the filesystem formatted with reiserfs.
[…] อ้างอิงจาก http://www.myliteraturetechlife.com/mount-reiserfs-partitions-on-centos/ window.fbAsyncInit = function() { FB.init({appId: "113258878730622", status: true, cookie: […]