This is what it had to be done
- Stop the instance
- Create a snapshot from the volume
- Create a new volume based on the snapshot increasing the size
- Check and remember the current's volume mount point (i.e. /dev/sda1)
- Detach current volume
- Attach the recently created volume to the instance, setting the exact mount point
- Restart the instance
-
Access via SSH to the instance and run
fdisk /dev/xvde
- Hit u to change display units tosectors
- Hit p to show current partitions
- Hit d to delete current partitions (if there are more than one, you have to delete one at a time) NOTE: Don't worry data is not lost
- Hit n to create a new partition
- Hit p to set it as primary
- Hit 1 to set the first cylinder (it musts be the same first cylinder of your old partition)
- Set the desired new space (if empty the whole space is reserved)
- Hit a to make it bootable
- Hit 1 and w to write changes
- Reboot instance
-
Log via SSH and run
resize2fs /dev/xvde1
-
Finally check the new space running
df -h
Revisions
- June 6, 2015 @ 16:54:36 [Current Revision] by admin
- June 6, 2015 @ 16:54:36 by admin
- June 6, 2015 @ 16:54:08 by admin
Revision Differences
June 6, 2015 @ 16:54:08 | Current Revision | ||
---|---|---|---|
Content | |||
Unchanged: <p> | Unchanged: <p> | ||
Unchanged: This is what it had to be done | Unchanged: This is what it had to be done | ||
Unchanged: </p> | Unchanged: </p> | ||
Unchanged: <ol> | Unchanged: <ol> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Stop the instance | Unchanged: Stop the instance | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Create a snapshot from the volume | Unchanged: Create a snapshot from the volume | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Create a new volume based on the snapshot increasing the size | Unchanged: Create a new volume based on the snapshot increasing the size | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Check and remember the current's volume mount point (i.e. /dev/sda1) | Unchanged: Check and remember the current's volume mount point (i.e. /dev/sda1) | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Detach current volume | Unchanged: Detach current volume | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Attach the recently created volume to the instance, setting the exact mount point | Unchanged: Attach the recently created volume to the instance, setting the exact mount point | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Restart the instance | Unchanged: Restart the instance | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Access via SSH to the instance and run <code>fdisk /dev/xvde</code> | Unchanged: Access via SSH to the instance and run <code>fdisk /dev/xvde</code> | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Deleted: Hit <kbd> | Added: Hit <kbd>u</kbd> to change display units tosectors | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Deleted: Hit <kbd> | Added: Hit <kbd>p</kbd> to show current partitions | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Hit <kbd>d</kbd> to delete current partitions (if there are more than one, you have to delete one at a time) NOTE: Don't worry data is not lost | Unchanged: Hit <kbd>d</kbd> to delete current partitions (if there are more than one, you have to delete one at a time) NOTE: Don't worry data is not lost | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Hit <kbd>n</kbd> to create a new partition | Unchanged: Hit <kbd>n</kbd> to create a new partition | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Hit <kbd>p</kbd> to set it as primary | Unchanged: Hit <kbd>p</kbd> to set it as primary | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Hit <kbd>1</kbd> to set the first cylinder (it musts be the same first cylinder of your old partition) | Unchanged: Hit <kbd>1</kbd> to set the first cylinder (it musts be the same first cylinder of your old partition) | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Set the desired new space (if empty the whole space is reserved) | Unchanged: Set the desired new space (if empty the whole space is reserved) | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Hit <kbd>a</kbd> to make it bootable | Unchanged: Hit <kbd>a</kbd> to make it bootable | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Hit <kbd>1</kbd> and <kbd>w</kbd> to write changes | Unchanged: Hit <kbd>1</kbd> and <kbd>w</kbd> to write changes | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Reboot instance | Unchanged: Reboot instance | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Log via SSH and run <code>resize2fs /dev/xvde1</code> | Unchanged: Log via SSH and run <code>resize2fs /dev/xvde1</code> | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | Unchanged: <li style="margin: 0px 0px 0.5em;padding: 0px;border: 0px;font-size: 15px"> | ||
Unchanged: Finally check the new space running <code>df -h</code> | Unchanged: Finally check the new space running <code>df -h</code> | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: </ol> | Unchanged: </ol> |
Note: Spaces may be added to comparison text to allow better line wrapping.
No comments yet.