My Blitz is running smooth as a butter on BTRFS. I have a question: What if i need to change the flash drive? Looked up the documentation but, there isn't a clear answer. Objective is only to swap the flash drive for a new one in case of a failure or not. Reason, need to know the implications and how to do it.
Here's a thought:
Will there be a mount point issue? Will the Blitz recognize it as the old drive without any issues? If not then how can we do this.
OR, say you are upgrading or just flash the SD card and go through the recovery setup, will it recognise the new flash drive as the old flash drive?
We can add this to the documentation.
Changing the HDD is called "Migration" - see: https://github.com/rootzoll/raspiblitz/blob/v1.6/README.md#import-a-migration-file ... is this what you were searching for?
No, my Blitz is running fine, data is safe. I only want to change the USB - everything else stays the same. If i do MIGRATION i'll have to COPY or SYNC new data, I don't want to do that.
After a full backup (MIGRATION FILE)
you can try:
$ sudo config.scripts/blitz.datadrive.sh status# RASPIBLITZ DATA DRIVE Status
# BASICS
isMounted=1
isBTRFS=1
hddRaspiData=1
isSSD=1
datadisk='sda'
datapartition='sda1'
hddBlocksBitcoin=1
hddBlocksLitecoin=0
hddBytes=32212237312
hddGigaBytes=29
hddUsedInfo='13% & 50%'
# RAID
isRaid=1
raidHddDev='sda1'
raidUsbDev='sdb'
# SWAP
isSwapExternal=1
SwapExternalPath='/mnt/temp/swapfile'
sudo config.scripts/blitz.datadrive.sh raid off# RAID - Removing raid drive to RaspiBlitz data drive
# removing USB DEV from RAID
...should take some time
# OK - RaspiBlitz data is not running in RAID1 anymore
Double check that:
$ sudo config.scripts/blitz.datadrive.sh status
should show:
isRaid=0
When synced up again I successfully used these steps.
lsblksdbNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
鈹溾攢sda1 8:1 0 30G 0 part /mnt/hdd
鈹溾攢sda2 8:2 0 867.5G 0 part /mnt/storage
鈹斺攢sda3 8:3 0 34G 0 part /mnt/temp
sdb 8:16 1 119.3G 0 disk
mmcblk0 179:0 0 29.7G 0 disk
鈹溾攢mmcblk0p1 179:1 0 256M 0 part /boot
鈹斺攢mmcblk0p2 179:2 0 29.5G 0 part /
$ sudo config.scripts/blitz.datadrive.sh status
# RASPIBLITZ DATA DRIVE Status
# BASICS
isMounted=1
isBTRFS=1
hddRaspiData=1
isSSD=1
datadisk='sda'
datapartition='sda1'
hddBlocksBitcoin=1
hddBlocksLitecoin=0
hddBytes=32212237312
hddGigaBytes=29
hddUsedInfo='3% & 50%'
# RAID
isRaid=0
raidCandidate[0]='sdb 119 GB SanDisk'
raidCandidates=1
# SWAP
isSwapExternal=1
SwapExternalPath='/mnt/temp/swapfile'
$ sudo config.scripts/blitz.datadrive.sh raid on sdbif the drive is not empty will need to remove and format it.:
$ sudo /home/admin/config.scripts/blitz.datadrive.sh raid on sdb
# RAID - Adding raid drive to RaspiBlitz data drive
# ERROR: !! NOT IMPLEMENTED YET -> devices seem contain old data
# if you dont care about that data: format on other computer with FAT
error='old data on dev'
# RAID - Adding raid drive to RaspiBlitz data drive
# adding sdb as BTRFS raid1 for /mnt/hdd
~ 15 MIN
# OK - sdb is now part of a RAID1 for your RaspiBlitz data
$ sudo config.scripts/blitz.datadrive.sh status
# RASPIBLITZ DATA DRIVE Status
# BASICS
isMounted=1
isBTRFS=1
hddRaspiData=1
isSSD=1
datadisk='sda'
datapartition='sda1'
hddBlocksBitcoin=1
hddBlocksLitecoin=0
hddBytes=32212237312
hddGigaBytes=29
hddUsedInfo='13% & 50%'
# RAID
isRaid=1
raidHddDev='sda1'
raidUsbDev='sdb'
# SWAP
isSwapExternal=1
SwapExternalPath='/mnt/temp/swapfile'
Note this entry about the type of pendrive to use (USB SSD is recommended):
https://github.com/rootzoll/raspiblitz/issues/924
Wow! Thank you for the detailed response @openoms . Might have to get a new USB drive. If i upgrade to 1.6.1 now and follow the steps later to change the drive, it should work, correct?
Wow! Thank you for the detailed response @openoms . Might have to get a new USB drive. If i upgrade to 1.6.1 now and follow the steps later to change the drive, it should work, correct?
I was making some custom steps myself so difficult to guarantee, therefore do make sure you generate a migration file beforehand! Also is best to use a new SDcard for the update, so you can fall back to the old version.
Probably best to try restarting with the old system after removing the raid to make sure it boots and don't delete the USB drive before that test.
Most helpful comment
After a full backup (MIGRATION FILE)
you can try:
$ sudo config.scripts/blitz.datadrive.sh statussudo config.scripts/blitz.datadrive.sh raid offDouble check that:
$ sudo config.scripts/blitz.datadrive.sh statusshould show:
When synced up again I successfully used these steps.
lsblkthe pendrive should be there as
sdb$ sudo config.scripts/blitz.datadrive.sh raid on sdbif the drive is not empty will need to remove and format it.:
Note this entry about the type of pendrive to use (USB SSD is recommended):
https://github.com/rootzoll/raspiblitz/issues/924