Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
tech:ubuntu_replace_disk [17-Nov-2013 1:24pm] – Corrected rsync source path and added error checking iantech:ubuntu_replace_disk [18-Nov-2013 12:11pm] (current) – Swapped fdisk to parted for disks greater than 2TB ian
Line 3: Line 3:
 In the unlucky event that one of your data disks starts to show [[wp>S.M.A.R.T.]] errors warning of its decline, or you are just running out of storage space, this article describes how to provision a new disk and migrate the data to replace the old one. In the unlucky event that one of your data disks starts to show [[wp>S.M.A.R.T.]] errors warning of its decline, or you are just running out of storage space, this article describes how to provision a new disk and migrate the data to replace the old one.
  
-<note tip>This guide assumes your old disk has a single partition, is formatted with the EXT4 file-system and is mounted at /srv during boot.</note>+<note tip>This guide assumes your old disk has a single partition, is formatted with the EXT4 file-system and is mounted at /srv during boot.  If this is not the case, some of the commands below may need appropriate modifications for your environment.</note>
  
 ===== Supported Releases ===== ===== Supported Releases =====
Line 44: Line 44:
 Now create a partition on the new disk using: Now create a partition on the new disk using:
  
-<code>fdisk /dev/sdx</code>+<code>parted /dev/sdx</code>
  
-The fdisk menu will appear.  Use the commands in the following order to complete the task:+If your new disk is 2TB or below, complete the command as follows:
  
-  - "n" to create a new parition +<code> 
-  - "p" for a primary partition +mklabel msdos 
-  "1" for the first partition +mkpart pri 1 -1 
-  "w" to write the partition table back to the disk and exit+quit 
 +</code> 
 + 
 +If your new disk is larger than 2TB, complete the command as follows: 
 + 
 +<code> 
 +mklabel gpt 
 +mkpart pri 1 -
 +quit 
 +</code>
  
 Now format the new partition using: Now format the new partition using: