Use multiple filesystem types ( Like / ext3 and /var & home xfs)?

General support questions including new installations

Use multiple filesystem types ( Like / ext3 and /var & home xfs)?

Postby whitewolf573 » 2010/11/30 18:14:56

I am going to install CentOS 5 on my pc , for3d modeling , and i have some doubts about partitioning the system.

I know that i can have /, /var , /tmp , /home and other directories as individual partitions. I know that i can use ext3 , or xfs ( i know that anaconda doesn't let to use xfs, but i know a way of migrate partitions to xfs after installing) or ext4 , and others , without problems.

But i could for example, once installed all with ext3 , have for example / on ext3 , and /var and /home on xfs.


For me it would be very interesting have /home in a another partition and as xfs (migrating it later from ext3) as mostly i will save in /home a lot of big files ,images,dvd isos,renders , binary maya files and like, and i see a advantage of use xfs with /home.

But a lot of people also use xfs for / as well , but as / has a lot of small files , perhaps use xfs on /var and some other directories, could be good (because xfs performance deleting files or other features), and leave / as ext3 for example.

So is it possible to have different filesystem type for some directories under / ,(for example /var and /home as xfs, the rest as ext3 in / ) , without having any problem ?

(not counting using xfs for a directory that won't see improved his performance because has a lot of static small files or like)
whitewolf573
 
Posts: 14
Joined: 2009/12/22 16:25:35

Re: Use multiple filesystem types ( Like / ext3 and /var & home xfs)?

Postby AlanBartlett » 2010/11/30 18:36:02

So is it possible to have different filesystem type for some directories under / ,(for example /var and /home as xfs, the rest as ext3 in / ) , without having any problem ?

One word answer: Yes -- with the proviso that you know exactly what you will be doing. ;-)

I would say that as long as you keep the boot partition as ext2 and the root partition as ext3, then you can transfer any appropriate subdirectory from the root partition to a partition of its own -- using any supported fs type.
User avatar
AlanBartlett
Forum Moderator
 
Posts: 9223
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk

Re: Use multiple filesystem types ( Like / ext3 and /var & home xfs)?

Postby whitewolf573 » 2010/12/01 22:49:05

Thanks :-)

and the root partition as ext3


Is necessary to have / as ext3, i ask this because , i am investigating about the possibility of migrate / to xfs also later if it gives me any advantage. I think that it won't and i will stay with ext3 for / and xfs for /home, but i haven't it decided yet.

As i have said in the previous post, i am going to install Centos 5 in a pc that it will use for 3D modelling.

As 3D modelling apps use large files normally (textures, binary files , render output etc ...) , i think perhaps , have / as xfs could benefit those apps when running them.

The data will be in /home but as the apps would be installed in / and perhaps as they manage large files , having also / as xfs could be good.

PS: I know that in CentOS 5 , anaconda doesn't let to format a partition in xfs, but once installed, installing first a new kernel supporting xfs , and installing xfsprogs, i can use a live-cd and with rsync backup / and /home to another disk , format partitions to xfs and then restore backup.

Code: Select all
Steps to migrate to xfs

Install CentOS, with ext3

Install xfsprogs, xfsdump and a centosplus kernel, to be able to boot with xfs later.
(I don't know what kernel was , but i know was necessary a centosplus one for boot with xfs)

Run the live cd

    * Create some directories in /mnt (live cd)

cd /mnt

mkdir oldroot newroot oldhome newhome

    * mount / and /home in mnt (original ones)

mount -t ext3 /dev/sdb1 /mnt/oldroot
mount -t ext3 /dev/sdb2 /mnt/oldhome

    * Mount the new formated partitions in xfs for / and /home
    * (supposing you have your centos install in another disk )
    * If not rsync all first to another hard drive

mount -t xfs /dev/sda2 /mnt/newroot
mount -t xfs /dev/sda3 /mnt/newhome

    * Use Rsync to copy data

(cd /mnt/oldroot/ ; find . -xdev -print0 | rsync -avHx . /mnt/newroot/)
(cd /mnt/oldhome/ ; find . -xdev -print0 | rsync -avHx . /mnt/newhome/)

    * compare directories using diff (to be sure all has been copied correctly)

diff -qr /mnt/oldroot/ /mnt/newroot/ > diffroot.log
diff -qr /mnt/oldhome/ /mnt/newhome/ > diffhome.log

cat diffroot.log
cat diffhome.log

    * Edit Fstab, Menu.lst

gedit /mnt/newroot/etc/fstab
gedit /mnt/newroot/boot/grub/menu.lst

    * Chroot

mount --rbind /dev /mnt/newroot/dev
mount --rbind /proc /mnt/newroot/proc

chroot /mnt/newroot/

Do this: (without centos doesn't boot)

mkinitrd -v -f image kernel

Based in http://www.tolaris.com/2008/10/01/movin ... n-to-raid/ , starting from step 3 , adapting it a bit.

Not counting the migrating effort, could i have any problem having / as xfs ? (if i finally decide to do so)
whitewolf573
 
Posts: 14
Joined: 2009/12/22 16:25:35

Re: Use multiple filesystem types ( Like / ext3 and /var & home xfs)?

Postby AlanBartlett » 2010/12/01 23:19:05

I have no experience of migrating the root partition from ext3 to xfs but if you really wish to do so, the technique you have outlined is certainly viable.

As to whether you will gain any benefit by having the OS, as well as the data, on xfs partitions I really do not know. I appreciate your argument for doing so but I am not that convinced. Perhaps others will comment? :-?

This project could even be a candidate for a sequence of benchmark tests: (1) OS & data on ext3 (2) OS on ext3 & data on xfs (3) OS & data on xfs.

With regards to xfs support and the CentOS Plus kernel, our toracat will be able to comment.

[ot]
(And for completeness, I've just checked with the [http://elrepo.org]ELRepo Project[/url] and find that there is no kmod package for xfs support. I've no idea why not -- possibly something historic. And, no doubt, toracat will be able to tell my why.)
[/ot]
User avatar
AlanBartlett
Forum Moderator
 
Posts: 9223
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk

Re: Use multiple filesystem types ( Like / ext3 and /var & home xfs)?

Postby jlehtone » 2010/12/02 07:43:20

Ahem, I seem to get the 'xfs.ko' from packages 'kernel-2.6.18-194.*.el5'. I still do remember an era
when this was not so and a CentOS Plus kernel was required. And somewhere in the middle, the
'Extras' had a kmod-xfs (for kernel-2.6.18-92.*.el5), and Extras has the 'xfsprogs' too.

But I still do not believe in the need for '/' to be special. You can have /var and /tmp on separate
filesystems. Do these 3D modeling applications install into the /usr? Special apps tend to
lack "proper" rpm-packaging, and when they do, they are better off under some other mount-point.

IME, I would not use XFS without UPS.
User avatar
jlehtone
 
Posts: 1485
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Use multiple filesystem types ( Like / ext3 and /var & home xfs)?

Postby whitewolf573 » 2010/12/02 15:21:23

As to whether you will gain any benefit by having the OS, as well as the data, on xfs partitions I really do not know. I appreciate your argument for doing so but I am not that convinced. Perhaps others will comment?


Someone in other forum have said me that it wouldn't worth to convert / to xfs:
You won't get much benefit from having / as xfs, and there are a few minor concerns with it.

First of all, depending on your application, you might be better off creating a separate and dedicated partition for holding the data (as opposed to using /home). Something like /opt, or /opt/data.

I definitely wouldn't bother with any kind of wipe and restore to get / as xfs. You're just not going to get any return on that work. Having a filesystem formatted as xfs is only going to be of benefit when working with files on that filesystem.

[font=Verdana]The performance of your application, once it's up and running, is going to be completely independent of what filesystem it was loaded from. In short, leave / alone, or you're wasting your time.[/font]

Additionally, in the even of any disk/partition issues, there are a lot more tools and much better support for ext3 than xfs. In a bad scenario like that, you don't want to be jumping through any more hoops than absolutely necessary to get a box back up and running.

Also, understand that for an average workload, you're only going to see a performance difference of a few percent. There are definitely some (very specific) workloads that will show a significantly bigger performance change, but most won't.



So i think, it is better to have / as ext3, and /home as xfs. And perhaps create a new partition for hold data in xfs.


With regards to xfs support and the CentOS Plus kernel, our toracat will be able to comment.


I have been also reading some information about xfs (well , i have been doing this a few days), and i discovered that for having enabled write barriers in xfs , with lvm2 , you need to have a kernel 2.6.29 or higher.Also it seems that without barriers enabled (that is default in kernels prior to 2.6.29 with lvm) , if there is a power off , the risk of lost data is higher than if barriers are enabled (barriers , i think, assure that data in cache is wrote previously to write anything more , or something like , the case is that are recommended for a improved reliability)

However , with barriers disabled , there is a rising of performance , at cost of some data reliability.

But i am going to buy a UPS with linux support for be able to shutdown linux it if power goes off.


Do these 3D modeling applications install into the /usr? Special apps tend to
lack "proper" rpm-packaging, and when they do, they are better off under some other mount-point.


I have been reading some pdfs from autodesk Maya 2011 , that is the app i want to install , and i have found that is is installed by default in /usr/autodesk/maya2011-x64. It is a rpm package.
whitewolf573
 
Posts: 14
Joined: 2009/12/22 16:25:35

Use multiple filesystem types ( Like / ext3 and /var & home

Postby toracat » 2010/12/02 17:00:19

Assuming your OS is x86_64, yes, xfs is now in the distro kernel. So no need for the centosplus kernel. You still need to get utility software (xfsprogs etc) from the extras repo. In CentOS-6, they will be included in the distro.

I would also agree that keeping / (or OS-related directories) as ext3/ext4 and have a separate filesystem (like /data) and make it xfs.
User avatar
toracat
Forum Moderator
 
Posts: 7025
Joined: 2006/09/03 16:37:24
Location: California, US


Return to CentOS 5 - General Support

Who is online

Users browsing this forum: No registered users and 2 guests