LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   LVM2 in use, files are disappearing! (https://www.linuxquestions.org/questions/linux-software-2/lvm2-in-use-files-are-disappearing-907388/)

armchair rambo 10-10-2011 09:45 AM

LVM2 in use, files are disappearing!
 
I'm running Fedora 15 with LVM2. The contents of whole folders are disappearing after a few days! I put a file somewhere and a week later the folder is cleaned out. If there's a large # of files, they don't necessarily all disappear at once.

Directory structures are left intact. There's nothing in Lost+Found. Running on an Acer Laptop. Have never had a problem like this before, but I always used ext3.

I don't want to reinstall Fedora and use ext3, but the current situation is unnacceptable, even if everything is backed up.

Anyone heard of this or have some advice? I usually hang closer to the newbie forums, so I'd appreciate any help you all can offer.


sda1 is ext4 /boot 500MB
sda2 is lvm2 /tmp 55GB

Running df gets this:
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 48509808 11078976 36938200 24% /
udev 991416 0 991416 0% /dev
tmpfs 998876 340 998536 1% /dev/shm
tmpfs 998876 648 998228 1% /run
/dev/mapper/VolGroup-lv_root
48509808 11078976 36938200 24% /
tmpfs 998876 0 998876 0% /sys/fs/cgroup
tmpfs 998876 0 998876 0% /media
/dev/sda1 495844 71556 398688 16% /boot
/dev/mapper/VolGroup-lv_home
4708880 2039404 2430272 46% /home
/dev/mapper/VolGroup-lv_root
48509808 11078976 36938200 24% /tmp
/dev/mapper/VolGroup-lv_root
48509808 11078976 36938200 24% /var/tmp
/dev/mapper/VolGroup-lv_home
4708880 2039404 2430272 46% /home

bluesatbridge 10-21-2011 01:39 AM

files from which location are getting deleted and is ur root a lvm too because if thats the case then the system wont work neither will it work if ur home directory is deleting files at random
.. if u can be specific please

armchair rambo 10-24-2011 12:56 AM

it's two partitions on the same drive. All LVM2.

armchair rambo 10-24-2011 01:10 AM

my mistake. partition #1 is ext4 (boot), partition 2 is LVM2. Within that partition #2, there are logical volumes. The only place there is a problem is with the largest volume, mounted at /tmp -- that's the one that loses files.

crts 10-24-2011 04:15 AM

Quote:

Originally Posted by armchair rambo (Post 4506259)
The only place there is a problem is with the largest volume, mounted at /tmp -- that's the one that loses files.

Hi,

the /tmp directory is only for temporary files and normally its contents are being deleted during reboot. Do not store data inside that directory if you want to keep it.

armchair rambo 10-26-2011 12:32 AM

Thank you, a straight answer! It is set up that way because after installing Fedora 15 the volume was mounted at /tmp and /var/tmp -- which I found when I started filling the home folder and running out of room too quickly.

So I'm wondering if maybe I just don't know how to read what's below or if the volume is in fact mounted at /tmp and /var/tmp and I need to change that. I'm looking at the volume labeled lv_root that is most of my 60GB hard drive and df says it's mounted at /tmp.

I will try making some new directories at / and move the files there.

This thread probably belongs in the newbie forum, apologies...


Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 48509808 17258784 30758392 36% /
udev 991416 0 991416 0% /dev
tmpfs 998876 1940 996936 1% /dev/shm
tmpfs 998876 660 998216 1% /run
/dev/mapper/VolGroup-lv_root
48509808 17258784 30758392 36% /
tmpfs 998876 0 998876 0% /sys/fs/cgroup
tmpfs 998876 0 998876 0% /media
/dev/sda1 495844 72799 397445 16% /boot
/dev/mapper/VolGroup-lv_home
4708880 1228780 3240896 28% /home
/dev/mapper/VolGroup-lv_root
48509808 17258784 30758392 36% /tmp
/dev/mapper/VolGroup-lv_root
48509808 17258784 30758392 36% /var/tmp
/dev/mapper/VolGroup-lv_home
4708880 1228780 3240896 28% /home

armchair rambo 10-26-2011 12:40 AM

probably solved
 
The files copied and, since there's enough room, the problem was my assumptions.

Thanks for the help. I'll wait a couple weeks to make sure no files disappear, then flag this thread as solved.

Thank you
Thank you
Thank you!

sag47 10-26-2011 01:03 AM

It is best to mount shares under /media or /mnt.

For example,
/mnt/raid
/mnt/share
/mnt/cdrom

Those folder names are arbitrary but you get the idea. You shouldn't mount a filesystem under any tmp directory (that includes /var/tmp) unless it is truly meant to just limit the size available for tmp.


All times are GMT -5. The time now is 09:30 PM.