I set my storage hard disk to auto-mount at start up, using fstab options, but sometimes (when my computer has been on for awhile) the storage hard disk will unmount by itself…any ideas?
I have already tried replacing the hard disk multiple times, and I switched from Kubuntu to Opensuse. (partially because of this)
This occurance only appears after I have had the hard disk for awhile. (Western Digital Caviar Green series)
I do plan to upgrade to OpenSuse 11.3, but I’m not sure if that will help with this
>
> I set my storage hard disk to auto-mount at start up, using fstab
> options, but sometimes (when my computer has been on for awhile) the
> storage hard disk will unmount by itself…any ideas?
I am assuming this is a USB or firewire connection? Maybe it just goes
to sleep? Regardless, check dmesg output, it’ll tell you what
happened.
When you say something like "I set my storage hard disk to auto-mount at start up, using fstab options:, please confirm this with the contents of /etc/fstab (between CODE tags) thus everybody can see what you did, what it looks like and eventualy comment on it. You may be right that you did it correct and thus not worthfull to show, but the other end, you have a problem and thus might have missed something that another might see. No chance when the others see nothing (clairvoyance apart).
The last entry is the hard disk in question, my storage hard disk.
Today, while booting, fsck attempted to scan my storage hard disk, and the disk REFUSED to mount.
(the only way I was able to boot into KDE, was commenting-out the storage hard disk in fstab with nano)
I got the following error message from fsck:
No such file or directory while trying to open /dev/disk/by-id/ata-WDC_WD20EADS-00S2B0_WD-WCAVY1508297-part1 /media/storage ext4
The superblock could not be read or does not describe a correct EXT2 filesystem.
This error messages was unexpected because
The storage hard disk is using the EXT4 filesystem, not EXT2.
This is the THIRD hard disk I have purchased from Western Digital, that has had this exact same problem. And Western Digital is a brand that’s usually cited as being reliable.
I will not be able to solve all the strange things you and we see here. Jus t a few remarks to begin with.
The last entry in /etc/fstab is shown above as two lines. Is this a problem with copy/paste or is this real. It should be one line.
EXT2/3/4 are basicaly the same file systems, but upwards having more features. E.g. EXT3 is EXT2 + journaling. This means that something as basic as the superblock is the same for all of them and that basic part of code in the driver is the same for all of them (and probably did not change a long time, thus that nobody even bothered to change the error message).
But when the superblock is broken this is fatal.
I agree with you that a damaged superblock for the third time with disks of a reliable brand is not very likely. And why the superblock every time? It is just a place on disk as evry place, thusI would expect the disk being damaged randomly, not allways on the superblock.
The obvious question is, what special things you do to that disk? I trust, you do not throw it out ofthe window every other day, but do you remoce it and put it in another system? Do you boot other systems inthe same system? It realy looks if something is written straight to the partition. Is the partition table still valid (look with* fdisk -l*). When yes it is not something writing over the start of the disk, but over the start of the partition.
A very different remark from me is: why do you mount these disks on mount points inside /media? That is the place for HAL to mount removables. I do not think HAL worries to much about it, but it seems not logical to me. But it may be very logical to you, and you decide .
> pjessen;2191074 Wrote:
>>
>> I am assuming this is a USB or firewire connection? Maybe it just
>> goes to sleep? Regardless, check dmesg output, it’ll tell you what
>> happened.
>
> No, it’s an internal SATA hard disk.
>
> I’ve near heard of an internal SATA hard disk going to sleep…?
>
Yep, they can go to sleep too, but that won’t cause them to unmount.
> /dev/disk/by-id/ata-WDC_WD20EADS-00S2B0_WD-WCAVY1508297-part1
> /media/storage ext4
> user,acl 1 2
>
> The last entry is the hard disk in question, my storage hard disk.
> [snip]
> Today, during an fsck, the storage hard disk REFUSED to mount.
That doesn’t really make sense - nothing is mounted during an fsck. You
must have meant something else.
> I got the following error message from fsck:
>
>> No such file or directory while trying to open
>> /dev/disk/by-id/ata-WDC_WD20EADS-00S2B0_WD-WCAVY1508297-part1
>> /media/storage ext4
>>
>> The superblock could not be read or does not describe a correct EXT2
>> filesystem.
How did you run the fsck? “fsck -t ext4 /dev/disk/…” ?
I thought it was a copy/paste issue, but when I checked the actual fstab file, the line-break was there too.
After fixing this line-break…the superblock issue was gone.
I tried restarting the computer twice, and could not reproduce the previous superblock issue…
But it doesn’t make sense, isn’t “superblock” a part of the hardware? Why would a fstab change fix that?
To me, I feel like there is a still an issue somewhere, but I’m not sure why changing my fstab would stop my boot-up fsck issue.
Thanks for explaining.
I had a feeling that this was the case, but I wanted to check.
That’s what I’m confused about.
After trying your suggestion, I can access this hard disk perfectly.
And I haven’t noticed any errors the last couple times I rebooted…
That’s what I was thinking; if it was a hardware issue, why would it keep occuring with a reliable brand?
I don’t physically move the hard disk anywhere else, but there is one possiblity.
My storage disk is constantly the destination for bittorrent / http / etc downloads.
Frequently, I am downloading several gigabytes to my storage disk.
So I’m certainly creating a lot of i/o on the storage disk, but I don’t understand why regular usage of a hard disk would cause it wear out SO QUICKLY.
I specfifically bought the Cavier Green model from Western Digital, because that model and company have a reliable reputation.
I’m not sure what you mean by “straight to the partition.”
How else would I write data, if not straight into the partition where it’s stored?
Here’s my output of fdisk -l
Disk /dev/sda: 300.1 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000cbd6a
Device Boot Start End Blocks Id System
/dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sda2 * 263 36481 290929117+ 83 Linux
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00085d38
Device Boot Start End Blocks Id System
/dev/sdb1 1 243201 1953512001 83 Linux
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000da455
Device Boot Start End Blocks Id System
/dev/sdc1 1 121601 976760001 83 Linux
Well quite simply, I’d always noticed automatically mounted media appearing in /media/ so I thought it would be a good place for my internal hard disks.
And since Linux didn’t complain, I never worried about it.
Do you know of a better place to mount hard disks to?
And if so, why would you say that such a place was more benefical?
That’s interesting.
Sorry, I didn’t mean “mount,” I meant that the method that fsck uses to scan my hard disk wasn’t functioning at that time.
Fsck was automatically run by the boot process.
I can’t seem to retrieve the dmesg related to this problem, because the problem occurred long enough in the past, that it is no longer in my dmesg log.
You have given elaborate answers, but the main thing is that it works (for the moment? let we hope forever!).
The superblock is not hardware it is the starting point of the administration of the file system.
When a disk is partitioned (most of the cases for you) there can be a file system on every one of them. Writing iinformation to de device from the beginning will destroy it. Thus: do not write to /dev/sdc1 because you will destroy the file system on it.
But the disk intself is of course also there and starts with the partition table. Thus: do not write to /dev/sdc because you will destroy the the partition table.
And of course the more you write the more you destroy.
And now your problem. I can not completely explain it, but it is a fact that there was one not complete entry in /etc/fstab and one very silly entry.
I hope that everybody reading this will see the advantage of me always asking for computer output between CODE tags. rotfl! rotfl!
> Ademos wrote:
>
> > pjessen;2191074 Wrote:
> >>
> >> I am assuming this is a USB or firewire connection? Maybe it just
> >> goes to sleep? Regardless, check dmesg output, it’ll tell you what
> >> happened.
> >
> > No, it’s an internal SATA hard disk.
> >
> > I’ve near heard of an internal SATA hard disk going to sleep…?
>
> Yep, they can go to sleep too, but that won’t cause them to unmount.
But they are mounted in /media. Things could be different because of
that. The automounter could think that they are not needed anymore and
umount them.
I would move those to /mnt instead. Or /data.
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Minas Tirith))
> On 2010-07-19 18:36 GMT Per Jessen wrote:
>
>> Ademos wrote:
>>
>> > pjessen;2191074 Wrote:
>> >>
>> >> I am assuming this is a USB or firewire connection? Maybe it just
>> >> goes to sleep? Regardless, check dmesg output, it’ll tell you
>> >> what happened.
>> >
>> > No, it’s an internal SATA hard disk.
>> >
>> > I’ve near heard of an internal SATA hard disk going to sleep…?
>>
>> Yep, they can go to sleep too, but that won’t cause them to unmount.
>
> But they are mounted in /media.
Uh, why would that be? My internal SATA disks are certainly not - they
are mounted where I have put them in fstab.
> Things could be different because of that. The automounter could think
> that they are not needed anymore and umount them.
> I would move those to /mnt instead. Or /data.
I’m lost. We ARE talking about INTERNAL harddrives that are not
connected or disconnected willy-nilly?
The automounter is not involved at all here. We are talking about HAL/DeviceKit mounting on behalf of the GUI user. That is a very different thing from automounter (see* man automount*).
And HAL will not unmount things in /media when it can not find it in his administration.
The only reason I asked is because many people, who never have used Unix/Linux have very minimal knowledge of the power of the Unix/Linux way of mounting, where mounting is done inside the one and only directory tree on the most apropriate point. And from the point in time that the mounting is done, the end-user does not need knowledge about this mounting. (S)he just walks through the directory tree, changing from partition to partition without further involvement.
> Carlos E. R. wrote:
>
> > On 2010-07-19 18:36 GMT Per Jessen wrote:
> >> > I’ve near heard of an internal SATA hard disk going to sleep…?
> >>
> >> Yep, they can go to sleep too, but that won’t cause them to
> >> unmount.
> >
> > But they are mounted in /media.
>
> Uh, why would that be? My internal SATA disks are certainly not -
> they are mounted where I have put them in fstab.
The user defined entries in fstab for those partitions of an internal
disk to be mounted on /media. Why he did that I have no idea, but it is
wrong.
> > Things could be different because of that. The automounter could
> > think that they are not needed anymore and umount them.
> > I would move those to /mnt instead. Or /data.
>
> I’m lost. We ARE talking about INTERNAL harddrives that are not
> connected or disconnected willy-nilly?
Yes, I understand they are internal disks on SATA.
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Minas Tirith))
>
> Carlos E. R.;2193370 Wrote:
> > On 2010-07-19 18:36 GMT Per Jessen wrote:
> >
> > But they are mounted in /media. Things could be different because of
> > that. The automounter could think that they are not needed anymore
> > and umount them.
> >
> > I would move those to /mnt instead. Or /data.
> >
> >
> The -automounter- is not involved at all here. We are talking about
> HAL/DeviceKit mounting on behalf of the GUI user. That is a very
> different thing from -automounter- (see- man automount-).
I’m not talking about the software piece called “automount”, but the
automounter functionality included in both gnome and kde.
And I think that what ever daemon or program is doing that
functionality could be confused by a mount of something in HIS
directory, ie, /media, done by some other tool, user, app, whatever.
Creating entries in fstab for /media is wrong, IMO.
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Minas Tirith))
> On 2010-07-20 17:45 GMT Per Jessen wrote:
>
>> Carlos E. R. wrote:
>>
>> > On 2010-07-19 18:36 GMT Per Jessen wrote:
>
>
>> >> > I’ve near heard of an internal SATA hard disk going to sleep…?
>> >>
>> >> Yep, they can go to sleep too, but that won’t cause them to
>> >> unmount.
>> >
>> > But they are mounted in /media.
>>
>> Uh, why would that be? My internal SATA disks are certainly not -
>> they are mounted where I have put them in fstab.
>
> The user defined entries in fstab for those partitions of an internal
> disk to be mounted on /media. Why he did that I have no idea, but it
> is wrong.
Oh, I see. But that is irrelevant - he can mount them wherever he wants,
it won’t change the system behaviour wrt mount/unmount.
It may be only words, but it invests a lot of misunderstanding in people to talk about “automounting” all the time. The more while doing this “automatic” belongs to the domain of magic wherre end-users think that computers and magic are more or less the same. Thus:
. Automount is something introduced by Sun and is related to NFS/NIS;
. mount -a (that is done at boot and can be done later) mounts all entries in /etc/fstab, ecept when they have the noauto option (this misnomer may be the source of much misunderstanding here).
. mounting of “on the flight connected” mass storage devices by HAL, which is by no means automatic, but only after (one of the) loged in KDE/Gnome/? sessions asks for an action to be done (after asking the user). (Again this mounting often happens after the user clicks somewhere and thus implicitly tells HAL what he wants, this is seen as Magic by the end-user and thus called Automatic).
And again. mounting things in /media/* by other means then HAL might not be often done, but it will normaly not create much havoc. When you are first and HAL wants to use the same mountpoint, it will create another one (wth -1, -2, etc added to the name). The other way around (HAL using it nad the aother mount comeing later) can make you wonder what is happening.
>
> It may be only words, but it invests a lot of misunderstanding in
> people to talk about “automounting” all the time. The more while doing
> this “automatic” belongs to the domain of magic wherre end-users think
> that computers and magic are more or less the same. Thus:
> . Automount is something introduced by Sun and is related to NFS/NIS;
It is really just pedantry - I’ll bet you that less than 1% of the users
here have ever heard of ‘automount’ in the shape of nfs automounting.
Wow! There has been some HEATED debate about mounting hard disks in this thread!
Thank you EVERYONE for your interesting information.
hcvv: I DID run into a situation where HAL added a “-1” to my storage mount-point, because of the existing fstab settings. So thanks, it’s good to know about the conflicts of using /media/
pjessen: I am always happy to learn new information, pedantry or not. But thank you for your advice throughout this thread.
Carlos E. R.: After your suggestion and hcvv’s information, I have decided to mount my hard disks in /mnt/ Even if this doesn’t solve my problem, I learned that it’s generally a safer place to point my mounted hard disks.
Thanks again everyone!
I’m glad I was able to learn so much about this previously mysterious topic!
As I hesitate often to point to basic information, being afraid that the OP is allready more knowledgebale I did not point to SDB:Basics of partitions, filesystems, mount points - openSUSE, But there facts how HAL determines the names of it mount points (including …-1, etc.) is in there. May be there is more you like to know in this page.