Announcement Announcement Module
Collapse
No announcement yet.
In-place upgrade from 2.2 to 2.3 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • In-place upgrade from 2.2 to 2.3

    At the moment it is my understanding that for VortexBox 2.3 it was not thought possible to upgrade from earlier versions of VortexBox because of changes Red Hat made to their Kickstart process.

    Whilst I've done limited testing I believe it's possible, with the right lines in an appropriate Kickstart configuration file, to upgrade a default install of VortexBox 2.2 to 2.3 without wiping the contents of /storage. By "default install" I mean the first 2.2 install option which creates a separate /storage partition and is the key to keeping it intact. Theoretically this should work for upgrading earlier versions of VortexBox if they have the same disk layout.

    Note that this is not an upgrade to 2.3 in the sense of upgrading individual packages, etc. but a fresh install of 2.3 over the top of 2.2 (but leaving /storage alone) thus removing the need to go through intermediate versions of Fedora. This (re)install does however mean that any custom configurations are not saved so would need to be redone but this is easier than re-ripping media or restoring files (though backups are always a good thing!).

    Whilst I've thought about providing a link here to my files (in addition to upgrades I have UK-specific installs too) I think that could be dangerous given that 2.3 is still in beta and I wouldn't want people upgrading to a beta release (although theoretically this upgrade process could also be used to upgrade from 2.3 RCx to 2.3 final).

    Andrew are you interested? If so, perhaps you could get in touch to discuss. I presume you can get my email address via these forums.

    HTH,
    Simon

  • #2
    This is a very interesting idea and it would be great if you figured out a way to do this.

    One thing I noticed is that the default root partition is about 30GB on VB 2.3, but only 20GB on VB 2.2. It would be great if the install could shrink the /storage Logical Volume by 10 GB and reallocate that space to the root partition. I don't know if this is possible or how hard it would be to implement, but it would be a very useful feature.

    I have written backup-dir and restore-dir scripts that I use to backup configuration files to /storage; e.g. backup-dir /etc/ /storage/vb backs up the contents of /etc/ to /storage/vb/etc. Other config directories that I backup to /storage are /var/lib/squeezeboxserver and /root.

    Using this script to backup config directories to /storage, and then an install which preserves /storage, will provide a very convenient upgrade path.

    I have a 9 TB VBA with more than 5 TB of video files. Backing up 3.8 TB of these files to a Seagate Backup Plus FAST 4TB USB 3.0 drive, using a USB 3.0 port on my VBA, takes about a week. It would be great if I could upgrade this system without destroying /storage. The Backup-to-USB/Restore-from-USB process is very long, even with the newest hardware, for libraries of this size.

    Comment


    • #3
      I am in a similar situation with only about 3 TB in /storage.

      I made a post on how to do this earlier but it was too long and became corrupted or otherwise damaged. I asked Andrew to delete it so I could redo that post. Now that the 2.3 version is almost complete, I think I should wait and include those final changes. It will take me about a week to complete testing and write up my results after 2.3 is released.

      The process is pretty straight forward but time consuming and not recommended for anyone expecting a scripted, hands-off upgrade.

      As in all endeavors of this sort... a full backup is still recommended.

      Comment


      • Veritae
        Veritae commented
        Editing a comment
        Here is the document I wrote about upgrading VB2.2 to VB2.3x.
        http://veritae.dyndns.org/ks/VB_Upgrade.odt

        Ii is in Libre Office ODT format. If desired I can post it in google Docs so it can be shared that way.

        I'd appreciate comments, particularly if there are issues and what you did to work around them.

        Veritae

    • #4
      I wait with bated breath!

      Comment


      • #5
        In my opinion an update process that changes the partition table is always risky regarding possible data loss. To avoid the backup/reload proceedure, I have separate discs for system and data in my configuration. So, the storage is not affected by the system upgrade. I strongly recommend this as standard for VBA's.

        Comment


        • Ron Olsen
          Ron Olsen commented
          Editing a comment
          Nice in theory, but not always possible in practice. I have a 9 TB VBA with three 3TB drives. 20GB of the first drive is the root partition; the rest of the first drive as well as the second and third drives are a Logical Volume comprising /storage.

          An install/upgrade process that preserves /storage, even if /storage spans multiple drives, would be very useful to me.

        • mmbecker
          mmbecker commented
          Editing a comment
          I see. In your case for sure it would be quite useful. However, I would setup such a VBA as follows: 1. small drive (maybe SSD) with /root; 2. RAID 0 with three 3TB drives mounted to /storage. In that case the system could be reinstalled without any danger for the data partition.

      • #6
        Sorry for delay in responding - I'm not getting email notifications when there are replies plus I've been working further on the upgrade process.

        Until today I had a Kickstart file that could upgrade a single-disk default install of VortexBox 2.2 (and I think 2.1 based on install files for that) by installing VortexBox 2.3 over the top of the existing install but not formatting /storage in the process.

        What has proved more difficult was handling upgrading multi-disk installs and I'm guessing Ron that your 9TB falls into this category.

        Anyway it now looks like I have another Kickstart file that can handle "upgrading" multi-disk installs as I've just upgraded a virtual install of VB2.2 with two disks to 2.3 preserving /storage. Whilst I've yet to test it the same file, possibly with a minor tweak, should also work for upgrading a three disk install.

        During all these "upgrades" the existing partition layouts and size are kept from the previous version but I don't think that should be a problem - whilst VB2.3 is set to install with a 30GB / partition it should be fine with 20GB. Any change there complicates things and I don't believe can easily be automated.

        As always backups are advisable but sometimes they're not practical.

        So of course the question is whether upgrades are of interest and how to test.

        Note my own recent VB setup has been from VB2.2 with mixed success on an Intel-based Mac mini (limited to Mac OS X v10.6.8) but it's VB2.3 that I've been using through the beta with a custom Kickstart file to fully use disk for / as I store files on a NAS. To upgrade I simply reinstall - coming up with a possible upgrade process has been a personal challenge but also a useful learning experience.

        HTH,
        Simon

        Comment


        • Ron Olsen
          Ron Olsen commented
          Editing a comment
          Thanks for your work on this, Simon. Please keep us updated on your progress.

      • #7
        I would be willing to test. I have a test box that is run headless. The vast majority of my access is ssh or browser. I have to pull it out of the rack and hook up to CD drive and KVM to do a clean install. I have a unRaid system that I can hold the kickstart file and simulate network based upgrade. Currently running VB2.3RC1.

        Comment


        • #8
          Okay I believe I now have a set of Kickstart files that can "upgrade" various installs of VortexBox 2.1 and 2.2 to 2.3 - if someone has an ISO for 2.0 I'm happy to test that too.

          As I said before "upgrade" is actually a full install of VortexBox 2.3 over the top of the previous version but it doesn't format the /storage partition so all media is kept. However any tweaks that you've made to config files will be lost unless you've previously backed them up (possibly to /storage).

          That various installs that I have Kickstart files for are the default (single disk) and 2 & 3 SATA disks RAID installs.

          Before I publicly release these I'd like some others to take a look so I'll contact some users directly.

          HTH,
          Simon

          Comment


          • #9
            Thanks, Simon! What's the best way to use your kickstart files? I presume I should modify isolinux/isolinux.cfg in vortexbox-2.3.iso to include your additional kickstart options, and then create a new ISO. Do you have an isolinux.cfg file already set up with your kickstart options? Or is there another way to use the kickstart files?

            Comment


            • #10
              Actually I've hosted some kickstart files on my web server such that I just modify the kickstart location by editing the proper grub menu entry at time of install.

              Comment


              • #11
                Thanks for the info. Simon has his kickstart files on his webserver, so the grub menu entry modification would work. After some trial and error, I was able to create an ISO image and burn it to a CD with five installation options. The first two are the standard VortexBox install options, and the last three use Simon's kickstart files for a one, two, and three disk upgrade that preserves /storage.

                Here is the isolinux.cfg file I created to produce the above install menu:
                Code:
                default vesamenu.c32
                #prompt 1
                #timeout 600
                display boot.msg
                menu background splash.jpg
                menu title Welcome to VortexBox 2.3 MENU ROWS 10
                menu TABMSGROW 16
                MENU CMDLINEROW 16
                MENU HELPMSGROW 18
                menu color border 0 #ffffffff #00000000
                menu color sel 7 #ffffffff #ff000000
                menu color title 0 #ffffffff #00000000
                menu color tabmsg 0 #ffffffff #00000000
                menu color unsel 0 #ffffffff #00000000
                menu color hotsel 0 #ff000000 #ffffffff
                menu color hotkey 7 #ffffffff #ff000000
                menu color scrollbar 0 #ffffffff #00000000
                
                label default
                menu label ^Install VortexBox
                kernel vmlinuz
                append initrd=initrd.img net.ifnames=0 biosdevname=0 ks=http://yum.vortexbox.org/ks/ks_f20_vb.cfg
                TEXT HELP
                WARNING: This will format your hard drive and destroy all data on your system!
                ENDTEXT
                
                label small
                menu label ^Small 2GB+ install (flash, SSD, VM, etc.)
                kernel vmlinuz
                append initrd=initrd.img net.ifnames=0 biosdevname=0 ks=http://yum.vortexbox.org/ks/ks_f20_vb_small.cfg
                TEXT HELP
                WARNING: This will format your hard drive and destroy all data on your system!
                ENDTEXT
                
                label upgrade1
                menu label ^Upgrade VortexBox (one disk)
                kernel vmlinuz
                append initrd=initrd.img net.ifnames=0 biosdevname=0 ks=http://gromit.csi.cam.ac.uk/vb/ks_f20_vb_upgrade.cfg
                TEXT HELP
                WARNING: This will create a new root partion and destroy all its data,
                         but leave the storage partition unchanged.
                ENDTEXT
                
                label upgrade2
                menu label ^Upgrade VortexBox (two SATA disks)
                kernel vmlinuz   append initrd=initrd.img net.ifnames=0 biosdevname=0 ks=http://gromit.csi.cam.ac.uk/vb/ks_f20_vb_upgrade_sata2disk.cfg
                TEXT HELP
                WARNING: This will create a new root partion and destroy all its data,
                         but leave the storage partition unchanged.
                ENDTEXT
                
                label upgrade3
                menu label ^Upgrade VortexBox (three SATA disks)
                kernel vmlinuz   append initrd=initrd.img net.ifnames=0 biosdevname=0 ks=http://gromit.csi.cam.ac.uk/vb/ks_f20_vb_upgrade_sata3disk.cfg
                TEXT HELP
                WARNING: This will create a new root partion and destroy all its data,
                         but leave the storage partition unchanged.
                ENDTEXT
                However, I ran into a problem trying to do the one disk upgrade on my backup VBA on which I had already installed the VB 2.3 RC2 ISO. The standard VB 2.3 install, unlike VB 2.2 install, only uses a Logical Volume for the /storage partition, but not for the root partition or swap partition. I don't think it even creates a swap partition, from what I can see. Here is the relevant part of the ks_f20_vb_upgrade.cfg kickstart file that caused the problem:
                Code:
                # Now Construct the partitioning include file for dynamic parts
                
                cat >/tmp/include-parts<<EOF
                ignoredisk --only-use=$primary
                bootloader --location=mbr --boot-drive=$primary
                clearpart --none
                
                part biosboot --fstype=biosboot --onpart=${primary}1
                part /boot --asprimary --fstype=ext4 --onpart=${primary}2
                part pv.01 --onpart=${primary}3 --noformat
                volgroup VolGroup --pesize=32768 --noformat
                logvol swap --fstype=swap --name=lv_swap --vgname=VolGroup --useexisting
                logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup --useexisting
                logvol /storage --fstype=ext4 --name=lv_storage --vgname=VolGroup --noformat
                EOF
                The error message was
                Code:
                storage configuration failed: The following problem occurred on line 9 of the kickstart file:
                Specified nonexistent LV lv_swap in logvol command.
                I presume there also would have been an error on line 10, complaining about the nonexistent LV lv_root.

                Can this kickstart file be modified so it works to reinstall over a VB 2.3 system, as well as upgrade a VB 2.2 system?
                It would be great if it could figure out whether or not the root partition was on a Logical Volume or not, and if the swap partition was on a Logical Volume or not, or if there is a swap partition at all (I don't think there is one in the standard VB 2.3 install).

                Any ideas?
                Attached Files

                Comment


                • #12
                  Firstly there's no need to create a new ISO as you can simply hit the [Tab] key when booting from VB2.3 CD and change the URL "on the fly" - guess I should have mentioned that!

                  As for your errors trying to upgrade VB2.3 RC2, I've forgotten that with VB2.3 the partitions and LVM have changed. The simplest (and easiest) "fix" is to create another Kickstart file to handle that although I think it would be nice if the the current single disk upgrade file could handle both scenarios (which should be possible with some scripting). I'll sort the former later this morning.

                  Simon

                  Comment


                  • Ron Olsen
                    Ron Olsen commented
                    Editing a comment
                    Thanks for the info; I'll keep that in mind for future tests. However, figuring out how to create a new isolinux.cfg and a new bootable ISO was a good learning experience. A new ISO with your upgrade options is something that will be very useful to VB users who want to upgrade to VB 2.3 without modifying /storage. Selecting an install option is a lot easier and less trouble prone than typing in the URL to one of your kickstart files.

                • #13
                  FYI I've now updated the single disk upgrade Kickstart file to deal with upgrading both VB2.3 Beta/RC and pre-VB2.3 to VB2.3.
                  Simon

                  Comment


                  • Ron Olsen
                    Ron Olsen commented
                    Editing a comment
                    Tested your new single-disk upgrade Kickstart file on a VB 2.3 RC2 > VB 2.3 upgrade, and it worked well! /storage was preserved. Using LMS to play a FLAC album that I had on /storage before the upgrade. All working as it should!

                • #14
                  Originally posted by simonflood View Post
                  FYI I've now updated the single disk upgrade Kickstart file to deal with upgrading both VB2.3 Beta/RC and pre-VB2.3 to VB2.3.
                  Simon
                  Great! This is exactly what's needed. Being able to use the same kickstart file for VB 2.2 > VB 2.3 upgrades and VB 2.3 > VB 2.3 reinstalls will be extremely useful! I'll test this on my existing VB 2.3 RC2 VBA and report back. I will also reinstall VB 2.2 on that VBA and try the upgrade again to verify that your new kickstart file works in both cases.

                  Thanks for your work on this, Simon!

                  Comment


                  • #15
                    It should also work for VB 2.1 > VB2.3.
                    If someone has an ISO for VB 2.0 I'll be happy to check that too.
                    I don't think I need to worry about VB 1.x ... do I?
                    Simon

                    Comment

                    Working...
                    X