Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm just putting together a machine with eight 2TB disks.

I will be using Raid 6 (12TB of usable capacity) on top of them, but I'm not sure whether I should make LVM on top of the RAID, or what filesystem to use.

What filesystems can be resized when used inside LVM?

share|improve this question
3  
To answer your literal question: the same ones that can be resized when not used inside LVM. LVM isn't relevant to this choice unless you're going to use a system that has its functionality built-in (which currently means ZFS; and IIRC ZFS has RAID-6 built-in too). –  Gilles Jun 24 '11 at 22:51
add comment

2 Answers 2

up vote 6 down vote accepted

With lvm on top of a raid device you are flexible to create multiple virtual devices (and filesystems) on it. And you are flexible to change the size of those devices.

If you are 100% sure that you don't need that and you only need one big filesystem, then you can directly create the filesystem on your raid device. One layer of indirection and complexity is removed in that case.

To choose a filesystem, the most important points are:

  • should be well tested and stable
  • should be mainstream enough
  • good performance of course

That means one is usually conservative when it comes to filesystems.

Using these criteria you have basically 3 choices on Linux (as of 2011-06:

  • ext3
  • ext4
  • xfs

On big devices I use xfs because a mkfs.xfs is way faster.

All of these filesystems can be resized.

Update:

I did a small benchmark on a 3 TB device (using 4k blocksize in all filesystems):

$ awk -F\; -f mkfs.awk mkfs
          FS     SIZE(TB)      TIME(S)      RSS(MB)      SPEEDUP      SPACEUP
        ext3            1          217           37         1.00         1.00
        ext3            2          478           74         1.00         1.00
        ext3            3          829          111         1.00         1.00
        ext4            1          139           37         1.55         1.00
        ext4            2          298           74         1.60         1.00
        ext4            3          515          111         1.61         1.00
         xfs            1            5            2        43.23        17.01
         xfs            2            9            2        51.43        33.49
         xfs            3           15            2        54.73        50.05

(The speed/mem-up is against ext3)

(System: Debian 6.0 amd64, mkfs.ext 1.41.12, mkfs.xfs 3.1.4, WD SATA drive, hdparm -t about 120 MB/s buffered disk reads)

That means mkfsing a ext[34] filesystem is up to 54 times slower than mkfsing a xfs one. Approximating this to a 12 TB creating a ext fs would really take about an hour (xfs only about a minute).

share|improve this answer
    
I like XFS too, but doesn't it seem kind of silly to choose it as your file system just because of the speed of initial format? –  Caleb Jun 25 '11 at 9:30
4  
Might be worth noting, that if you plan to grow your RAID later on, ext4 is limited to 16TiB volume (according to wikipedia). –  Gert Jun 25 '11 at 11:41
    
@Caleb, well, if it takes - say - hours longer and other features don't make a difference in the system use case, then it is the only difference that counts. I will do a small mkfs benchmark on a 3 TB device - perhaps @Let_Me_Be could do one as well on his system - this would be interesting. –  maxschlepzig Jun 25 '11 at 16:02
2  
@Gert: No, the limitation is in the current version of ext2progs - the Ext4 format supports volumes up to 1 exabyte in size. –  Teddy Jun 25 '11 at 18:27
1  
Recent versions of mkfs.ext4 are MUCH faster as it now delays most of the formatting to be done in the background after you mount it. Also fsck times are quite a bit faster on ext4 than ext3. –  psusi Jun 27 '11 at 16:21
show 5 more comments

On most of our production boxes with linux we use lvm + ext2 / ext3 depends on whether customer requests journaling /ext3/ or not /ext2/

In your case I would go ahaead and build up lvm + ext2 unless you would benefit from journaling more than it creates overhead .. but there's more to take into account precisely as maxschlepzig describes.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.