LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-13-2013, 02:11 AM   #1
wlaw
Member
 
Registered: Jun 2004
Location: HK
Distribution: Ubuntu
Posts: 242

Rep: Reputation: 30
How come I get a 295.5G RAM disk ?


Quote:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
mkdir /tmp/ramdisk; chmod 777 /tmp/ramdisk

sudo -a /etc/sudo.conf mount -t tmpfs -o size=2048M tmpfs /tmp/ramdisk

sudo -a /etc/sudo.conf chmod +x /etc/rc.local
exit 0
2048M should be 2G , right ? and I only get 8G of RAM in my machine.

However, when I see the properties of the ramdisk folder, it shows it is a 295.6G of size. Why ?
 
Old 08-13-2013, 04:56 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
Can you specify where exactly you see this "295.6G"? Maybe screenshot.
 
Old 08-13-2013, 04:58 AM   #3
wlaw
Member
 
Registered: Jun 2004
Location: HK
Distribution: Ubuntu
Posts: 242

Original Poster
Rep: Reputation: 30
Right click the folder ramdisk and see the properties of the folder.


https://dl.dropboxusercontent.com/u/...screenshot.jpg

Last edited by wlaw; 08-13-2013 at 05:09 AM.
 
Old 08-13-2013, 05:16 AM   #4
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
And what show commands?
Code:
mount
df -h /tmp/ramdisk
Well it is probably not ramdisk, but your real disk capacity. Your "sudo -a" generate error and not execute mounting. By the way rc.local is executed under root privileges, so sudo is not neccessary.

Last edited by eSelix; 08-13-2013 at 05:25 AM.
 
Old 08-13-2013, 05:21 AM   #5
displace
Member
 
Registered: Jan 2013
Location: EU
Distribution: Mint, Xubuntu
Posts: 241

Rep: Reputation: 24
May I ask why you use rc.local to mount tmpfs as opposed to a fstab entry?
 
Old 08-13-2013, 07:04 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
At first, rc.local is executed with root-privileges, so there is no need at all to use sudo here. Secondly, it seems to me that the mount command did not work correctly (maybe even caused by the improper use of sudo). Have you tried the command manually? Do you get any error messages when booting regarding this command?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nvidia 295.20 and gthumb Mr. Alex Linux - Software 1 03-18-2012 06:56 PM
Anyone know of something like a disk-backed RAM disk? dchicks Linux - Kernel 2 11-04-2009 05:21 PM
RAM disk? Help Patou001 Linux - General 4 01-18-2007 08:16 AM
ram disk quiron Linux From Scratch 3 07-20-2005 03:43 AM
Ram disk consty Red Hat 1 05-11-2005 08:06 AM


All times are GMT -5. The time now is 10:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration