{"id":833,"date":"2017-08-30T11:52:46","date_gmt":"2017-08-30T17:52:46","guid":{"rendered":"https:\/\/wmbuck.net\/blog\/?p=833"},"modified":"2020-05-23T11:08:28","modified_gmt":"2020-05-23T17:08:28","slug":"adjusting-the-size-of-the-tarragondata-volume","status":"publish","type":"post","link":"https:\/\/wmbuck.net\/blog\/?p=833","title":{"rendered":"Adjusting the size of the tarragondata volume"},"content":{"rendered":"<p align=\"left\"><span style=\"font-size: medium;\">At one point I was getting low on space on tarragondata, so I added an additional physical device to the btrfs filesystem containing tarragondata. <\/span><\/p>\n<pre><span style=\"font-size: small;\">[root@tarragon backup_scripts]# btrfs fi show<\/span>\n<span style=\"font-size: small;\">Label: 'tarragon_data' uuid: d6e4b6fc-8745-4e6e-b6b4-8548142b5154<\/span>\n<span style=\"font-size: small;\"> Total devices 2 FS bytes used 92.04GiB<\/span>\n<span style=\"font-size: small;\"> devid 1 size 120.00GiB used 120.00GiB path \/dev\/xvdf1<\/span>\n<span style=\"font-size: small;\"> devid 2 size 30.00GiB used 30.00GiB path \/dev\/xvdg<\/span><\/pre>\n<p align=\"left\"><span style=\"font-size: medium;\">This is fine, but there are a couple of problems. The main one is that I can no longer use the EC2 snapshot capability on tarragondata, which meant that the nightly EC2 snapshot feature I was using had to be deimplemented. <\/span><\/p>\n<p align=\"left\"><span style=\"font-size: medium;\">But now I am about to create a new tarragon instance, and it would be really helpful to be able to snapshot tarragondata (Amazon snapshot, not btrfs snapshot) and then create a new Amazon volume with a consistent snapshot for testing. <\/span><!--more--><\/p>\n<p align=\"left\"><span style=\"font-size: medium;\">So to do that, I am going to use the btrfs feature of adding and removing physical volumes to consolidate tarragondata on a single physical volume. <\/span><\/p>\n<p align=\"left\"><span style=\"font-size: medium;\">Steps are: <\/span><\/p>\n<p><span style=\"font-size: medium;\">1) create a new 150GB physical volume in Amazon EC2 dashboard, and attach it to tarragon.<\/span><\/p>\n<p><span style=\"font-size: medium;\">2) On tarragon, add the new physical volume to the tarragondata btrfs filesystem.<\/span><\/p>\n<pre><span style=\"font-size: small;\"> btrfs device add \/dev\/xvdh \/mnt\/tarragondata<\/span><\/pre>\n<p><span style=\"font-size: medium;\">3) Remove the older smaller physical devices one at a time:<\/span><\/p>\n<pre><span style=\"font-size: small;\"> btrfs device delete \/dev\/xvdg \/mnt\/tarragondata<\/span>\n<span style=\"font-size: small;\"> btrfs device delete \/dev\/xvdf1 \/mnt\/tarragondata<\/span><\/pre>\n<p align=\"left\"><span style=\"font-size: medium;\">This successfully moved all the data and metadata to a new 150GB drive, which enabled me to snapshot it. <\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>At one point I was getting low on space on tarragondata, so I added an additional physical device to the btrfs filesystem containing tarragondata. [root@tarragon backup_scripts]# btrfs fi show Label: &#8216;tarragon_data&#8217; uuid: d6e4b6fc-8745-4e6e-b6b4-8548142b5154 Total devices 2 FS bytes used 92.04GiB devid 1 size 120.00GiB used 120.00GiB path \/dev\/xvdf1 devid 2 size 30.00GiB used 30.00GiB path &hellip; <a href=\"https:\/\/wmbuck.net\/blog\/?p=833\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Adjusting the size of the tarragondata volume<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,40,54,10,4],"tags":[],"class_list":["post-833","post","type-post","status-publish","format-standard","hentry","category-backup","category-boot-issues","category-btrfs","category-fedora","category-linux"],"_links":{"self":[{"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/833"}],"collection":[{"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=833"}],"version-history":[{"count":2,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/833\/revisions"}],"predecessor-version":[{"id":891,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/833\/revisions\/891"}],"wp:attachment":[{"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}