[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: a quick fstab questions



notoneofmyseeds wrote:
> Bob, thanks for your very informed response, from which I'm learning a lot.

Happy to help.

> Bob Proulx wrote:
> > You haven't really included enough information in the thread yet.  You
> > are mounting an ext4 file system over a USB disk.  What, in general,
> > is on the disk?  Is only your own data?  Is it the root of an
> > operating system?  This is rather important.  If I suggest a recursive
> > chmod it will destroy an operating system.  But if it is only your own
> > data files, an external $HOME backup for example, then that is fine.
>
> Here's a copy from the initial post that says what I'm trying to do. And to

I read the original posting.  But that still didn't say what was on
the disk you were trying to mount.  That is okay but when we on the
mailing list work with partial information the quality of the answers
are also only partial.  :-(

> be more specific: on the disk is just data. It's not the root of an OS. Now

Great!  That is what was needed.  Just a data disk of yours with only
your own files on it.

> And after putting this line in fstab, it still won't work:
> /dev/sdb2: LABEL="300gb" UUID="02db0acc-97b3-40b8-b9a1-f6d5fee78e1f" ext4 -o
> uid=1000,gid=1000,utf8$

The uid and gid are FAT32 mount options not ext4 mount options.  Read
the man page and see the FILESYSTEM-SPECIFIC MOUNT OPTIONS sections
for each of the different file system types.

  man 8 mount

Since you are using ext4 you can only use options from the "Mount
options for ext4" section plus the FILESYSTEM-INDEPENDENT MOUNT
OPTIONS section.

> My current fstab concerning the line: /dev/sdb2 /media/a3a3/300gb ext4
> rw,user,noauto 0 0

That looks okay to me.  Assuming /media/a3a3 already exists and /media
has reasonable permissions.  (Permissions on /media/a3a3 will be
overlayed by the mount point and the permissions of the mounted device.)

> Thanks for your input. I was about to try this last chown command but
> thought I'd wait and see if I'm on the right track on that.
> 
> Currently this command "rsync -av /mnt/media/a3a3/300gb/
> /media/a3a3/duopro/New/"
> 
> Gives this: "sent 20 bytes  received 12 bytes  64.00 bytes/sec
> total size is 0  speedup is 0.00
> rsync error: some files/attrs were not transferred (see previous errors)
> (code 23) at main.c(1183) [sender=3.1.1]"
> 
> None of the "fixes" online have solved the "code 23" error.

"code 23" is bad!  There should have been error messages printed
concerning the files that were unable to be copied.

  man rsync

       23     Partial transfer due to error

You are having device errors!  Check your syslog for kernel messages.
I suspect you will see I/O errors logged there.

  less /var/log/syslog

However usb enclosures are notoriously cheap and flakey.  Don't panic
yet.  Instead verify everything.  Make sure you have a good USB port.
I have seen different USB ports on the same computer to be trouble.
One will work okay and another will fail.

Unmount and try using a different USB port.  Or try mounting and
checking on a different computer system.

Or in more of a deep case I have removed the internal disk from
failing enclosures and mounted them directly with SATA and IDE cables.
The disk is often fine.  More often I have had the USB enclosure fail.
Accessing the drive directly over SATA / IDE eliminates the USB
enclosure electroncs and for me has more than once completely solved
the problem.

Check the disk SMART error log.  Here are some hints.

  smartctl -l error /dev/sdb | less

  smartctl -a /dev/sdb | less

  smartctl -t short /dev/sdb
  sleep 120 && smartctl -l selftest /dev/sdb

  smartctl -t long /dev/sdb
  sleep $((60*20)) && smartctl -l selftest /dev/sdb

  smartctl -a /dev/sdb

If it really looks like a disk problem then copy as much as you can
off the disk.  For deeper rescue contemplate using ddrescue to extract
as much raw data from the drive as possible.  More information about
ddrescue is available if needed.  If the drive is failing then I would
copy the raw drive and then fsck the new copy.  Or if you have rsync
copied as many files as practical already then you already have as
much as you will get and stop there.  Working at the file system level
with rsync is much easier than trying to rescue raw bits of a file
system.

Good luck!

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: