Easy upgrade hdd

    • Easy upgrade hdd

      Hi,

      I think I have a simple questions; how can I easy upgrade a hdd?

      The hdd which I want to replace is a data disk where I have installed Owncloud, a simple website with MySql and my SabNZB downloads.
      As an example in SabNZB I have to specify the data directories. When I install a new hdd, the mount directory is different which means I have to reconfigure SabNZB (and also OwnCloud and my website).

      Is the an easy way to keep the same mount directory?
    • Re: Easy upgrade hdd

      There are (at least) three methods.

      1. Use clonezilla to clone the partition to a new drive.
      [*]Power down omv and use any linux system or SystemRescueCD to start the clone process
      [*]Plug in the old and the new drive
      [*]Run clonezilla to clone the partition
      [*]After it has finished, grow the partition with gparted (and include the grow option for ext4).
      [*]Plug the drive back into OMV and restart. You should be fine.

      If both drive fit in your OMV case, you also could run your System with SystemRescueCD in the box, reducing the effort to plug in and out the drives. But please make sure that not both drives are active in your OMV environment. That will not work.


      2. Copy and set UUID of the new disk to the value from the old one.
      [*]make sure, your partition is mounted by UUID

      Source Code

      1. root@openmediavault:~# cat /etc/fstab
      2. # >>> [openmediavault]
      3. [color=#FF0040]UUID=ec1576a1-90c8-47a5-bd11-f5bf89dee05e[/color] /media/ec1576a1-90c8-47a5-bd11-f5bf89dee05e ext4 defaults,nouser_xattr,noatime,data=writeback,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0 2
      4. # <<< [openmediavault]

      [*]Find out the current UUID of your exiting disk

      Source Code

      1. root@openmediavault:~# blkid /dev/sde1
      2. /dev/sde1: UUID="[color=#FF0040]938b4767-55a3-4c29-9b59-9e6a169ba92c[/color]" TYPE="ext4"

      or for LVM

      Source Code

      1. root@openmediavault:~# blkid /dev/mapper/vg01-lvol01
      2. /dev/mapper/vg01-lvol01: LABEL="storage" UUID="[color=#FF0040]ec1576a1-90c8-47a5-bd11-f5bf89dee05e[/color]" TYPE="ext4"

      [*]copy all data to the new/bigger disk after creating a partition.
      [*]unplug old disk and have only new disk in the system - make sure the new disk is not mounted.
      [*]change blockid of new disk to the old value

      Source Code

      1. tune2fs –U "[color=#FF0040]ec1576a1-90c8-47a5-bd11-f5bf89dee05e[/color]" [color=#FF0000]/dev/sde1[/color]



      3. Setup a mirror of your existing disk - put in the new disk, remove the old disk and then grow the raid to the new size.
      Everything is possible, sometimes it requires Google to find out how.