Symantec logo

Converting a data Storage Checkpoint to a nodata Storage Checkpoint

A nodata Storage Checkpoint does not contain actual file data. Instead, this type of Storage Checkpoint contains a collection of markers indicating the location of all the changed blocks since the Storage Checkpoint was created.

See Types of Storage Checkpoints.

You can use either the synchronous or asynchronous method to convert a data Storage Checkpoint to a nodata Storage Checkpoint; the asynchronous method is the default method. In a synchronous conversion, fsckptadm waits for all files to undergo the conversion process to "nodata" status before completing the operation. In an asynchronous conversion, fsckptadm returns immediately and marks the Storage Checkpoint as a nodata Storage Checkpoint even though the Storage Checkpoint's data blocks are not immediately returned to the pool of free blocks in the file system. The Storage Checkpoint deallocates all of its file data blocks in the background and eventually returns them to the pool of free blocks in the file system.

If all of the older Storage Checkpoints in a file system are nodata Storage Checkpoints, use the synchronous method to convert a data Storage Checkpoint to a nodata Storage Checkpoint. If an older data Storage Checkpoint exists in the file system, use the asynchronous method to mark the Storage Checkpoint you want to convert for a delayed conversion. In this case, the actual conversion will continue to be delayed until the Storage Checkpoint becomes the oldest Storage Checkpoint in the file system, or all of the older Storage Checkpoints have been converted to nodata Storage Checkpoints.


  Note   You cannot convert a nodata Storage Checkpoint to a data Storage Checkpoint because a nodata Storage Checkpoint only keeps track of the location of block changes and does not save the content of file data blocks.


Showing the difference between a data and a nodata Storage Checkpoint

The following example shows the difference between data Storage Checkpoints and nodata Storage Checkpoints.


  Note   A nodata Storage Checkpoint does not contain actual file data.

See Converting a data Storage Checkpoint to a nodata Storage Checkpoint.


 To show the difference between Storage Checkpoints

  1. Create a file system and mount it on /mnt0, as in the following example:

# mkfs -F vxfs /dev/vx/rdsk/dg1/test0

version 7 layout
134217728 sectors, 67108864 blocks of size 1024, log \

size 65536 blocks, largefiles supported
# mkfs -F /dev/vx/rdsk/dg1/test0 /mnt0

  1. Create a small file with a known content, as in the following example.

# echo "hello, world" > /mnt0/file

  1. Create a Storage Checkpoint and mount it on /mnt0@5_30pm, as in the following example:

# fsckptadm create ckpt@5_30pm /mnt0
# mkdir /mnt0@5_30pm
# mount -F vxfs -o ckpt=ckpt@5_30pm \
/dev/vx/dsk/dg1/test0:ckpt@5_30pm /mnt0@5_30pm

  1. Examine the content of the original file and the Storage Checkpoint file:

# cat /mnt0/file
hello, world
# cat /mnt0@5_30pm/file
hello, world

  1. Change the content of the original file:

# echo "goodbye" > /mnt0/file

  1. Examine the content of the original file and the Storage Checkpoint file. The original file contains the latest data while the Storage Checkpoint file still contains the data at the time of the Storage Checkpoint creation:

# cat /mnt0/file
goodbye
# cat /mnt0@5_30pm/file
hello, world

  1. Unmount the Storage Checkpoint, convert the Storage Checkpoint to a nodata Storage Checkpoint, and mount the Storage Checkpoint again.

# umount /mnt0@5_30pm
# fsckptadm -s set nodata ckpt@5_30pm /mnt0
# mount -F vxfs -o ckpt=ckpt@5_30pm \
/dev/vx/dsk/dg1/test0:ckpt@5_30pm /mnt0@5_30pm

  1. Examine the content of both files. The original file must contain the latest data:

# cat /mnt0/file
goodbye

You can traverse and read the directories of the nodata Storage Checkpoint; however, the files contain no data, only markers to indicate which block of the file has been changed since the Storage Checkpoint was created:

# ls -l /mnt0@5_30pm/file
-rw-r--r-- 1 root other 13 Jul 13 17:13 \

mnt0@5_30pm/file
# cat /mnt0@5_30pm/file
cat: read error: No such file or directory

Converting multiple Storage Checkpoints

You can convert Storage Checkpoints to nodata Storage Checkpoints, when dealing with older Storage Checkpoints on the same file system.

 To convert multiple Storage Checkpoints

  1. Create a file system and mount it on /mnt0:

# mkfs -F vxfs /dev/vx/rdsk/dg1/test0
version 7 layout
13417728 sectors, 67108864 blocks of size 1024, log \

size 65536 blocks largefiles supported
# mount -F vxfs /dev/vx/dsk/dg1/test0 /mnt0

  1. Create four data Storage Checkpoints on this file system, note the order of creation, and list them:

# fsckptadm create oldest /mnt0
# fsckptadm create older /mnt0
# fsckptadm create old /mnt0
# fsckptadm create latest /mnt0
# fsckptadm list /mnt0
/mnt0
latest:
ctime = Mon 26 Jul 11:56:55 2004
mtime = Mon 26 Jul 11:56:55 2004
flags = largefiles
old:
ctime = Mon 26 Jul 11:56:51 2004
mtime = Mon 26 Jul 11:56:51 2004
flags = largefiles
older:
ctime = Mon 26 Jul 11:56:46 2004
mtime = Mon 26 Jul 11:56:46 2004
flags = largefiles
oldest:
ctime = Mon 26 Jul 11:56:41 2004
mtime = Mon 26 Jul 11:56:41 2004
flags = largefiles

  1. Try to convert synchronously the "latest" Storage Checkpoint to a nodata Storage Checkpoint. The attempt will fail because the Storage Checkpoints older than the "latest" Storage Checkpoint are data Storage Checkpoints, namely the Storage Checkpoints "old", "older", and "oldest":

# fsckptadm -s set nodata latest /mnt0
UX:vxfs fsckptadm: ERROR: V-3-24632: Storage Checkpoint

set failed on latest. File exists (17)

  1. You can instead convert the "latest" Storage Checkpoint to a nodata Storage Checkpoint in a delayed or asynchronous manner.

# fsckptadm set nodata latest /mnt0

  1. List the Storage Checkpoints, as in the following example. You will see that the "latest" Storage Checkpoint is marked for conversion in the future.

# fsckptadm list /mnt0
/mnt0
latest:
ctime = Mon 26 Jul 11:56:55 2004
mtime = Mon 26 Jul 11:56:55 2004
flags = nodata, largefiles, delayed
old:
ctime = Mon 26 Jul 11:56:51 2004
mtime = Mon 26 Jul 11:56:51 2004
flags = largefiles
older:
ctime = Mon 26 Jul 11:56:46 2004
mtime = Mon 26 Jul 11:56:46 2004
flags = largefiles
oldest:

ctime = Mon 26 Jul 11:56:41 2004
mtime = Mon 26 Jul 11:56:41 2004
flags = largefiles


Creating a delayed nodata Storage Checkpoint

You can combine the three previous steps and create the "latest" Storage Checkpoint as a nodata Storage Checkpoint. The creation process will detect the presence of the older data Storage Checkpoints and create the "latest" Storage Checkpoint as a delayed nodata Storage Checkpoint as follows:

  1. Remove the "latest" Storage Checkpoint.

# fsckptadm remove latest /mnt0
# fsckptadm list /mnt0
/mnt0

old:
ctime = Mon 26 Jul 11:56:51 2004
mtime = Mon 26 Jul 11:56:51 2004
flags = largefiles
older:
ctime = Mon 26 Jul 11:56:46 2004
mtime = Mon 26 Jul 11:56:46 2004
flags = largefiles
oldest:

ctime = Mon 26 Jul 11:56:41 2004
mtime = Mon 26 Jul 11:56:41 2004
flags = largefiles

  1. Recreate latest Storage Checkpoint as a nodata Storage Checkpoint.

# fsckptadm -n create latest /mnt0

# fsckptadm list /mnt0

/mnt0

latest:

ctime = Mon 26 Jul 12:06:42 2004

mtime = Mon 26 Jul 12:06:42 2004

flags = nodata, largefiles, delayed

old:

ctime = Mon 26 Jul 11:56:51 2004

mtime = Mon 26 Jul 11:56:51 2004

flags = largefiles

older:

ctime = Mon 26 Jul 11:56:46 2004

mtime = Mon 26 Jul 11:56:46 2004

flags = largefiles

oldest:

ctime = Mon 26 Jul 11:56:41 2004

mtime = Mon 26 Jul 11:56:41 2004

flags = largefiles

  1. Convert the "oldest" Storage Checkpoint to a nodata Storage Checkpoint because no older Storage Checkpoints exist that contain data in the file system.

      Note   This step can be done synchronously.


# fsckptadm -s set nodata oldest /mnt0
# fsckptadm list /mnt0
/mnt0
latest:
ctime = Mon 26 Jul 12:06:42 2004
mtime = Mon 26 Jul 12:06:42 2004
flags = nodata, largefiles, delayed
old:
ctime = Mon 26 Jul 11:56:51 2004
mtime = Mon 26 Jul 11:56:51 2004
flags = largefiles
older:
ctime = Mon 26 Jul 11:56:46 2004
mtime = Mon 26 Jul 11:56:46 2004
flags = largefiles
oldest:
ctime = Mon 26 Jul 11:56:41 2004
mtime = Mon 26 Jul 11:56:41 2004
flags = nodata, largefiles

  1. Remove the "older" and "old" Storage Checkpoints.

# fsckptadm remove older /mnt0
# fsckptadm remove old /mnt0
# fsckptadm list /mnt0
/mnt0
latest:
ctime = Mon 26 Jul 12:06:42 2004
mtime = Mon 26 Jul 12:06:42 2004
flags = nodata, largefiles
oldest:
ctime = Mon 26 Jul 11:56:41 2004
mtime = Mon 26 Jul 11:56:41 2004
flags = nodata, largefiles


  Note   After you remove the "older" and "old" Storage Checkpoints, the "latest" Storage Checkpoint is automatically converted to a nodata Storage Checkpoint because the only remaining older Storage Checkpoint ("oldest") is already a nodata Storage Checkpoint: