partclone offset option test

create tw row file and setup as loop device

1+0 records in 1+0 records out 524582912 bytes (525 MB) copied, 2.05851 s, 255 MB/s 1+0 records in 1+0 records out 525631488 bytes (526 MB) copied, 2.31659 s, 227 MB/s

formet loop device /dev/loop0

mke2fs 1.42.8 (20-Jun-2013) Discarding device blocks: 1024/512288 done
Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=0 blocks, Stripe width=0 blocks 128520 inodes, 512288 blocks 25614 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67633152 63 block groups 8192 blocks per group, 8192 fragments per group 2040 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

Allocating group tables: 0/63 done
Writing inode tables: 0/63 done
Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: 0/63 done

clone /dev/loop0 to /dev/loop1 with offset option

../src/partclone.extfs -d -b -s /dev/loop0 -o /dev/loop1 --offset=1048576

Partclone v0.2.70 Starting to back up device(/dev/loop0) to device(/dev/loop1) Reading Super Block Calculating bitmap… Please wait… Elapsed: 00:00:01, Remaining: 00:00:00, Completed: 100.00% Total Time: 00:00:01, 100.00% completed! done! File system: EXTFS Device size: 524.6 MB = 512288 Blocks Space in use: 27.4 MB = 26762 Blocks Free Space: 497.2 MB = 485526 Blocks Block size: 1024 Byte Elapsed: 00:00:01, Remaining: 00:01:39, Completed: 1.00%, 0.00byte/min, current block: 0, total block: 512288, Complete: 0.00% Elapsed: 00:00:02, Remaining: 00:00:00, Completed: 100.00%, Rate: 822.13MB/min, current block: 508162, total block: 512288, Complete: 100.00% Total Time: 00:00:02, Ave. Rate: 822.1MB/min, 100.00% completed! Syncing… OK! Partclone successfully cloned the device (/dev/loop0) to the device (/dev/loop1) Cloned successfully.

mount /dev/loop1 with offset option and check return code

mount -o offset=1048576 /dev/loop1 /mnt

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=212015,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=414436k,mode=755) /dev/disk/by-uuid/b4371da8-8182-45d1-888e-9d75e63c3e00 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=2506780k) on /home/thomas/partimag type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=,mountvers=3,mountport=892,mountproto=udp,local_lock=all,addr= rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) /dev/loop1 on /mnt type ext3 (rw,relatime,data=ordered)

remove row file

offset test done