SOLVED: Questions about moving shares and locating files

luco
Posts: 47
Joined: Sat Oct 17, 2015 8:09 am

Re: Questions about moving shares and locating files

Postby luco » Tue Feb 23, 2016 4:43 pm

Nothing there except the 4.4GB of files I just copied there to test.

I don't know how I got there, but it started with exactly the same situation as reported by this user here. That is I followed all tutorials and ended up with files going to the wrong drive and mounting point even when the share path was updated via Dashboard. Then I reboot and I'm stuck in this mess.

I guess I will have to start over. But it bugs me that I cannot find out what is going on nor how to locate files that the disk is reporting are there. That is scary to me.

I've read somewhere that /var/tmp is where linux holds temporary files that persist between reboots unlike /tmp, which gets wiped with every reboot. Is it possible to wipe /var/tmp and reboot or is that a bad idea?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Questions about moving shares and locating files

Postby bigfoot65 » Tue Feb 23, 2016 5:39 pm

Is it possible to wipe /var/tmp and reboot or is that a bad idea?
You can try. Not like it will hurt anything.

I would be able to help more if I knew exactly what you did to get to this point. If you mounted a drive, then copied the files you could look there. Anything in /var/hda/files/drives are you mount point for other drives.

Hard to diagnose a problem such as this. I would need to know step by step what was done. That is probably more effort than starting over and might be hard to remember all the details.

EDIT: Please post the contents of /etc/fstab.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

luco
Posts: 47
Joined: Sat Oct 17, 2015 8:09 am

Re: Questions about moving shares and locating files

Postby luco » Tue Feb 23, 2016 7:44 pm

OK, I resolved the issue.

During my initial setup, I must have first mounted my new share to /dev/sda3 and copied files there and then when I rebooted the server the correct fstab mounting points were created, which mounted my new share correctly to the partition on the second hard drive.

So, the files copied to this share under the previous mounting point were there, but hidden from the view.
Now, I'm sounding like I know what I'm talking about, but I've acquired this knoweldge only in the past hour or so studying Linux tutorials on mounting, learning rm -fr command etc. :)

So, here's what I've done to find my files.
First, I've mounted a copy of my root to /mnt:

Code: Select all

mount -o bind / /mnt
Immediately, I could see that /mnt contains ~76GB worth of data unlike the / before the mount bind.
I was then able to find my files under /mnt/var/hda/files/drives/DATA/newshare
Then I removed that directory and its files:

Code: Select all

rm -rf /mnt/var/hda/files/drives/DATA/newshare
I repeated the same for the second test share I created under /mnt/var/hda/files/drives/OTHER/test

Then my /mnt was down to 1.7GB, which is probably the correct partition size without my files there.
I then issued:

Code: Select all

umount /mnt
I then rebooted to ensure my fstab mounts are restored just to be sure (I could have run mount -a command)
and here we are:

Code: Select all

[root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 2.0G 0 2.0G 0% /dev tmpfs 2.0G 0 2.0G 0% /dev/shm tmpfs 2.0G 380K 2.0G 1% /run tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup /dev/sda3 913G 1.7G 865G 1% / tmpfs 2.0G 32K 2.0G 1% /tmp /dev/sdc1 1.8T 4.5G 1.7T 1% /var/hda/files/drives/OTHER /dev/sdb1 1.8T 4.5G 1.7T 1% /var/hda/files/drives/DATA /dev/sda1 477M 71M 377M 16% /boot tmpfs 391M 0 391M 0% /run/user/0 [root@localhost ~]#
Phew
:)

I hope this helps others too.

As frustrating as this was, I have learned a great deal about things I would have never touched.

Thanks for coming along for the ride bigfoot. I know it must've been confusing trying to understand how I got there. This post here set me on the correct path.

One final question: should I have deleted the 'DATA' and 'OTHER' under drives in the /mnt ... mounting point? WIll they remain there? I tried deleting 'DATA', but got error that it's in use, so I left it along with 'OTHER'.

Thank you.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Questions about moving shares and locating files

Postby bigfoot65 » Wed Feb 24, 2016 2:02 pm

One final question: should I have deleted the 'DATA' and 'OTHER' under drives in the /mnt ... mounting point? WIll they remain there? I tried deleting 'DATA', but got error that it's in use, so I left it along with 'OTHER'.
You can leave them or remove them. They are empty folders.

In order to remove them, the drive has to be unmounted from that location.

Happy to hear you finally got it resolved. Mounting disks in Linux is not the simplest task. Understanding how a mout point works does help though. Kind of like a folder in Windows, but points to a drive.

Will close this thread as resolved.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 27 guests