1

while reading about linux,I got the following:

The /var directory may be put in its own filesystem so that growth of the files can be accommodated and the file sizes do not fatally affect the system.

when I tried to find out the file system for /var by $ df - Th ,I got..

Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sda5      ext4      141G   19G  116G  14% /
none           tmpfs     4.0K     0  4.0K   0% /sys/fs/cgroup
udev           devtmpfs  1.5G  4.0K  1.5G   1% /dev
tmpfs          tmpfs     294M  1.2M  293M   1% /run
none           tmpfs     5.0M     0  5.0M   0% /run/lock
none           tmpfs     1.5G   38M  1.4G   3% /run/shm
none           tmpfs     100M   60K  100M   1% /run/user

here I am not getting /var on mounted on attribute, so what type of file system is associated with /var exactly? how do I find it?

2 Answers 2

2

Quoting your question:

The /var directory may be put in its own filesystem...

(Emphasis mine.) They key phrase here is may be. It's not uncommon to do so. But the default Ubuntu installation settings don't do so, so you don't have /var on a separate partition.


There are many scenarios where /var belongs on a different filesystem (or even a different disk):

  1. You have an application that does a lot of logging. In this case you'd want to protect root (/) from becoming full.
  2. You're using an SSD for / and have an application that makes a lot of read/writes to /var. In this case you'd want it on a normal HDD.
  3. You're using an application that is I/O intensive (using both storage space and a lot of read/writes), such as a mail server. In this case you'd want /var on a RAID array.

And so on... Also see: Why put things other than /home to a separate partition?

3
  • thanx @muru ,,I got it? ,,what are the scenarios where I have to do this(mount /var on a separate partition)..
    – lazarus
    Sep 12, 2014 at 16:57
  • 1
    @jazzz have a look at the update.
    – muru
    Sep 12, 2014 at 17:08
  • 2
    MySQL is the prime example: the database is stored in /var.
    – Rinzwind
    Sep 12, 2014 at 18:49
0

Your /var is just a directory under root (/), so it's ext4 in your case.

2
  • Thanx @ubfan,, but it is written here its own file system in my post,,what does that means..because it is using ext4 here,,(which is for root(/))...
    – lazarus
    Sep 12, 2014 at 16:32
  • The quote in your post says that it may be written into its own file system, not that it is. By default, Ubuntu will put /var into the / partition Sep 12, 2014 at 16:47

You must log in to answer this question.

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