LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 04-25-2003, 12:17 PM   #1
chem1
Member
 
Registered: Jun 2002
Location: White House, Washignton DC
Distribution: Red Hat 9
Posts: 270

Rep: Reputation: 30
what is /dev/shm?


Hi,
I have around 1 GB of free space at the end of my drive. This space is still unformatted.
My df command show this as
/dev/shm

Now how can I format this free space to FAT32 so that I can use it between Winblows and Linux.

Thankx in advance...
 
Old 04-25-2003, 01:02 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
You can't format it, its a virtual memory filesystem. Its only taking up space most likely on your / directory if there is no partitioned space specifically setup for it on your hard drive, in which I doubt you created when you installed Linux.
I'd suggest leaving it alone, or you can mess up your system if its actually being used right now, as you can see space taken up with it.
 
Old 04-25-2003, 01:32 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,693
Blog Entries: 54

Rep: Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962
AFAIK tmpfs or shm only uses memory, so no files should be created on disk. If you "grep /proc/mounts -e tmpfs" you should see it's not a mounted partition. See "find /usr/src -name tmpfs.txt".
 
Old 04-25-2003, 01:33 PM   #4
chem1
Member
 
Registered: Jun 2002
Location: White House, Washignton DC
Distribution: Red Hat 9
Posts: 270

Original Poster
Rep: Reputation: 30
Well,
df says its 0% used.

here is a dump from my df command

***********************************
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hdc2 4854520 2218832 2389092 49% /
/dev/hdc1 101089 9173 86697 10% /boot
/dev/cdrom 496672 496672 0 100% /mnt/cdrom
none 94808 0 94808 0% /dev/shm
*************************************************

the Filesystem type is none....and I would like to use it since its free sapce (1 GB for that matter :-) )

THakx in advance...
 
Old 04-25-2003, 02:09 PM   #5
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Nah, that's a little misleading. The device is actually none - it's not actually there. Like /proc. More relevant - do cat /etc/mtab and you'll see physical /dev devices and "none" mounted on /proc and "tempfs" on /dev/shm. But "/dev/hda1" on /, say. Only /dev/hda1 and the like are real things, sort of.
 
Old 04-25-2003, 08:53 PM   #6
chem1
Member
 
Registered: Jun 2002
Location: White House, Washignton DC
Distribution: Red Hat 9
Posts: 270

Original Poster
Rep: Reputation: 30
So that means that now I cannot use this 1 GB of FREE space. I am really surprised when and where did Linux come to know that it has to "use" this space. I left this space specifically for formatting to FAT 32 System

THankx in advance...
 
Old 04-25-2003, 09:17 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,693
Blog Entries: 54

Rep: Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962
Well, it's weird it's saying "none". What does "grep /proc/mounts /etc/fstab -e shm" say? Can you write to /dev/shm (say copy an unimportant file and back)? Btw, 94808 is aprox 94MB. Dunno where you got the 1GB from.
 
Old 04-25-2003, 11:03 PM   #8
chem1
Member
 
Registered: Jun 2002
Location: White House, Washignton DC
Distribution: Red Hat 9
Posts: 270

Original Poster
Rep: Reputation: 30
Well when I load the Red-Hat Hardware browser it shows that I Have 965 MB (this is MB..I am dead sure) FREE soace with NO device....
SO here is a conflict between df and redhat hardware browser.
Here is the result of :
*******************************************************
grep /proc/mounts /etc/fstab -e shm
****************************************************************
/proc/mounts:none /dev/shm tmpfs rw 0 0
/etc/fstab:none /dev/shm tmpfs defaults 0 0

***********************************************************************
I wonder whats wrong and where
 
Old 04-25-2003, 11:11 PM   #9
chem1
Member
 
Registered: Jun 2002
Location: White House, Washignton DC
Distribution: Red Hat 9
Posts: 270

Original Poster
Rep: Reputation: 30
OK...here is an important piece of Information

1)df DOES NOT SHOW the FRee space
2) RH Hardware browser DOES NOT show the /dev/shm device(space, whatever)
Hopefully this information will be useful for the gurus to solve my problem

Thankx in advance....
 
Old 04-26-2003, 12:31 AM   #10
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by chem1
OK...here is an important piece of Information

1)df DOES NOT SHOW the FRee space
2) RH Hardware browser DOES NOT show the /dev/shm device(space, whatever)
Hopefully this information will be useful for the gurus to solve my problem

Thankx in advance....
Most likely you just have unpartitioned free space on your hard drive that is not being used.

What does fdisk -l show you? Anything about that unpartitioned space and what device it is, ex. /dev/hda8 or something like that? If so, you shouldn't have any problems creating a partition and formatting a filesystem onto it.
 
Old 04-26-2003, 02:36 AM   #11
deepsix
Member
 
Registered: Apr 2003
Distribution: ANY
Posts: 337

Rep: Reputation: 31
tmpfs uses /dev/shm ......... somewhat like cache but from what i read here (which i GOOGLED for) its not neccesary ( http://www.luci.org/luci-discuss/200204/msg00015.html has the info i
read if you would like to read it.........

as far as repartiioning it now that you have windows and linux already on your drive ......i dont think it will happen the way you want it (between) linux and windows but i could be wrong ......depending on the partitioning software you are using.

I tried something similar a while back and everytime i tried the partiton always ended up at the end of the drive........the only way i could get it to work was if i completely formated my hd and partitioned it the exact way i wanted before i installed the OS's

again like i said I could be wrong so maybe read or GOOGLE a little bit more before you take any advice......

still a newbie
 
Old 04-26-2003, 06:44 AM   #12
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
erm - the shm space is RAM, not hard disk, or partitions on a hard disk. It's a nifty tool actually. Google a little deeper.
 
Old 04-27-2003, 09:33 PM   #13
chem1
Member
 
Registered: Jun 2002
Location: White House, Washignton DC
Distribution: Red Hat 9
Posts: 270

Original Poster
Rep: Reputation: 30
I have tried...but the strangest thing is that except for PartEd..there seems to be no other useful program for managing partitions in Linux. the GUI for PartEd , qtParted...does NOT intstall on my mcahine....things go sour when I say 'make' and all sort of goofy messages appear. This is one thing that I have ben yelling about in the Linux GEneral forum that there should be be better ways of installing things. Unfortunately I was confronted with unexpectedly high resistance by Linux gurus. No wonder, if Linux is made easy then who will ask the gurus.....Catch-22 eh.
Nevertheless, I will keep up my search for better partition tools and will duly post the resolution once I get one.
 
Old 05-31-2004, 03:52 PM   #14
barmach
LQ Newbie
 
Registered: May 2004
Posts: 1

Rep: Reputation: 0
I have exactly the same problem. I shrunk a Windows FAT32 partition for allocating the free space to an already existing ext2. Now I have about 10GB that I can't use anymore. Partition Magic won't do the job in Windows(2000) and fdisk (both in DOS and linux) doesn't recognize the free space.

Output from $fdisk -l

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2076 16675438+ c Win95 FAT32 (LBA)
/dev/hda2 2077 6283 33792696 c Win95 FAT32 (LBA)
/dev/hda3 7650 7662 104422+ 83 Linux
/dev/hda4 7663 9726 16579080 f Win95 Ext'd (LBA)
/dev/hda5 7663 9472 14538793+ 83 Linux
/dev/hda6 9473 9726 2040223+ 82 Linux swap


Output from $df

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda5 14310496 12887476 696084 95% /
/dev/hda3 101107 14825 81061 16% /boot
none 1031976 0 1031976 0% /dev/shm (HERE IT IS)
/dev/hda1 16659144 8652848 8006296 52% /mnt/winc
/dev/hda2 33784384 22482528 11301856 67% /mnt/wind
/dev/cdrom 653312 653312 0 100% /mnt/cdrom

Any suggestion would be highly appreciated!

Barmach
 
  


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
What is : /dev/shm PionexUser Linux - Newbie 4 03-14-2006 08:48 AM
/dev/shm? icecube Linux - Hardware 3 03-14-2006 08:34 AM
What is /dev/pts, /dev/shm? mrpc_cambodia Red Hat 1 10-18-2004 04:27 AM
What's the /dev/shm? antz1981cn Linux - Hardware 2 12-30-2002 02:55 PM
/dev/shm sakeeb Linux - Software 9 06-05-2002 07:03 AM


All times are GMT -5. The time now is 05:25 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration