#639 Issue closed: Can I partition external usb drive into bootable usb + backup

Labels: discuss / RFC

osoloco opened issue at 2015-08-18 22:56:

My question is similar to issue #622, except rather than wanting to have two separate devices, I'd like one big external usb harddrive but with two partitions: a small bootable partition to hold the ISO files, and a second partition to hold the backup.

I have a laptop with an SSD and I'd like to use external usb harddisk for booting and backups since harddisk are cheap and I have lots of spares around.

My laptop is encrypted with dmcrypt and formatted with btrfs (except for /boot which is ext4)
I thought I'd like to make backups using ESZ's zsh script from http://hub.darcs.net/esz/btrfs-backup

Their script requires that the backup medium be setup as a raid mirror with a missing disk, then partitioned with LVM and dmcrypt on top of the LVM volume and finally formatted with btrfs.
I know btrfs is supposed to handle disk management, but maybe it lacks encryption, hence the need for btrfs on top of dmcrypt on top of LVM on top of RAID for paranoia.

If I could partition a one or two terabyte harddisk into a small (eg. 4G) parition for REAR and the remainder for ESZ. I could make the 2nd partition part of a raid mirror, make it an LV, fill with random data and cryptsetup then format as btrfs.

My idea would be
OUTPUT=USB
USB_DEVICE="/dev/sdb1"
OUTPUT_URL=usb://dev/sdb2 (or should it be e.g. usb://dev/dm2)? or do I need the usb:// ?
cryptsetup open /dev/dm2 crypt-backup
mount /dev/mapper/crypt-backup /mnt/backup
BACKUP_URL=file:///mnt/crypt-backup

Thanks.

gdha commented at 2015-08-19 18:39:

@osoloco not a bad idea, but unfortunately it requires a serious rewrite of the USB handling code. A few months ago we started with EFI USB booting, but due lack of time we have put it on hold. What I'm trying to say it is possible, but who will write it?

gdha commented at 2015-10-29 11:07:

We will not implement this at current time and shall close this issue - you can re-open this again if there is a real need for it and are willing to buy program time for the implementation (on-site/remote)


[Export of Github issue for rear/rear.]