LVM and VxVM

How to mount an lvol that was a JFS snapshot

 
SOLVED
Go to solution
Mark Fisher_4
Frequent Advisor

How to mount an lvol that was a JFS snapshot

We are attempting to use JFS snapshot to backup and lvol:

$ mount -F vxfs -o snapof=/dev/vgTeMIPFE01/lvolTeMIPvar /dev/vgTeMIPFE01/lvolTeMIPsnp /var/opt/TeMIP_directors_snap



Backup files from snap shot



$ umount /var/opt/TeMIP_directors_snap

Once the /dev/vgTeMIPFE01/lvolTeMIPsnp lvol is umounted, we attempted to do a normal mount of the lvol and got this error:

$ mount /dev/vgTeMIPFE01/lvolTeMIPsnp /var/opt/TeMIP_Directors_snap

/dev/vgTeMIPFE01/lvolTeMIPsnp: unrecognized file system

If you use the fstyp command:

root@omztcl10:/fstyp /dev/vgTeMIPFE01/lvolTeMIPsnp
UX:vxfs fstyp: ERROR: V-3-20012: not a valid vxfs file system
unknown_fstyp (no matches)


The quesion is: Is this normal behavior? Is it possible to mount a lvol/filesystem that was a snapshot? If not, then I assume this was just a temporary filesystem that was destroyed when it was originally umounted. If you can remount it, why is the file system now corrupt?


3 REPLIES 3
Sandman!
Honored Contributor

Re: How to mount an lvol that was a JFS snapshot

You need to explicitly specify the filesystem type switch "-F vxfs" in order to mount one i.e.

$ mount -F vxfs /dev/vgTeMIPFE01/lvolTeMIPsnp /var/opt/TeMIP_Directors_snap

~hope it helps
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How to mount an lvol that was a JFS snapshot

Once the snapshot is unmounted it nolonger has any meaning. The snapshot is actually a composite of the unchanged blocks in the original filesystem plus an image of the changed blocks (only the first write after the snapshot counts) stored in the snapshot buffer LVOL. Once ypu umount the snapof mountpoint, that connection is lost.

If it ain't broke, I can fix that.
Sameer_Nirmal
Honored Contributor

Re: How to mount an lvol that was a JFS snapshot

Technically ACP has explained very well the context of the VXFS snapshot and the funcationality.

Just to add that, the errors you see with mount/fstyp with snap lvol are expected. When you creat the lvol for snap, you don't create a filesystem on it, you just use it for snap. It doesn't carry any filesystem structure on it so mount/fstyp won't recognised it. In reality, the raw device interface of the snap lvol is used for snapshot.