Help - Search - Members - Calendar
Full Version: No space left creating a new TMP partition
The Planet Forums > System Administration > General Support Questions
Sh4ka
Hello,

Iam securing /tmp and /devh/shm directories, /dev/shm is already secure, but I'm getting some erros when I'm trying to create a new tmp partition, it seems it is blocked at 256 MBs.

CODE
[root@hostingX11.com:~]cd /dev/; dd if=/dev/zero of=tmpMnt bs=1024 count=800000

dd: writing `tmpMnt': No space left on device

249477+0 records in

249476+0 records out



[root@hostingX11.com:~]ls -alh tmpMnt

-rw-r--r--  1 root root 244M Dec 15 21:20 tmpMnt

[root@hostingX11.com:~]pwd

/dev



[root@hostingX11.com:~]df  -ah

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda3             150G   60G   83G  42% /

none                     0     0     0   -  /proc

none                     0     0     0   -  /sys

none                     0     0     0   -  /dev/pts

usbfs                    0     0     0   -  /proc/bus/usb

/dev/sda1              99M  7.1M   87M   8% /boot

none                  245M     0  245M   0% /dev/shm

none                     0     0     0   -  /proc/sys/fs/binfmt_misc

sunrpc                   0     0     0   -  /var/lib/nfs/rpc_pipefs

[root@hostingX11.com:~]



How can I increment space in this partition, or be able to create a new one bigger than this size?



Thanks.
James Jhurani
first off... "df -i" make sure your inodes are not all used up.

second, create the tmpMnt, the try and create another one, and see if it fails before 256MB. If so, fsck the drive. If not its probably time to open a ticket with tech support.
ScottPO
Hi Sh4ka,
The following only applies if you are running RHES4, which uses tmpfs for /dev. Check /etc/redhat-release to be sure if this is you.

The problem is that I think /dev is a tmpfs mount. df is lying to you, it only reads /etc/mtab. However, /dev was mounted before /etc, so its mount isn't in /etc/mtab (chicken and the egg thing, I think). It would be more accurate to read /proc/mounts. There you should find /dev is a tmpfs. If this is the case, then dev can only be one half the size of available RAM. This makes sense, dev was not intended to be a file store, rather, it was just supposed to store a whole bunch of block and character devices, which take up very little space. Here's what I mean about df vs. /proc/mounts:

QUOTE
[scott@localhost tmp]$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda2              4956316   4450040    250444  95% /
/dev/hda1               101086     12958     82909  14% /boot
tmpfs                   322648         0    322648   0% /dev/shm
/dev/hda5             10434156   8687328   1208252  88% /home
/dev/hda6              1984016    333516   1548088  18% /tmp
[scott@localhost tmp]$


Notice how df left out /dev. Now look at /proc/mounts:
QUOTE
[scott@localhost tmp]$ cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,data=ordered 0 0
/dev /dev tmpfs rw 0 0 <----------------------THIS LINE HERE
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
none /selinux selinuxfs rw 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/hda1 /boot ext3 rw,data=ordered 0 0
tmpfs /dev/shm tmpfs rw 0 0
/dev/hda5 /home ext3 rw,data=ordered 0 0
/dev/hda6 /tmp ext3 rw,data=ordered 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
[scott@localhost tmp]$

Oh, how magical, it's there! Now, if this is what your system is doing, you'll need to use a different location for for that tmpMnt file. Maybe in /? I don't know, it's up to you to find a mount point that has space.

Hope this helps.

Scott
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.