Announcement

Collapse
No announcement yet.

Running both pCP and LMS in RAM on RPI3

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Running both pCP and LMS in RAM on RPI3

    > So is there any way, to keep this property when the RPI is both running
    > pCP and LMS? Maybe the LMS writes can be moved to e.g. an attached USB
    > stick?


    The USB stick will suffer the same risk of getting corrupted as the SD
    card does. It won't solve that problem.

    --

    Michael

    #2
    Running both pCP and LMS in RAM on RPI3

    Hi all,

    I have been looking for the best software to turn my RPI3 into a music streamer for my HIFI system (through an USB DAC). It will mainly be used for Spotify premium, but might also in the future be for Tidal HIFI and maybe a few local FLAC files, just to try it out. Preferably it should be spotify connect, which seems to be possible with pCP. The very interesting points for me about the pCP, is its ability to run in RAM, making it safe to cut the power without proper shutdown, as I want to cut the power from the RPI based on the trigger of my amplifyer, as I do with many other devices e.g. my DAC.

    However, I do not have an always powered on PC/NAS or anything else, which can run the LMS. I basically want the RPI to be standalone, meaning the RPI should also run the necessary LMS. This however, will as I read it, violate the nice property of no SD card writes, and thereby the setup is not power safe anymore and can corrupt the SD card if the power is pulled in an write cycle.

    So is there any way, to keep this property when the RPI is both running pCP and LMS? Maybe the LMS writes can be moved to e.g. an attached USB stick? Is it only chache or also other things which needs to moved? Have anyone tried this?

    I hope someone can help me here

    Regards
    Jesper

    Comment


      #3
      Yes - you can configure the location of the LMS cache and put it on a USB device.

      When I tried it years ago it did not work if the USB was FAT formatted.
      But that might have changed. In any case - you can format the USB device as Ext4 or something else.
      Paul Webster
      Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
      and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

      Comment


        #4
        Thanks Paul,

        Yea, I have read this somewhere, but is that everything needed in order to have a power safe system, such that the SD card is never corrupted? I just install LMS on the SD card as normal, but just moves the cache and that is it?

        Comment


          #5
          Originally posted by mxjelle View Post
          Thanks Paul,

          Yea, I have read this somewhere, but is that everything needed in order to have a power safe system, such that the SD card is never corrupted? I just install LMS on the SD card as normal, but just moves the cache and that is it?
          Yes, you can move LMS cache to a USB device, but then if that device gets corrupted when you pull the power? But of course you will make regular backups.
          Server - LMS 8.4.0 RPi4B 4GB/NanoSound ONE case/pCP 8.1.0 - 75K library, playlists & LMS cache on Sata SSD (ntfs)

          Lounge - DAC32 - AudioEngine B2
          Office - RPi 3B+/HiFiBerry DAC HAT/RPi screen - Edifier D12
          Bedroom - Echo Show 8

          Spares - 1xSB Touch, 1xSB3, 4xRPi, AVI DM5 speakers

          Comment


            #6
            Should mean less writes to the SD card though which might make it last longer - and less chance of it failing to boot because of corruption and potentially easier to back up the USB disk than it is to get the SD card out of a box.

            However, I still run mine entirely via SD.
            Paul Webster
            Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
            and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

            Comment


              #7
              File system corruption causing a boot failure is the only significant concern. But that can be fixed with a keyboard and monitor. One of these days I'll make that automatic if corrupted.
              piCorePlayer a small player for the Raspberry Pi in RAM.
              Homepage: https://www.picoreplayer.org

              Please donate if you like the piCorePlayer

              Comment


                #8
                Thanks for your replies!

                I see that it does not solve the problem by moving it to an USB stick, as this can also be corrupted, it is just a write to another source which is not properly closed before shutoff. But IF I move the cache to an USB stick, will I then be sure that the SD card will not corrupt? In this case I guess it will mean, that given a corruption of the USB stick, none of the configurations and the installation itself are lost. If this happens, I should only format the USB stick and plug it back in, without restoring an old backup of it, as it is only used for cache and anything will be back to normal?

                @paul- Can you elaborate a bit further on this. This seems very interesting and if it would be possible to do that automatically, such that it has a selfrepairing feature, without configuration and so on being lost, it would be AWESOME!

                Comment


                  #9
                  Originally posted by mxjelle View Post
                  Thanks for your replies!

                  I see that it does not solve the problem by moving it to an USB stick, as this can also be corrupted, it is just a write to another source which is not properly closed before shutoff. But IF I move the cache to an USB stick, will I then be sure that the SD card will not corrupt? In this case I guess it will mean, that given a corruption of the USB stick, none of the configurations and the installation itself are lost. If this happens, I should only format the USB stick and plug it back in, without restoring an old backup of it, as it is only used for cache and anything will be back to normal?

                  @paul- Can you elaborate a bit further on this. This seems very interesting and if it would be possible to do that automatically, such that it has a selfrepairing feature, without configuration and so on being lost, it would be AWESOME!
                  No, all LMS player configurations, plugins, database, prefs, favourites artwork etc. are stored in the cache, if the USB device is corrupted you would need to set LMS up again. You can backup the cache on a USB device without removing it from the pi using SAMBA, which is easily configured in the pCP interface.
                  Server - LMS 8.4.0 RPi4B 4GB/NanoSound ONE case/pCP 8.1.0 - 75K library, playlists & LMS cache on Sata SSD (ntfs)

                  Lounge - DAC32 - AudioEngine B2
                  Office - RPi 3B+/HiFiBerry DAC HAT/RPi screen - Edifier D12
                  Bedroom - Echo Show 8

                  Spares - 1xSB Touch, 1xSB3, 4xRPi, AVI DM5 speakers

                  Comment


                    #10
                    To add to above post.

                    Reformatting an SD card and setting up pCP is trivial compared to having to redo LMS player configurations, favourites, plugins, etc..
                    Server - LMS 8.4.0 RPi4B 4GB/NanoSound ONE case/pCP 8.1.0 - 75K library, playlists & LMS cache on Sata SSD (ntfs)

                    Lounge - DAC32 - AudioEngine B2
                    Office - RPi 3B+/HiFiBerry DAC HAT/RPi screen - Edifier D12
                    Bedroom - Echo Show 8

                    Spares - 1xSB Touch, 1xSB3, 4xRPi, AVI DM5 speakers

                    Comment


                      #11
                      Running fsck automatically would only going to fix the file system. It cannot fix the database/server config files, if corrupted.

                      ext3/4 is much more robust in error handling than fat32. Making a 3rd ext4 partition on your SD card for LMS is probably the best option.
                      piCorePlayer a small player for the Raspberry Pi in RAM.
                      Homepage: https://www.picoreplayer.org

                      Please donate if you like the piCorePlayer

                      Comment

                      Working...
                      X