Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: paul_NZ on March 10, 2011, 12:28:19 AM

Title: [SOLVED] Losing /media/usbdisk fstab entry
Post by: paul_NZ on March 10, 2011, 12:28:19 AM
Two seperate SME 7.5.1 servers both fully updated will all updates including those released just the other day.

Both use built in back to to workstation to local USB (actually to internal RDX drives) ... backups/system have worked perfectly for over 12 months (whole systems only 14 months old) until three days ago when the /media/usbdisk entry in fstab is lost.

The only way i know of automatically restoring this line is to run post-upgrade followed by reboot (I know you can manually add the line to fstab but i have used the method above to ensure 'the system' is seeing the RDX, etc 'normally'.

Backup then works fine for next backup but not anymore as the line /media/usbdisk is lost.

I have a number of other servers with identical setups and just as uptodate using same RX drives and backup and this problem does not exist with them.

Where or how would I start to investigate a permanent solution to this issue.

Thanks for your support in advance.
Title: Re: Losing /media/usbdisk fstab entry
Post by: chris burnat on March 10, 2011, 09:49:19 AM
Paul,
This probably should go to the Bugtracker, please open a bug and provide as much information as you can, including servers history.
Thanks
Title: Re: Losing /media/usbdisk fstab entry
Post by: paul_NZ on March 11, 2011, 05:48:25 AM
This probably should go to the Bugtracker, please open a bug and provide as much information as you can, including servers history.

Done as requested

http://bugs.contribs.org/show_bug.cgi?id=6555
Title: Re: Losing /media/usbdisk fstab entry
Post by: wellsi on March 15, 2011, 09:35:53 AM
The latest from Bugzilla is that this is a problem introduced by a recent update to 'hal'. There is a potential solution listed in the bug, although investigations are still ongoing.
Title: Re: Losing /media/usbdisk fstab entry
Post by: arnoldob on September 30, 2011, 06:13:26 PM
It appears that this restores the fstab entries and allows my USB backups to run:
service haldaemon restart

Since this is an issue with an upstream package and no fix is on the horizon, this may help...
Title: Re: Losing /media/usbdisk fstab entry
Post by: philbrearley on October 05, 2011, 11:05:15 PM
As this problem has been outstanding for several months and some users are reluctant to apply updates as it will break their backups, I have come up the following interim solution.

This problem is caused by the upstream update to hal
   hal.i386                      0.4.2-9.el4_8          updates
As this is coming from CentOs and no update is forthcoming, everytime we apply updates we must back off the hal update as per the following:
Check which version of hal is installed using
   rpm -qa hal
If it is the 0.4.2-9.el4_8 version we must remove it with
   rpm -e --nodeps hal
Then re-install the 0.4.2-8.EL4 version with
   yum install hal --disablerepo=updates
when complete we can check with
    rpm -qa hal
This should show hal.i386 0.4.2-8.EL4

Now we must prevent the next yum update installing the 0.4.2-9 version
Make a custom template:
   mkdir -p /etc/e-smith/templates-custom/etc/yum.conf
   echo "exclude=hal*" > /etc/e-smith/templates-custom/etc/yum.conf/15main_exclude_hal
Expand the template and restart haldaemon
   expand-template /etc/yum.conf
   service haldaemon restart
If you are at all unsure you can always signal-event post-upgrade; signal-event reboot

Once the upstream update for hal has been fixed all you need to do is delete the template and fragment then expand the template as above
You can then run yum update as normal.

Phil Brearley
Title: Re: Losing /media/usbdisk fstab entry
Post by: bhamail on February 08, 2012, 03:24:12 AM
I reverted to the older version of hal, and rebooted. I still get the same error when trying to restore from my local usb disk (labeled 'rocosmebk'):

Code: [Select]
Restore server configuration from workstation backup

Unable to mount workstation shared folder mount: can't find /media/rocosmebk in /etc/fstab or /etc/mtab

Is there some other step needed to make SME see the usb disk to allow me to restore? SME backup does show this disk in the config page.
I've recently had a catastrophic disk failure - I suspect due to a flaky sata controller w/ raid 6 - and I'm trying to restore to fresh SME install.
I've reinstalled SME, run 'yum update', reverted 'hal', rebooted, and dis- and re-connected the usb disk.

The same as other reports, I can manually mount the usb disk and see it's content. I just can't get SME to do a workstation restore from the usb disk.

My fstab:

Code: [Select]
# cat /etc/fstab
#------------------------------------------------------------
# BE CAREFUL WHEN MODIFYING THIS FILE! It is updated automatically
# by the SME server software. A few entries are updated during
# the template processing of the file and white space is removed,
# but otherwise changes to the file are preserved.
# For more information, see http://www.e-smith.org/custom/ and
# the template fragments in /etc/e-smith/templates/etc/fstab/.
#
# copyright (C) 2002 Mitel Networks Corporation
#------------------------------------------------------------
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/main/root          /                       ext3    usrquota,grpquota        1 1
/dev/md1                /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/main/swap          swap                    swap    defaults        0 0
/dev/scd0               /media/cdrecorder       auto    pamconsole,exec,noauto,managed 0 0
/dev/sdg1               /media/rocosmebk        ext3    pamconsole,exec,noauto,managed 0 0

Title: Re: Losing /media/usbdisk fstab entry
Post by: philbrearley on February 08, 2012, 07:32:25 PM
bhamail

As can be seen from your fstab the USB disk is being recognised, but before you can restore from your USB disk you must configure the workstation backup to point to it. Your restore should then work.

The only other thought that comes to mind is the problem when using older versions of Firefox to update in Server manager see bug http://bugs.contribs.org/show_bug.cgi?id=6512

good luck

Phil Brearley
Title: Re: Losing /media/usbdisk fstab entry
Post by: bhamail on February 09, 2012, 05:57:33 AM
Hi Phil,

Thanks for the reply. Unfortunately, I knew about the extra carriage-return in a browser combo-box issue (found it the hard way a long time ago using a beta of Chrome). I'm pretty sure that is not the issue.

Also, I had configured the workstation backup to point to my usb drive, as per below (copied from summary page):
Code: [Select]
Configure Workstation Backup

This panel displays the present workstation backup configuration. You can change it in this panel and the next one.

Backup is Disabled.
Backup is made on local USB disk
Destination backup share folder is media/rocosmebk
Number of rotating backup sets is 3
Number of daily backups contained in each set is 7
Compression level (0-9) of backup is 6
Daily backup occurs at 22:30
Each daily backup session is cleanly timed out after 8 hours.except full backups which are cleanly timed out after 24 hours
Full backup session (new backup sets) is allowed only on Saturday

Note: Backup is disabled here because I don't want backups of the newly installed server to overwrite the backup I'm trying to restore from. In any case, I also tried to restore with the backup 'enabled'.

Here is what is stored in the database:
Code: [Select]
# grep SmbShare /home/e-smith/db/configuration
backupwk=service|BackupTime|22:30|Compression|6|CompressionProg|gzip|DaysInSet|7|FullDay|6|IncOnlyTimeout|yes|Login||Password||P|Timeout|8|VFSType|usb|status|disabled|SmbShare|media/rocosmebk

Any other suggestions?

Dan

PS: some more info:

My original version of e-smith-backup was:
# rpm -q e-smith-backup
e-smith-backup-2.0.0-32.el4.sme

I just updated to a non-released version in the testing repo:
# rpm -q e-smith-backup
e-smith-backup-2.0.0-37.el4.sme

With this testing version, I no longer get the error:
Unable to mount workstation shared folder mount:...

I'm not certain if this updated version required the older 'hal' or not, but I can report that with the older 'hal' installed, the testing version appears to work. (The restore is running now... fingers crossed).


Update:

Just wanted to report the dar restore from usb using the e-smith-backup from the 'testing' repo worked. So here's my vote to release that package to production. :)
Title: Re: Losing /media/usbdisk fstab entry
Post by: chris burnat on March 16, 2012, 08:34:27 AM
Update:
Just wanted to report the dar restore from usb using the e-smith-backup from the 'testing' repo worked. So here's my vote to release that package to production. :)

bhamail,
e-smith-backup-2.0.0-37.el4.sme was released recently in version 7xx smeupdates. 
It would be good if you (and/or others) could confirm that this package is fixing this issue.

Please also report your findings in the Bugtracker:
http://bugs.contribs.org/show_bug.cgi?id=6555

Thanks.

Note: there exist an issue with updates of version 7.xx at the moment, check workaround here:
http://forums.contribs.org/index.php/topic,48409.0.html
Title: Re: Losing /media/usbdisk fstab entry
Post by: bhamail on March 16, 2012, 05:03:30 PM
Hi Chris,

I confirmed the restore issue is fixed (and reported it) in this bug:

http://bugs.contribs.org/show_bug.cgi?id=6845


Not sure if 6845 should be linked to the bug you mentioned.

Dan

Code: [Select]
Dan Rollo 2012-02-14 23:04:42 MST
Just wanted to report the dar restore from usb using the e-smith-backup from the 'testing' repo worked. So here's my vote to release that package to production. :)

Dan Rollo 2012-02-09 23:27:59 MST
some more info:

My original version of e-smith-backup was:
# rpm -q e-smith-backup
e-smith-backup-2.0.0-32.el4.sme

I just updated to a non-released version in the testing repo:
# rpm -q e-smith-backup
e-smith-backup-2.0.0-37.el4.sme

With this testing version, I no longer get the error:
Unable to mount workstation shared folder mount:...

I'm not certain if this updated version required the older 'hal' or not, but I can report that with the older 'hal' installed, the testing version appears to work. (The restore is running now... fingers crossed).
Title: Re: Losing /media/usbdisk fstab entry - simple workaround
Post by: chris burnat on March 21, 2012, 09:30:29 AM
It appears that this restores the fstab entries and allows my USB backups to run:
service haldaemon restart

Since this is an issue with an upstream package and no fix is on the horizon, this may help...

This is correct, thanks arnoldob!

Testing:

a) Load 7.6WIP fresh from CD
[Note: also tested with 7.51 systems, OK.]

b) Perform backup
- Attempt backup from console to USB, cannot detect USB

#Because:
[root@test76wip ~]# rpm -q hal
hal-0.4.2-9.el4_8

c)Remedial
 - Insert USB when requested by console backup, and from a terminal logged as root issue following command:

[root@test76wip ~]# service haldaemon restart
Stopping HAL daemon:                                       [  OK  ]
Starting HAL daemon:                                       [  OK  ]

[root@test76wip ~]# tail -50 /var/log/messages
[snip]
Mar 21 18:35:29 test76wip haldaemon: haldaemon -TERM succeeded
Mar 21 18:35:32 test76wip haldaemon: haldaemon startup succeeded
Mar 21 18:35:32 test76wip fstab-sync[5402]: removed all generated mount points
Mar 21 18:35:33 test76wip fstab-sync[5419]: added mount point /media/cdrecorder for /dev/hdb
Mar 21 18:35:33 test76wip fstab-sync[5456]: added mount point /media/backup for /dev/sda1
Mar 21 18:35:36 test76wip kernel: kjournald starting.  Commit interval 5 seconds
Mar 21 18:35:36 test76wip kernel: EXT3-fs warning: checktime reached, running e2fsck is recommended
Mar 21 18:35:36 test76wip kernel: EXT3 FS on sda1, internal journal
Mar 21 18:35:36 test76wip kernel: EXT3-fs: mounted filesystem with ordered data mode.
Mar 21 18:38:44 test76wip kernel: usb 1-6: USB disconnect, address 3
Mar 21 18:38:44 test76wip udevd[1076]: udev done!
Mar 21 18:38:47 test76wip fstab-sync[5574]: removed mount point /media/backup for /dev/sda1
Mar 21 18:38:56 test76wip haldaemon: haldaemon -TERM succeeded
Mar 21 18:38:59 test76wip haldaemon: haldaemon startup succeeded
Mar 21 18:38:59 test76wip fstab-sync[5681]: removed all generated mount points
Mar 21 18:39:00 test76wip fstab-sync[5698]: added mount point /media/cdrecorder for /dev/hdb

d) Perform backup to USB

e) Check backup:
[root@test76wip ~]# service haldaemon restart
Stopping HAL daemon:                                       [  OK  ]
Starting HAL daemon:                                       [  OK  ]

[root@test76wip ~]# mount /dev/sda1
[root@test76wip ~]# ll /media/backup/
total 132
-rw-r--r--  1 root root 128604 Mar 21 18:42 smeserver.tgz


Title: Re: Losing /media/usbdisk fstab entry [FIXED!]
Post by: chris burnat on March 23, 2012, 12:50:46 AM
The Dev Team (Shad) has just released  a new package fixing this issue, please refer:
http://bugs.contribs.org/show_bug.cgi?id=6555

Package information:
Fixed in hal-0.4.2-9.0.sme
* Thu Mar 22 2012 - Shad L. Lords <slords@mail.com> 0.4.2-9.0.sme
- Bump version so usb plug-n-play works [SME: 6555]

This package should be available over the next few days when performing a regular update, after which all issues with USB should be resolved, no need for workarounds.