Linux cp command with reflink

cp -pRv --reflink=auto /source/folder /destination/folder copy files and directories -p same as –preserve=mode,ownership,timestamps -R, -r, –recursive copy directories recursively -v verbose, show what is going on. –reflink[=WHEN] control clone/CoW copies. This just copied 169GB of files in 20 seconds. This only works on supported filesystems, so for example by “#Btrfs, #CIFS, #NFS 4.2, #OCFS2, #overlayfs, and #XFS”. See here. Explainshell tells you this.

11. Juli 2023 · 1 Minute · utzer

Create Linux dm-crypt BTRFS RAID 1

To do this you need two empty drives, with the guide below all data on the drive will be lost if it is not empty! 1. Install cryptsetup apt-get install cryptsetup 2. Create the dm-crypt cryptsetup -y -v luksFormat /dev/sdb cryptsetup -y -v luksFormat /dev/sdc (Make sure to use the correct device. To show available devices use “lsblk”.) 3. Mount the cryptsetup disk cryptsetup luksOpen /dev/sdb disk1 cryptsetup luksOpen /dev/sdc disk2 4. Check if this was successful ls -l /dev/mapper/disk* or sudo cryptsetup -v status disk1 sudo cryptsetup -v status disk2 5. Create BTRFS volume RAID 1, this means all data and meta-data is mirrored, which means if you use 2 drives with i.e. 4TB each you can only use 4TG over all in the BTRFS mounted volume. mkfs.btrfs -m raid1 -d raid1 /dev/mapper/disk1 /dev/mapper/disk2 You could list more than two drive, for example to increase redundancy, but if you want to use more drive to increase storage you would have to use a different Raid level. ...

12. Februar 2020 · 3 Minuten · utzer