0

I have made a NAS Server with my Raspberry Pi and this works great with a NTFS Formatted External Harddisk, but when the RPi is not correctly shut down, it makes a mess with the filesystem. When I boot the system back up, it hangs on following command:

pi@raspberrypi ~ $ sudo fdisk -l

Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes
4 heads, 16 sectors/track, 242560 cylinders, total 15523840 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: 0x000c45c9

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880     6399999     3138560   83  Linux
[Green pointer stucks here]

It also won't write on my external disk anymore. All write commands on "dev/sda1" are ignored with errors.

When i plug the drive in my PC, it opens without any problems.

I have also formatted the drive as "ext4", but the RPi doesn't seem to support "ext4" (It doesn't show the disk in the list).

What can I do to prevent this "mess"? Windows can read the drive and the RPi doesn't... WHYY??

Thanks in advance.

EDIT: I have plugged the disc into a Windows computer and let it "Scan for errors". It have found no errors, but now it recognizes the disk:

pi@raspberrypi ~ $ sudo fdisk -l

Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes
4 heads, 16 sectors/track, 242560 cylinders, total 15523840 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: 0x000c45c9

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880     6399999     3138560   83  Linux

Disk /dev/sda: 1000.2 GB, 1000170586112 bytes
255 heads, 63 sectors/track, 121597 cylinders, total 1953458176 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: 0x00023f15

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   976730111   488364032    7  HPFS/NTFS/exFAT
/dev/sda2       976730112  1953454079   488361984    7  HPFS/NTFS/exFAT
pi@raspberrypi ~ $

This makes no sense at all. But how I have said: It only works now... When I power the RPi abruptly down and back up, I will be facing the same problem again.

Anyone who can explain this?

  • Can you get results with df -lh Does cat /etc/fstab return anything of use? Do you use ntfs-3g to mount the ntfs drive? – Havnar Feb 1 '15 at 12:35
  • Yes, I have installed ntfs-3g. I have "Cheked the drive for errors" on Windows and it said it has no errors. The drive is new, it can't be damaged! – Fusseldieb Feb 1 '15 at 13:24
  • Is it mounted? Or can you Mount it,but without results? – Havnar Feb 1 '15 at 14:54
  • I can't mount it. It hangs. – Fusseldieb Feb 1 '15 at 15:01
1

Firstly, whatever filesystem or OS, you should always shut down correctly (or risk disk corruption).

I would not use NTFS on Linux.

  1. Journalling is not supported by Linux, and many do not even support write. Journalling allows the OS to correct filesystem errors, and your Windows system is probably fixing itself, although it obviously would not find a journal from Linux.
  2. NTFS does not support 'NIX attributes. This may not matter for a NAS, but it better to use a native filesystem.

You would be better to use ext4. Your claim that the Pi doesn't seem to support ext4 is not credible, as this is the default native filesystem, and has support for journalling. How are you trying to create this?

  • 1
    I using the drive to build a NAS server. I have now EXT4 formatted and it seems to work flawlessly. Thanks. – Fusseldieb Feb 2 '15 at 5:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.