0

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?

1

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?

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

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

  • 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 '14 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 – Charles Green Sep 12 '14 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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