LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   what is /dev/shm? (https://www.linuxquestions.org/questions/linux-hardware-18/what-is-dev-shm-56746/)

chem1 04-25-2003 11:17 AM

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...

trickykid 04-25-2003 12:02 PM

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.

unSpawn 04-25-2003 12:32 PM

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".

chem1 04-25-2003 12:33 PM

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...

slakmagik 04-25-2003 01:09 PM

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.

chem1 04-25-2003 07:53 PM

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...

unSpawn 04-25-2003 08:17 PM

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.

chem1 04-25-2003 10:03 PM

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

chem1 04-25-2003 10:11 PM

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....

trickykid 04-25-2003 11:31 PM

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.

deepsix 04-26-2003 01:36 AM

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

mcleodnine 04-26-2003 05:44 AM

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. :)

chem1 04-27-2003 08:33 PM

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.

barmach 05-31-2004 02:52 PM

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


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