Last active
April 24, 2022 21:58
Revisions
-
seeekr revised this gist
Dec 11, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,3 +6,5 @@ btrfs rebalance command: http://askubuntu.com/a/412307 essence of that: don't use -mconvert=raid0 since that would mean "use raid0 for metadata also" which is not advisable running fdisk in non-interactive mode: http://xmodulo.com/how-to-run-fdisk-in-non-interactive-batch-mode.html additional docs by coreos that already point in the right direction and that are probably a candidate for introducing explicit information about getting up and running with RAID: https://coreos.com/docs/cluster-management/debugging/btrfs-troubleshooting/ -
seeekr revised this gist
Dec 11, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ sudo btrfs device add /dev/sdb1 /mnt # convert to raid of given type; don't use -mconvert=raid0 but not sure if it's beneficial to add -mconvert=raid1 when making a RAID1 (I think it might be!) sudo btrfs balance start -dconvert=raid$raidtype /mnt # might take a bit, depending on how much data there is to copy over # verify things have worked sudo btrfs fi df /mnt -
seeekr revised this gist
Dec 11, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ sudo mount /dev/disk/by-label/ROOT /mnt # add btrfs device sudo btrfs device add /dev/sdb1 /mnt # convert to raid of given type; don't use -mconvert=raid0 but not sure if it's beneficial to add -mconvert=raid1 when making a RAID1 (I think it might be!) sudo btrfs balance start -dconvert=raid$raidtype /mnt # should take a bit @@ -32,4 +32,5 @@ sudo btrfs fi df /mnt #Metadata, single: total=8.00MiB, used=0.00 #unknown, single: total=16.00MiB, used=0.00 # clean up sudo umount /mnt -
seeekr renamed this gist
Dec 11, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
seeekr revised this gist
Dec 11, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ original pointers from @marineam at https://github.com/coreos/docs/issues/222#issuecomment-66562561 btrfs adding devices and rebalancing: https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Adding_new_devices btrfs rebalance command: http://askubuntu.com/a/412307 -
seeekr created this gist
Dec 11, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ btrfs adding devices and rebalancing: https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Adding_new_devices btrfs rebalance command: http://askubuntu.com/a/412307 essence of that: don't use -mconvert=raid0 since that would mean "use raid0 for metadata also" which is not advisable running fdisk in non-interactive mode: http://xmodulo.com/how-to-run-fdisk-in-non-interactive-batch-mode.html This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ #!/bin/sh # replace with whatever your additional device is called # /dev/sda should be where your CoreOS install lives right now newdevice="/dev/sdb" # 0 or 1 raidtype="0" # make sure to download the single-partition.layout file as well # create single primary partition on $newdevice (you could also run fdisk interactively, choose p command and use defaults it suggests) sudo sfdisk $newdevice < single-partition.layout # mount current root; I suppose /dev/sda9 would work as well? sudo mount /dev/disk/by-label/ROOT /mnt # add btrfs device sudo btrfs device add /dev/sdb1 /mnt # convert to raid of given type sudo btrfs balance start -dconvert=raid$raidtype /mnt # should take a bit # verify things have worked sudo btrfs fi df /mnt # should show something like... #Data, RAID0: total=6.00GiB, used=303.25MiB #System, DUP: total=8.00MiB, used=16.00KiB #System, single: total=4.00MiB, used=0.00 #Metadata, DUP: total=108.06MiB, used=18.78MiB #Metadata, single: total=8.00MiB, used=0.00 #unknown, single: total=16.00MiB, used=0.00 sudo umount /mnt This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ # partition table of /dev/sdb unit: sectors /dev/sdb1 : start= 2048, size=937701040, Id=83 /dev/sdb2 : start= 0, size= 0, Id= 0 /dev/sdb3 : start= 0, size= 0, Id= 0 /dev/sdb4 : start= 0, size= 0, Id= 0