1

Running Ubuntu 14.04.1 up to date.

Besides a ZFS pool I'm using for my data, I have my root partition on a mirrored software raid, and would like to move to two larger disks.

Here is my parted output:

Model: ATA Samsung SSD 840 (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  105MB   104MB                         bios_grub
 2      105MB   367MB   262MB   fat32                 boot
 3      367MB   8961MB  8594MB  linux-swap(v1)
 4      8961MB  120GB   111GB   ext4                  raid


Model: ATA Samsung SSD 840 (scsi)
Disk /dev/sdb: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  105MB   104MB                         bios_grub
 2      105MB   367MB   262MB   fat32                 boot
 3      367MB   8961MB  8594MB  linux-swap(v1)
 4      8961MB  120GB   111GB   ext4                  raid

What would be the safest way to move to two new disks for /dev/sda and /dev/sdb

Would this be correct?

  1. Install the two new disks (lets assume /dev/sdc and /dev/sdd) (i'd take my zfspool physically offline due to a shortage of SATA ports)
  2. Boot to an Ubuntu Live CD.
  3. Use GParted to create GPT Partition Tables on each of the new disks and create the same partition sizes, besides the last partition leveraging the new size.
  4. Create two new mirrored raids using md, and mount them
  5. Copy all the data from each of the md mounts to the new disks
  6. Modify /etc/fstab to point to the new UUIDs
  7. Shutdown and remove the older disks.
  8. Boot up, and hope and pray I did it right?

I'm sure I'm missing or incorrect in some things. My motherboard is UEFI capable, and I believe I'm using it since I have a mounted /boot/efi on /dev/sda2

Does this play a part in making sure my grub is configured correctly for the new disks?

Any other info needed?

Thanks for your input!

0

If you have a desktop, you can add all the drives and ignore the "swapping" steps below; just replace the last "swap" with "take out the old drives"

  1. Swap the secondary hard disk with one of the new hard disks
  2. Boot the Clonezilla LiveCD,
  3. Do a disk2disk, from the old HD to the new one (and put a little sticker on it with "New 1")
  4. Shut down
  5. Swap: Take out the old and new hard disk, insert the secondary old and secondary new HD
  6. Do a disk2disk, from the old HD to the new one (another sticker etc)
  7. Shut down
  8. Swap: insert the first new hard drive (taking out the secondary old one)
  9. Boot normally. (Everything should work at this stage, you now have a new software RAID with spare unallocated partitions. If not, re-insert the old HD and drop me a comment @fabby)
  10. Boot gparted live (or Ubuntu live and start gparted, my option is much faster)
  11. Extend your partitions
  12. If this takes more then 2 minutes, go to sleep as it will take a while; better do it before going to bed)
  13. Boot normally, and be amazed at your own prowess! ;-)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.