benryu
Posts: 26
Joined: Sat Sep 27, 2014 1:11 pm

Viewing files

Thu Dec 03, 2015 10:39 am

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?

User avatar
RaTTuS
Posts: 10539
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Viewing files

Thu Dec 03, 2015 11:01 am

remout the drive correctly
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
DougieLawson
Posts: 37725
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Viewing files

Thu Dec 03, 2015 11:19 am

What format is your hard drive filesystem? Have you fsck'd it?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Viewing files

Thu Dec 03, 2015 11:22 am

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).
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

benryu
Posts: 26
Joined: Sat Sep 27, 2014 1:11 pm

Re: Viewing files

Thu Dec 03, 2015 11:34 am

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

benryu
Posts: 26
Joined: Sat Sep 27, 2014 1:11 pm

Re: Viewing files

Fri Dec 04, 2015 2:54 am

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.

User avatar
RaTTuS
Posts: 10539
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Viewing files

Fri Dec 04, 2015 7:51 am

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
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

benryu
Posts: 26
Joined: Sat Sep 27, 2014 1:11 pm

Re: Viewing files

Fri Dec 04, 2015 7:54 am

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

User avatar
RaTTuS
Posts: 10539
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Viewing files

Fri Dec 04, 2015 8:01 am

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
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

benryu
Posts: 26
Joined: Sat Sep 27, 2014 1:11 pm

Re: Viewing files

Fri Dec 04, 2015 8:04 am

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.

benryu
Posts: 26
Joined: Sat Sep 27, 2014 1:11 pm

Re: Viewing files

Fri Dec 04, 2015 8:16 am

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.

User avatar
RaTTuS
Posts: 10539
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Viewing files

Fri Dec 04, 2015 8:24 am

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
Last edited by RaTTuS on Fri Dec 04, 2015 11:21 am, edited 1 time in total.
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

benryu
Posts: 26
Joined: Sat Sep 27, 2014 1:11 pm

Re: Viewing files

Fri Dec 04, 2015 8:33 am

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?

User avatar
RaTTuS
Posts: 10539
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Viewing files

Fri Dec 04, 2015 11:21 am

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 ?
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Return to “Troubleshooting”