LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Filesystem problem (https://www.linuxquestions.org/questions/linux-general-1/filesystem-problem-4175650157/)

Peter18 03-14-2019 05:33 AM

Filesystem problem
 
A friendly hello to anybody,

this is my problem:
Code:

ls: cannot access '/media/daten': Resource temporarily unavailable
total 16
 31681 4 drwxr-xr-x  5 peter sambauser 4096 Jan 17 16:18 .
    2 4 drwxr-xr-x 24 root  root      4096 Dec  6 16:32 ..
    ? ? d?????????  ? ?    ?            ?            ? daten
127877 4 drwxr-xr-x  2 peter sambauser 4096 Jan 17 16:56 progs
253963 4 drwxr-xr-x  2 root  root      4096 Jan 17 16:18 wetter

What can I do to repair the folder daten?

Greetings from the northsee

Peter

dc.901 03-14-2019 05:49 AM

Need more info:
Is this local or network file system?
Same disk or different (from OS)?

jsbjsb001 03-14-2019 05:56 AM

Quote:

Originally Posted by Peter18 (Post 5973731)
A friendly hello to anybody,

this is my problem:
Code:

ls: cannot access '/media/daten': Resource temporarily unavailable
total 16
 31681 4 drwxr-xr-x  5 peter sambauser 4096 Jan 17 16:18 .
    2 4 drwxr-xr-x 24 root  root      4096 Dec  6 16:32 ..
    ? ? d?????????  ? ?    ?            ?            ? daten
127877 4 drwxr-xr-x  2 peter sambauser 4096 Jan 17 16:56 progs
253963 4 drwxr-xr-x  2 root  root      4096 Jan 17 16:18 wetter

What can I do to repair the folder daten?

Greetings from the northsee

Peter

Given that I see that the drive mounted to the /media folder; is this a USB drive? CD/DVD disc? Which filesystem is this drive/disc formatted with?

What's telling is that it's not even giving you the permissions output for the same folder, and it's only complaining about that one folder. I suspect that the drive/disc maybe faulty and/or the filesystem is at least partly corrupted.

If it's a USB drive, then you could check the filesystem. But this depends on which filesystem it's formatted with, as to the best way to do that.

Peter18 03-14-2019 06:13 AM

Hello jsbjsb001, hello dc.901,

thank you for your answer.

It is a raspberry pi only whith SD. System is 2018-10-09-raspbian-stretch-lite. I don't know which file system. The folders in /media are used with samba. No usb, no disk.

Yesterday "ls /media -lisa" worked well. I tried to look at it via samba and got the information 'no permission'. When I tried to solve this today, the result I showed you. I think the filesystem is corrupted.

Greetings from the northsea

Peter

jsbjsb001 03-14-2019 07:04 AM

Post the results of the following command using CODE tags;

Code:

lsblk -f

fatmac 03-14-2019 07:10 AM

If it's a samba drive, there may be a problem with the server.

Peter18 03-14-2019 07:40 AM

Hello jsbjsb001, hello fatmac,

thank you again! May be it's a server problem, but some other folders are samba drives too, like progs.

Code:

NAME        FSTYPE LABEL  UUID                                MOUNTPOINT
mmcblk0
├─mmcblk0p1 vfat  boot  FBD8-71DF                            /boot
└─mmcblk0p2 ext4  rootfs e9646bf0-ef1f-4e8b-983b-c9f97f60e931 /

Greetings from the rainy north sea

Peter

jsbjsb001 03-14-2019 07:44 AM

I doubt it's a "server problem". I'd say it's either a drive and/or filesystem problem, particularly given what you said yourself (which is what I was also thinking myself).

Make sure your SD card is inserted when you run "lsblk -f", then re-post that output.

Peter18 03-14-2019 09:41 AM

Hello jsbjsb001,

thank you, but what do you mean with:
Quote:

Originally Posted by jsbjsb001 (Post 5973768)
Make sure your SD card is inserted when you run "lsblk -f", then re-post that output.

??

The sd is still inserted. The result is still the same.

Greetings from the rainy north sea

Peter

jsbjsb001 03-14-2019 09:49 AM

Sorry, because your posted /media/daten I wasn't sure if the output of "lsblk -f" you give before was for the drive in question.

Anyway, because it appears it was; then that would mean that it's the drive you have the system installed on, and therefore you would have to un-mount the drive to check it's filesystem - which you can't if it's the drive the system is installed and running on. So you'll have to use a "live system" to run fsck to check the filesystem on it, as from your output it's formatted with the ext4 filesystem.

You could also try checking it with smartctl -a /dev/mmcblk0 and see what (if anything) that turns up - that will check the hardware itself.

Peter18 03-14-2019 12:20 PM

Hello jsbjsb001,

thank you again!

I begin to work with unix. So, can you give me description how to du it? How to check an repair the file system or hardware??

Greetings from the rainy north sea

Peter

michaelk 03-14-2019 02:11 PM

I've never tried and do not know if it works but to force a fsck on boot you would need to add a kernel option to the /boot/cmdline.txt file.

fsck.mode=force

There are SD cards with SMART support and raspbian does include smartmontools but the odds are small it does.

It is possible just that directory has been corrupted and that deleting and restoring the data may work.

Peter18 03-15-2019 06:37 AM

Hello michaelk,

thank you for your answer!

"fsck" was still in the file "/boot/cmdline.txt". After a restart the folder "daten" was back and I can see it via samba.

Greetings from the still rainy north sea

Peter


All times are GMT -5. The time now is 06:42 AM.