Page 1 of 1

Viewing files

Posted: Thu Dec 03, 2015 10:39 am
by benryu
I had setup my RPI2 with transmission and samba with a seagate 500gb HDD. A few days ago there was a power failure and the sd card corrupted. I have setup the pi again.

Now the issue i face is that when i view files on hdd via my pc i can view only a few files but when i go to cmd and hit ls i can see all the files listed there. What is the issue here and how can this be fixed?

Re: Viewing files

Posted: Thu Dec 03, 2015 11:01 am
by RaTTuS
remout the drive correctly

Re: Viewing files

Posted: Thu Dec 03, 2015 11:19 am
by DougieLawson
What format is your hard drive filesystem? Have you fsck'd it?

Re: Viewing files

Posted: Thu Dec 03, 2015 11:22 am
by Joe Schmoe
but when i go to cmd and hit ls i can see
The tone of the OP makes it sound like a Windows/Linux inter-op problem. I may be wrong about this, but...

It is unlikely that CMD (the Windows command interpreter) will recognize the 'ls' command (unless you have something like Cygwin installed on the Windows machine).

Re: Viewing files

Posted: Thu Dec 03, 2015 11:34 am
by benryu
I have mounted at the same path like before. I think its in ntfs format. The ls command on putty i mean.

Also i noticed some were in blue some in pink

Re: Viewing files

Posted: Fri Dec 04, 2015 2:54 am
by benryu
Can someone help me to unmount and remount completely. Because the moment i connect the hard disk it says already mounted. If possible I would like to retrieve the files and maybe format the entire hdd. Complete noob here would need step by step instructions please.

Re: Viewing files

Posted: Fri Dec 04, 2015 7:51 am
by RaTTuS
now we're getting somewhere
so
using putting you log into your RPi and you can see files [somewhere]
where exactly and what *exactly* do you type
what can you see
what do you exepect to see
what instructions are you following to do what you are doing

Re: Viewing files

Posted: Fri Dec 04, 2015 7:54 am
by benryu
I can view the files in this path /media/pi/FreeAgent\ GoFlex\ Drive/downloads

so i first use CD to go to this path and then use LS to list the files

Re: Viewing files

Posted: Fri Dec 04, 2015 8:01 am
by RaTTuS
you could do
ls -l "/media/pi/FreeAgent\ GoFlex\ Drive/downloads"
use tab completion
and you are saying that transmission has been setup correctly to point to the correct place
[personally I'd force mount an external drive to some location that is static i.e.
/mnt/Movies
or similar .. auto mounting can be a complete pain in some circumstances]

and are samba and transmission both setup correctly and running ?

what do you see when you view via the windows shares

Re: Viewing files

Posted: Fri Dec 04, 2015 8:04 am
by benryu
I just tried force mounting using the fstab file and after that the pi is not booting.

Now i am freshly installing Jessie. Can you guide me on how to mount correctly? Because even after a fresh install when i connect the hdd and type sudo mount I can see the drive listed there but however i cannot do a fresh mount.

Re: Viewing files

Posted: Fri Dec 04, 2015 8:16 am
by benryu
Steps done till now:

1. Flashed Jessie (using 16gb class 10)
2. Went to raspi-config and expanded filesystem
3. Edited /etc/dhcpcd.conf and included the following lines at the end

Code: Select all

interface eth0
static ip_address=192.168.1.2
static routers=192.168.1.1
static domain_name_servers=192.168.1.1 8.8.8.8
4. sudo apt-get update
5. sudo apt-get upgrade

If it would be better to format the drive to ext4 type then i am ok with losing the data. But this time i want to configure everything and then make an image of my memory card so that i dont face trouble in the future.

Re: Viewing files

Posted: Fri Dec 04, 2015 8:24 am
by RaTTuS
I can only give hints

Code: Select all

sudo fdisk -l
will show all the devices

Code: Select all

mount
will show what is mounted where

Code: Select all

sudo nano /etc/fstab
you may want to add amount point

Code: Select all

sudo mkdir /mnt/Movies
will allow you to edit fstab so you can put in something like
/dev/sda1 /mnt/Movies ext4 defaults 0 0
but your exact line may need to be different
what format is the external HD ?

Code: Select all

sudo apt-get update && sudo apt-get install transmission && sudo apt-get upgrade
may add transmission
then you have to edit it's config files to point to the right place

Re: Viewing files

Posted: Fri Dec 04, 2015 8:33 am
by benryu
Can you explain what this command is "sudo mkdir /mnt/Movies[/cpde]"

The first part is to create a directory at the specific location but what us [/cpde]

I want to format the hdd to ext4 filesystem. I believe this is best for linux. Can you let me know how to do this?

Re: Viewing files

Posted: Fri Dec 04, 2015 11:21 am
by RaTTuS
benryu wrote:Can you explain what this command is "sudo mkdir /mnt/Movies[/cpde]"

The first part is to create a directory at the specific location but what us [/cpde]

I want to format the hdd to ext4 filesystem. I believe this is best for linux. Can you let me know how to do this?
that was a typo on my part
do you have stuff on the hard disk that you want to keep ?