longchute

about

tcplay Notes

06 Oct 2013

Creating a New Volume

$ dd if=/dev/zero of=foo.tc bs=1 count=0 seek=1GiB
$ sudo losetup /dev/loop0 foo.tc
$ sudo tcplay -c -d /dev/loop0 -g -b SERPENT-256-XTS,TWOFISH-256-XTS,AES-256-XTS -y SERPENT-256-XTS,TWOFISH-256-XTS,AES-256-XTS

Creating a Filesystem on a New Volume

$ sudo losetup /dev/loop0 foo.tc
$ sudo tcplay -m foo -d /dev/loop0
$ sudo mke2fs /dev/mapper/foo

Mounting a Normal Volume

$ sudo losetup /dev/loop0 foo.tc
$ sudo tcplay -m foo -d /dev/loop0
$ sudo mount -o nosuid,uid=1000,gid=1000 /dev/mapper/foo /home/you/mnt/foo

Mounting a Hidden Volume

$ sudo losetup /dev/loop0 foo.tc
$ sudo tcplay -m foo -e -d /dev/loop0
$ sudo mount -o nosuid,uid=1000,gid=1000 /dev/mapper/foo /home/you/mnt/foo

Unmounting a Volume

$ sudo umount /home/you/mnt/foo
$ sudo dmsetup remove /dev/mapper/foo
$ sudo dmsetup remove /dev/mapper/foo.1
$ sudo dmsetup remove /dev/mapper/foo.0
$ sudo losetup -d /dev/loop0