I'm stuck trying to mount a USB drive on a Raspberry Pi (Wheezy). I've reformatted it (ext4) and tried re-mounting it in /media/owncloud
(following sudo chown -R pi:pi /media/owncloud
), but hit an error with the mount:
pi@raspberrypi /media $ sudo mount /dev/sda1 /media/owncloud -o uid=pi,gid=pi -t ext4
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
pi@raspberrypi /media $ dmesg | tail
[ 39.484660] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[ 47.116854] Adding 102396k swap on /var/swap. Priority:-1 extents:1 across:102396k SSFS
[ 310.473774] EXT4-fs (sda1): Unrecognized mount option "uid=1000" or missing value
[ 732.929020] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 1220.278044] EXT4-fs (sda1): Unrecognized mount option "uid=1000" or missing value
[ 1331.002350] FAT-fs (sda1): bogus number of reserved sectors
[ 1331.002394] FAT-fs (sda1): Can't find a valid FAT filesystem
[ 2050.397804] EXT4-fs (sda1): Unrecognized mount option "uid=1000" or missing value
[ 7973.889779] EXT4-fs (sda1): Unrecognized mount option "uid=1000" or missing value
[ 8019.644801] EXT4-fs (sda1): Unrecognized mount option "uid=1000" or missing value
Any idea what's causing this? I've tried one solution elsewhere (sudo e2fsck -f -b 32768 -y /dev/sda1
) which resulted in:
/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda1: 11/493856 files (0.0% non-contiguous), 68109/1974271 blocks
..but didn't fix the issue. Any ideas?
Best Answer
You can't use
-o uid=pi,gid=pi
withext4
; the following should work:The
uid
andgid
options are intended for filesystems which don't track ownership themselves (FAT for example).ext4
is a POSIX filesystem and keeps its own information about file ownership, so it doesn't need (and can't use)uid
andgid
options.