Hifidelio-User.de

Das (inoffizielle!) Forum für Hifidelio-User
Aktuelle Zeit: 17.08.2018 09:43

Alle Zeiten sind UTC + 1 Stunde [ Sommerzeit ]




Ein neues Thema erstellen Auf das Thema antworten  [ 27 Beiträge ]  Gehe zu Seite Vorherige  1, 2
Autor Nachricht
 Betreff des Beitrags:
BeitragVerfasst: 15.02.2007 03:28 
Offline
Benutzeravatar

Registriert: 05.06.2006 00:38
Beiträge: 549
Wohnort: Südpfalz, DE
Dan,

Here are the relevant lines in the "usb_check" script:
Code:
DISKTYPE="`/opt/disktype/bin/disktype /dev/${PART} 2> /dev/null | sed -ne 4p`"
[ `echo "${DISKTYPE}" | grep -c "^Ext3"` == 1 ] && TYPE="EXT"
[...]
   elif [ "${TYPE}" == "EXT" ]; then
      mkdir -m 644 -p /usb/mnt/${USBNAME}
      mount -n -o ro /dev/${PART} /usb/mnt/${USBNAME}  || rm -rf /usb/mnt/${USBNAME}
[...]

The variable "TYPE" is only set to "EXT" if the filesystem is an "Ext3" one. Otherwise no mount action takes place.

The "mount" command itself uses the "-o ro" parameter explicitly to mount the ext3 filesystem read only. I could imagine that this is done for security reasons because the following "rm" command deletes the whole "/usb/mnt/${USBNAME}" directory if "mount" returns a non-zero exit status. If "mount" would succeed anyhow all the data on the external disk would get erased if the filesystem is mounted with "read/write" permissions.

I think you could automount your external usb drive safely in read/write mode by changing the line
Code:
mount -n -o ro /dev/${PART} /usb/mnt/${USBNAME}  || rm -rf /usb/mnt/${USBNAME}

to
Code:
mount -n /dev/${PART} /usb/mnt/${USBNAME}

but I haven't tried that out yet.

schim


Nach oben
 Profil  
 
 Betreff des Beitrags:
BeitragVerfasst: 17.02.2007 23:51 
Offline

Registriert: 25.01.2007 20:22
Beiträge: 28
Forgive my limited skills with Linux.

I understand what:
Code:
mount -n /dev/${PART} /usb/mnt/${USBNAME}

does.
Why did you remove the second part?:
Code:
|| rm -rf /usb/mnt/${USBNAME}


I assume that takes care of removing the directory to which the drive was mounted in the case that the drive was unavailable?

Thanks,
Dan


Nach oben
 Profil  
 
 Betreff des Beitrags:
BeitragVerfasst: 18.02.2007 00:17 
Offline

Registriert: 25.01.2007 20:22
Beiträge: 28
So I tried this without removing the
Zitat:
||rm ...
part of the command.
It works beautifully!

I am now able to backup to the ext3 drive using rsync.
I am not entirely sure why they made ext3 drives read only. I thought the entire purpose of a USB drive on the HF was for backups (at least since version 2.3 of the OS)? In fact, I thought my older ext3 drive worked as a read-write drive.

In any case, this works perfectly.

Thanks,
Dan


Nach oben
 Profil  
 
 Betreff des Beitrags:
BeitragVerfasst: 18.02.2007 17:15 
Offline
Benutzeravatar

Registriert: 05.06.2006 00:38
Beiträge: 549
Wohnort: Südpfalz, DE
Hi Dan,

I'm not a Linux crack either and I'm still puzzled about this line:
Code:
mount -n -o ro /dev/${PART} /usb/mnt/${USBNAME}  || rm -rf /usb/mnt/${USBNAME}

This means: if the "mount" command fails with a non-zero exit status the "/usb/mnt/${USBNAME}" directory gets erased afterwards.

But if you take a look at the mount commands for FAT:
Code:
mount -n -t vfat /dev/${PART} /usb/mnt/${USBNAME}

or HFS:
Code:
mount -n -t hfsplus /dev/${PART} /usb/mnt/${USBNAME}

there is no "rm" action at all.

Maybe Hermstedt can clarify things here if a developer reads this thread...

schim


Nach oben
 Profil  
 
 Betreff des Beitrags:
BeitragVerfasst: 18.02.2007 19:18 
Offline

Registriert: 25.01.2007 20:22
Beiträge: 28
I noticed that.
I still can't figure out why they would not want to make ext3 read/write. Given the fact that there are problems with file names under FAT32 that preclude using it as a robust backup solution, ext3 would seem to be the format of choice.

Anyway, I am happy to have a solution that works for me. Of course, I wonder how much of this will need to be redone every time I update the HF/Olive software.

Thanks again,
Dan


Nach oben
 Profil  
 
BeitragVerfasst: 20.02.2007 12:06 
Offline
Benutzeravatar

Registriert: 20.09.2006 21:12
Beiträge: 27
Wohnort: United Kingdom
I have been reading this thread with great interest, I have a spare IDE 3.5 HDD that I have mounted in an external box with a USB interface, I would like to try and use this drive to back up my HF unit as I am concerned about losing all my music, whilst I have the CD's, it's the time it has taken to encode them into FLAC on the HF unit that I am concerned about. I would be quite happy to make just a complete back up once every six months etc. I know this will take a very long time, but this is not a big issue as it can run in the background. My music collection is not growing that fast. Could some one kindly explain how I could do this using the equipment I currently have. I know the manufacturer has a backup disk, but it is very expensive and I have upgraded my HF to 400gb, so their back up disk is no use any way.

Can I just format the disk and then use the HF front panel to back up restore my music files, if so what is the procedure?

Any help would be greatly appreciated. :)

_________________
HiFiDelio driving into Valve (Tube) 6B4G Triode amplifier - Tomorrow meets yesterday.


Nach oben
 Profil  
 
 Betreff des Beitrags:
BeitragVerfasst: 21.02.2007 17:30 
Offline

Registriert: 25.01.2007 20:22
Beiträge: 28
Hi,
Do you have a way to format your drive as ext3? I did it using a WinXP machine with a utility from a company called Acronis.
In my experience, ext3 is best; FAT32 is recognized, but there are problems with the file names.
This drive will mount automatically (under HF 2.3 and higher), however, you need to make it into a read-write drive. That requires making the modifications to the file "/opt/Fidelio/bin/usb_check" (that Schim described above).
Once the system is restarted, the external drive should mount as read-write.

To do the backup, I have been using rsync as suggested by Gigi. This can be found in the downloads section of the forum and must be copied into the directory "/usr/local/bin/". You may also need to change the permissions on rsync to make it executable ("chmod 777 /usr/local/bin/rsync").

Finally, run rsync. It has an excellent man page available on line (google "rsync"). I have been using it as follows:
"rsync -av --size-only --delete /audio/music /usb/mnt/ExternalUSBDrivename/"

-a makes it a backup saving file attributes and copying all subdirectory contents
-v gives verbose feedback
--size-only ignores other file attributes like file time. I found this is essential. When you restore your files from the backup to the HF, you must import, which updates all of the file times. If you don't want to do an entirely new backup the next time, you must be sure to use this parameter.
--delete removes files on the USB drive that have been deleted from the HF music directory.
I hope this sufficiently detailed to help. Feel free to email or ask if I have left something out.
Dan


Nach oben
 Profil  
 
 Betreff des Beitrags: Back up assistance
BeitragVerfasst: 22.02.2007 15:00 
Offline
Benutzeravatar

Registriert: 20.09.2006 21:12
Beiträge: 27
Wohnort: United Kingdom
Thanks very much for your assistance - I will this a try over the weekend :P

_________________
HiFiDelio driving into Valve (Tube) 6B4G Triode amplifier - Tomorrow meets yesterday.


Nach oben
 Profil  
 
BeitragVerfasst: 04.03.2007 23:51 
Offline
Benutzeravatar

Registriert: 20.09.2006 21:12
Beiträge: 27
Wohnort: United Kingdom
Hi When I try and use the procedure to make a backup, everything runs fine for about 25 to 30 mins then the system seems to hang. rsync stops copying music files and then seems to just copy the music directories, but not the music files, or rsync indicates that it is copying the files, but the HDD activity light no longer flashes. When the drive is inspected, the files rsync says it has copied are not there. It often requires a full re-boot of the Hifidelio to get it to run again. Rsync does correctly pick up where it had failed, then deletes the part written files and continues the backup correctly. I suspect the problem is more on the Hifidelio side than rsync or the implimentation of rsync. There is not any error codes that I can report from rsync, not sure how to get at the error log in the Hifidelio. When others have tried this backup method, has it worked without problems, or have you had to run the backup several times to obtain a full back up. I have about 98gb of music files currently storred on the Hifidelio to back up.

Does anyone else have any experience with this back up?

Thanks to everyone for there help :)

_________________
HiFiDelio driving into Valve (Tube) 6B4G Triode amplifier - Tomorrow meets yesterday.


Nach oben
 Profil  
 
 Betreff des Beitrags:
BeitragVerfasst: 07.03.2007 04:58 
Offline

Registriert: 25.01.2007 20:22
Beiträge: 28
Hi,
I am currently running this on an HF (Olive Muscia) with more than 110 Gbytes of music. I am using rsync as I described it above, and it seems to work correctly. The only problem I had was when I failed to include the switch --size-only, which is required if you are doing a new backup immediately after restoring files by import.
Other than that, no worries.
What version of the HF OS are you running? Also, which version of rsync are your running?
Dan


Nach oben
 Profil  
 
 Betreff des Beitrags: Problesm with rsync back up
BeitragVerfasst: 07.03.2007 16:01 
Offline
Benutzeravatar

Registriert: 20.09.2006 21:12
Beiträge: 27
Wohnort: United Kingdom
Hi Dan, I am running 2.3.8 - after looking at this forum I decided to hold off on 2.3.9 and 2.3.10 until the problems with network seem to settle down. I downloaded Rsync from this web site, so not sure what version. It seems to run OK but then seems to have a write error, it is possible that it is the USB adaptor I have connected to the Drive that is at fault, I have a new one on order which is due on Friday, so I will try with this.

As far as I can see, rsync is working very well, I have restored a file as well, so no problems there. This does seem a good way to make a backup, the worst problem now I think as you pointed out earlier is that once you upgrade the system, the changes will have to be applied again after the upgrade. It's a shame that the Hifidelio team don't make this change or a similar change permanent to allow backups via this method - any thoughts Musikiss :)

Thanks for your help :D

_________________
HiFiDelio driving into Valve (Tube) 6B4G Triode amplifier - Tomorrow meets yesterday.


Nach oben
 Profil  
 
 Betreff des Beitrags:
BeitragVerfasst: 07.03.2007 17:33 
Offline

Registriert: 25.01.2007 20:22
Beiträge: 28
Hi,
I think it is possible that you are having a problem with your USB drive. Everything else seems to be the same as my setup, including the source of rsync.

I have had two thoughts about backing up and importing.

First, I wonder if it is possible to backup the database along with the music files. That way, during a restore, you could restore both the music and the database, removing the need for an import step. Anyone with experience in this? I would appreciate some feedback.

Second, I am thinking about adding my backup routine (which calls rsync) to the script that mounts the USB drive. That way, when I turn on the drive, resulting in an automount, the backup would run automatically. Alternatively, if someone knows whether it is possible to add a button to the page for the external hard drive (on the HF display) that would call the backup routine, that would be even better.

Any ideas?

Dan


Nach oben
 Profil  
 
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 27 Beiträge ]  Gehe zu Seite Vorherige  1, 2

Alle Zeiten sind UTC + 1 Stunde [ Sommerzeit ]


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.

Suche nach:
Gehe zu:  
cron
Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de