# tune2fs on a RAID setup

## allistarM

Hi all,

  I'd like to use tune2fs to improve disk performance, especially as noted in this topic. The thing is that I have a RAID setup, like this:

```

# cat /proc/mdstat

Personalities : [raid0] [raid1] [raid10]

md1 : active raid1 sdd1[3] sdc1[2] sdb1[1] sda1[0]

      32000 blocks [4/4] [UUUU]

md2 : active raid10 sdd3[3] sdc3[2] sdb3[1] sda3[0]

      100004480 blocks 64K chunks 2 near-copies [4/4] [UUUU]

md3 : active raid10 sdd4[3] sdc4[2] sdb4[1] sda4[0]

      522064128 blocks 64K chunks 2 near-copies [4/4] [UUUU]

unused devices: <none>

```

which are mounted like this:

```

# mount

/dev/md/2 on / type ext3 (rw,noatime)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)

udev on /dev type tmpfs (rw,nosuid)

devpts on /dev/pts type devpts (rw,nosuid,noexec)

/dev/md/3 on /home type ext3 (rw,noatime)

shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)

usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

/dev/md/1 on /boot type ext2 (rw,noatime)

```

When I run tune2fs to enable directory indexing and full journaling, do I do it on the /dev/sda1 etc partitions or do I do it on the /dev/md1 etc partitions?

----------

## eccerr0r

You tune the filesystem, so you run it on the filesystem, thus, /dev/mdX.  Besides on a striped array, each underlying /dev/sdXY device doesn't contain a complete filesystem.

However stuff like prefetch policy it appears some of them have to be tuned on the underlying block devices, so in that case, /dev/sdXY.

----------

