LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Files hidden in Bash and Samba, but not in X (https://www.linuxquestions.org/questions/linux-newbie-8/files-hidden-in-bash-and-samba-but-not-in-x-4175483342/)

kylechat416 11-04-2013 08:06 AM

Files hidden in Bash and Samba, but not in X
 
Hi,

I have a raspberry pi running Raspbian Wheezy. This has a 100GB SATA ext4 formatted hard drive connected via a USB/SATA converter, which is mounted at /media/SHARE. This directory is shared using Samba, and Pydio, using an Apache2 server.

Everything was working fine until I restarted the Pi. Now, only one folder is visible in this directory, owned by my user (pi) and in the www-data group. The files that are now missing are all owned by www-data and in the www-data group. All the files and directories are chmod to 777 recursively

The strange thing is that when I am in the X environment, everything shows up fine, but when using Bash, SSH, Samba, or Pydio, only the one folder shows up. Even as root, nothing shows up, but does in X.

Any help would be much appreciated, as I am completely baffled by this :S

szboardstretcher 11-04-2013 08:08 AM

Just to be clear,..

If you do a 'whoami' the answer is 'root'

and if you use 'ls -alh' in the directory in question, you do not see anything?

But in X, you do?

pan64 11-04-2013 08:13 AM

I think the power of usb port is not switched off during reboot therefore the external drive will not recognize the reboot, its state is unclear (at least for me). I always had to unplug and plug it in again.

kylechat416 11-04-2013 08:26 AM

szboardstretcher:

as pi and root users, both have the same result, only showing the one folder.

And yes, in X, everything shows up fine and works as it should.

pan64:

I'll try rebooting the pi and unplugging the HD when I get home tonight, as I'm just at work on my break at the moment, and can only SSH.

Thanks for the fast replies guys :)

lleb 11-04-2013 08:59 AM

as your at home, is the USB drive showing in df? either way manually umount and mount the drive to see if it shows up properly again via CLI for you.

kylechat416 11-04-2013 09:22 AM

Quote:

Originally Posted by lleb (Post 5058151)
as your at home, is the USB drive showing in df? either way manually umount and mount the drive to see if it shows up properly again via CLI for you.

I've tried that, with no luck. I've remounted the drive and also rebooted the Pi several times.

I'm thinking that pan64's idea may work, as the HD has a seperate power supply and hasn't been switched off since it was set up.

I'll let you know how i get on later tonight (in the UK) :)

kylechat416 11-04-2013 02:27 PM

OK, I've fixed it.

The HD was being mounted at "/media/SHARE_" for reasons unknown. "/media/SHARE" was referring to a directory on the Pi's SD card.

Any thoughts on why this happened?

Thanks for your help guys, much appreciated :)

lleb 11-04-2013 07:15 PM

if it was mounted at all it should have shown up in df.

as to why its mounting there that would be a distro specific issue.as the RPi has its OS on the SD card that is a bit understandable. did your distro setup multi partitions? if so then that is probably a standard procedure for your distro.

Code:

pi@raspbmc:~$ df -Th
Filesystem              Type  Size  Used Avail Use% Mounted on
/dev/mmcblk0p2          ext4  15G  1.1G  13G  8% /
/dev/mmcblk0p1          vfat  69M  6.3M  63M  10% /boot

jackknife:/centos        nfs4  1.8T  969G  722G  58% /home/pi/Movies
jackknife:/NFS_TV_Shows/ nfs4  1.4T  755G  551G  58% /home/pi/TV_Shows
jackknife:/New/          nfs4  3.6T  1.3T  2.2T  38% /home/pi/New

That is my RPi, but im running RaspBMC and the three mounts in /home/pi are NFS shares that contain my media for the family.

note that RaspBMC only has 2 partitions:

Code:

root@raspbmc:~# fdisk -l

Disk /dev/mmcblk0: 16.0 GB, 16012804096 bytes
4 heads, 16 sectors/track, 488672 cylinders, total 31275008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d4f0f

        Device Boot      Start        End      Blocks  Id  System
/dev/mmcblk0p1            4096      147455      71680    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          151552    31275007    15561728  83  Linux

so again with df and fdisk -l will show you what is both mounted, were it is mounted, and what type of file system each mount point contains.

pan64 11-05-2013 01:00 AM

Quote:

Originally Posted by kylechat416 (Post 5058279)
OK, I've fixed it.

The HD was being mounted at "/media/SHARE_" for reasons unknown. "/media/SHARE" was referring to a directory on the Pi's SD card.

Any thoughts on why this happened?

Thanks for your help guys, much appreciated :)

That is not the reason, but the outcome. The system thought /media/SHARE is already in use, therefore it generated another name as mount point. Probably it is a timing issue.

kylechat416 11-06-2013 02:19 PM

Quote:

Originally Posted by lleb (Post 5058394)
so again with df and fdisk -l will show you what is both mounted, were it is mounted, and what type of file system each mount point contains.

Thanks for that :) I never knew about df.

I deleted the /media/SHARE directory, and rebooted the Pi. It then mounted properly at /media/SHARE.

I can't think where this directory came from though... I never created it :S


All times are GMT -5. The time now is 03:52 PM.