View Full Version : /tmp cannot be mounted as Logical Volume

12th December 2007, 02:14 PM
A default install of Fedora 8 creates one Volume Group (VolGroup00) holding 2 Logical Volumes: LogVol00 for / (the root directory) and LogVol01 for /dev/shm (tmpfs = swap).

While having booted from the Fedora 8 Live DVD, I reduced the size of LogVol00.

Then, booting normally into the Fedora install, allowed to create a third LV (I named it LogVol_tmp) and make an ext3 filesystem in it. All went well so far.

Mounting the new LV as the /tmp directory
[root@localhost ~]# mount /dev/VolGroup00/LogVol_tmp /tmp seemed to have worked:
[root@localhost ~]# mount | grep VolGroup00
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
/dev/mapper/VolGroup00-LogVol_tmp on /tmp type ext3 (rw)However, once /tmp is mounted as a Logical Volume, an error occurs after logging out:
"The greeter application appears to be
crashing. Attempting to use a different one."
This means that you can no longer login, reboot or connect via SSH to the machine!!!

So, is it not possible to have /tmp mounted as a LV?

12th December 2007, 02:31 PM
make sure /tmp is not at 100%.


12th December 2007, 02:42 PM
Hi davidj,

thank you for answering. However, I don't know what you mean. Could you please give the exact command option I should take care about?

12th December 2007, 02:51 PM
df -l
for mounted , shows %used

Did you add the mount to your fstab so it will be available at boot up and not get unmounted to early at shtdown?
Did you clean up your original /tmp first?


12th December 2007, 04:25 PM
Yes, before mounting the third LV as /tmp, I cleaned up the existing /tmp directory:
[root@localhost ~]# rm -rf /tmp/*
[root@localhost ~]# rm -rf /tmp/.*I have created the LV of 1 GB size:
[root@localhost ~]# lvdisplay -m /dev/VolGroup00/LogVol_tmp
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol_tmp
VG Name VolGroup00
LV UUID vNjp1k-36tw-8daj-HiUY-2aYu-1rom-Lab48r
LV Write Access read/write
LV Status available
# open 0
LV Size 1.00 GB
Current LE 32
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:2

--- Segments ---
Logical extent 0 to 31:
Type linear
Physical volume /dev/hda6
Physical extents 256 to 287so the new mounted /tmp has plenty of free space:
[root@localhost ~]# mount /dev/VolGroup00/LogVol_tmp /tmp
[root@localhost ~]# df -h / /tmp
Filesystem Size Used Avail Use% Mounted on
7.8G 3.8G 3.8G 51% /
1008M 34M 924M 4% /tmpAfter unmounting /tmp, a filesystem check succeeds:
[root@localhost ~]# umount /tmp
[root@localhost ~]# e2fsck -f /dev/mapper/VolGroup00-LogVol_tmp
e2fsck 1.40.2 (12-Jul-2007)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
tmp_dir: 16/131072 files (6.3% non-contiguous), 12655/262144 blocksOriginally, I did add the mount info into fstab, but I had to comment out that line again:
[root@localhost ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
#/dev/VolGroup00/LogVol_tmp /tmp ext3 defaults 0 2because booting was no more possible due to the crashing "greeter application" (GNOME's '/usr/sbin/gdm'). Anybody could try that out for herself. Maybe that's just a problem with /usr/sbin/gdm?