9

I have the following line on my fstab file:

ramdisk /tmp tmpfs mode=1777,size=2048m

Now I want to increase the size to 4096m.

What I did is change it to:

ramdisk /tmp tmpfs mode=1777,size=4096m

and issue the command:

mount -a

but when I check it if it change using df -h, the value is still the same at 2gb.

Anyone know how to change it?

jaYPabs
  • 279
  • 1
  • 4
  • 19

1 Answers1

9

Typing mount -o remount,size=4096m /tmp should do the trick.

kasperd
  • 29,894
  • 16
  • 72
  • 122
  • BTW, I have the following line in mtab file: `ramdisk /tmp tmpfs rw,mode=1777,size=4096m,size=4096m 0 0`. There are two `size=4096m`. Is this okay? – jaYPabs May 21 '14 at 07:35
  • @jaYPabs I don't think that is going to be a problem. – kasperd May 21 '14 at 07:37
  • 1
    Thank you. I run your code again with size as `mount -o remount /tmp` and it works great. No double entry in mtab file. – jaYPabs May 21 '14 at 07:47
  • 1
    Unless you want to override the fstab entry it's not necessary to specify the size on the command line. – user9517 May 21 '14 at 08:17