1

I have a new Ubuntu 11 server install created per the wiki with the following partitions:

md1 : active raid5 sdc5[2] sda5[0] sdb5[1]
  1935813632 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]

md2 : active raid5 sdb6[1] sdc6[2] sda6[0]
  16722944 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]

md0 : active raid1 sda1[0] sdc1[2](S) sdb1[1]
  487412 blocks super 1.2 [2/2] [UU]

unused devices: <none>

/ is mounted at md1, md2 is swap and md3 is /boot.

I would like to create a tmpfs for /tmp which I probably should have done at install time, but I'm wondering if there is any issue doing it now, considering that its parent is a RAID array?

Also, what process would you recommend for creating the tmpfs?

1 Answer 1

3

No problem, by the time you are mounting /tmp is mounted / will aready be mounted. The file system you are mounting to is relatively unimportant. It is important that it is already mounted. Using tmpfs will actually help your raid perfomance if you do use /tmp a lot.

More important with tmpfs is the size of your swap partition. The available memory including swap controls how large a tmpfs file system you can create. When memory gets tight or /tmp data ages, it is likley be moved to swap. Creating large files in tmpfs tends to involve swapping some of the data to your swap partition, but generally this should not be a problem.

EDIT: WARNING: tmpfs is temporary and will be flushed every reboot. I've seen long multi-step runs trashed by storing data on file systems cleared on reboot. Don't use a tmpfs mount for anything that needs to survive a reboot. Do use tmpfs for anything that should not survive a reboot.

Some systems have a script that clears /tmp and/or similar directories on reboot. Behavior of these should be the same whether or not tmpfs is used.

2
  • Thanks @Bill, that helps. My swap is 16Gb and I have 8Gb of RAM, so I´m hoping that should be enough. Does that sound right? Jul 4, 2011 at 22:34
  • @Johnathan Far more than enough.
    – BillThor
    Jul 5, 2011 at 13:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .