Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. First of all, create a snapshot of your EBS volume. Then out of that snapshot you will be able to create your new volume.
  2.  
  3. However, when you detach the old one from your instance and attach the new one, you will still see the old available space with `df`
  4.  
  5. look at my `/dev/xvdf/` available space (after mounting the new EBS volume)
  6.  
  7. ```
  8. ubuntu@ip-10-47-167-74:~$ df -h
  9. Filesystem Size Used Avail Use% Mounted on
  10. /dev/xvda1 16G 5.9G 9.1G 40% /
  11. udev 7.4G 12K 7.4G 1% /dev
  12. tmpfs 1.5G 176K 1.5G 1% /run
  13. none 5.0M 0 5.0M 0% /run/lock
  14. none 7.4G 0 7.4G 0% /run/shm
  15. /dev/xvdf 20G 19G 1.7G 92% /media/ebs/data <<< this one
  16. ```
  17. still 20G, I mounted a 80G one!
  18.  
  19. This drive has been formatted to use an `xfs` file system. In order to resize it, this is the command I used:
  20. ```
  21. sudo xfs_growfs -d /media/ebs/data
  22. ```
  23.  
  24. output should be something like this
  25. ```
  26. ubuntu@ip-10-47-167-74:~$ sudo xfs_growfs -d /media/ebs/data
  27. meta-data=/dev/xvdf isize=256 agcount=4, agsize=1310720 blks
  28. = sectsz=512 attr=2
  29. data = bsize=4096 blocks=5242880, imaxpct=25
  30. = sunit=0 swidth=0 blks
  31. naming =version 2 bsize=4096 ascii-ci=0
  32. log =internal bsize=4096 blocks=2560, version=2
  33. = sectsz=512 sunit=0 blks, lazy-count=1
  34. realtime =none extsz=4096 blocks=0, rtextents=0
  35. data blocks changed from 5242880 to 20971520
  36. ```
  37.  
  38. now let's see the `df -h` output
  39. ```
  40. ubuntu@ip-10-47-167-74:~$ df -h
  41. Filesystem Size Used Avail Use% Mounted on
  42. /dev/xvda1 16G 5.9G 9.1G 40% /
  43. udev 7.4G 12K 7.4G 1% /dev
  44. tmpfs 1.5G 176K 1.5G 1% /run
  45. none 5.0M 0 5.0M 0% /run/lock
  46. none 7.4G 0 7.4G 0% /run/shm
  47. /dev/xvdf 80G 19G 62G 23% /media/ebs/data
  48. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement