You are not logged in.

#1 2009-12-14 08:58:18

cameris
Member
Registered: 2009-12-14
Posts: 5

file instead of seperate partition for /tmp and /var-

Hi,

currently I'm setting up my workstation and don't know if I should make separate partitions or files for /tmp and /var. I would prefer to make files and mount them, because it will give me more flexibility if I have to resize them, but I have no experience with that. So my questions are:
Is there any big performance or other issue by making a tmp- and varfile?
How big should they be?
Which filesystem should be used?

btw, with file I mean:
   

dd if=/dev/null of=/dev/tmp_part (bs=... count=...)
    mkfs.ext4 /dev/tmp_part

in fstab:
   

/dev/tmp_part /tmp ext4 defaults,noexec,nosuid,noatime(,loop?) 0 0

Offline

#2 2009-12-14 09:19:46

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: file instead of seperate partition for /tmp and /var-

I have heard of people using a file for swap but not for var or tmp. If I was you I would look into lvm. It will give you the flexibility you want.

For filesystems I have been using ext4 since it was included in Arch Linux. Before that I used ext3. They are solid choices. If you go with lvm and leave a little space spare you can always switch from extX to jfs, xfs, etc if you find a need.

Size? Best way is to look at an existing install that *you* use and go by that. There have been a couple of threads about this in the past. Here is one.

Offline

#3 2009-12-14 12:01:44

cameris
Member
Registered: 2009-12-14
Posts: 5

Re: file instead of seperate partition for /tmp and /var-

thanks for the help.
lvm ... already forgot about that tongue

For the filesystem I will stick with ext4. Only thought that journaling on tmp maybe unneeded, and therefor use ext2.

Offline

#4 2009-12-14 20:19:50

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: file instead of seperate partition for /tmp and /var-

Another option for tmp would be to use tmpfs if you have plenty of ram.

Offline

#5 2009-12-15 00:03:28

some-guy94
Member
Registered: 2009-08-15
Posts: 360

Re: file instead of seperate partition for /tmp and /var-

cameris wrote:

Hi,

currently I'm setting up my workstation and don't know if I should make separate partitions or files for /tmp and /var. I would prefer to make files and mount them, because it will give me more flexibility if I have to resize them, but I have no experience with that. So my questions are:
Is there any big performance or other issue by making a tmp- and varfile?
How big should they be?
Which filesystem should be used?

btw, with file I mean:
   

dd if=/dev/null of=/dev/tmp_part (bs=... count=...)
    mkfs.ext4 /dev/tmp_part

in fstab:
   

/dev/tmp_part /tmp ext4 defaults,noexec,nosuid,noatime(,loop?) 0 0

I would recommend ext3, just because it's stable and does have journaling.
To make it, use

dd if=/dev/zero of=/virtpartitions/tmp bs=1M count=NUMBER_OF_MEGABYTES # There is a difference between /dev/null and /dev/zero :)
mkfs.ext3 /virtpartitions/tmp

In fstab

/virtpartitions/tmp                  /tmp    ext3  defaults,noatime,loop 0 0

Offline

#6 2009-12-15 00:45:17

kjon
Member
From: Temuco, Chile
Registered: 2008-04-16
Posts: 398

Re: file instead of seperate partition for /tmp and /var-

/.loop/var.reiserfs    /var        reiserfs    noatime,nodiratime,loop      0 0

They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.

Offline

Board footer

Powered by FluxBB