Hi

I am facing some problems after rolling back the snapshots created on pool.

Environment:
bash-3.00# uname -a
SunOS hostname 5.10 Generic_118833-17 sun4u sparc SUNW,Sun-Blade-100

ZFS version:
bash-3.00# zpool upgrade
This system is currently running ZFS version 2.
All pools are formatted using this version.

I have a zpool called "testpol" with 10G

This is the initial pool status of the pool
bash-3.00# zpool list
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
testpol                9.94G     90K   9.94G     0%  ONLINE     -

bash-3.00# zfs list
NAME                   USED  AVAIL  REFER  MOUNTPOINT
testpol                 84K  9.78G  24.5K  /testpol

Now i run the following commands
bash-3.00# mkfile 10m /testpol/10megfile
bash-3.00# zfs create testpol/fs1
bash-3.00# mkfile 20m /testpol/fs1/20megfile

[b]bash-3.00# zfs snapshot test...@snap[/b]

bash-3.00# zfs create testpol/fs2
bash-3.00# mkfile 30m /testpol/fs2/30megfile
bash-3.00# mkfile 15m /testpol/15megfile

Output of zfs list command after running the above commands
bash-3.00# zfs list(shows that all the above commands were successfully 
executed)
NAME                   USED  AVAIL  REFER  MOUNTPOINT
testpol               75.2M  9.71G  25.0M  /testpol
test...@snap          23.5K      -  10.0M  -
testpol/fs1           20.0M  9.71G  20.0M  /testpol/fs1
testpol/fs2           30.0M  9.71G  30.0M  /testpol/fs2

The following are the file/file system entries under /testpol
bash-3.00# ls -lR /testpol
/testpol:
total 51222
-rw------T   1 root     root     10485760 Jan 29 13:32 10megfile
-rw------T   1 root     root     15728640 Jan 29 13:34 15megfile
drwxr-xr-x   2 root     sys            3 Jan 29 13:33 fs1
drwxr-xr-x   2 root     sys            3 Jan 29 13:34 fs2

/testpol/fs1:
total 40977
-rw------T   1 root     root     20971520 Jan 29 13:33 20megfile

/testpol/fs2:
total 61461
-rw------T   1 root     root     31457280 Jan 29 13:34 30megfile

Everything shows up correctly until i rollback to the snapshot test...@snap
bash-3.00# zfs rollback test...@snap
bash-3.00# zfs list
NAME                   USED  AVAIL  REFER  MOUNTPOINT
testpol               60.2M  9.72G  10.0M  /testpol
test...@snap              0      -  10.0M  -
testpol/fs1           20.0M  9.72G  20.0M  /testpol/fs1
testpol/fs2           30.0M  9.72G  30.0M  /testpol/fs2

bash-3.00# ls -lR /testpol/
/testpol/:
total 20490
-rw------T   1 root     root     10485760 Jan 29 13:32 10megfile
drwxr-xr-x   2 root     root           2 Jan 29 13:32 fs1 [b]fs1 is treated as 
a normal directory. "rm fs1" will succeed, which would fail in case of a file 
system[/b]

/testpol/fs1:
total 0 [b]fs1 is empty.[/b]
As expected fs2 (which was created after snapshot "test...@snap" was taken) is 
not listed under directories.

Issues after rolling back:
1. Before snapshot was taken "fs1" contained "20megfile" which not present 
after the snapshot is rolled back.
2. Though file system "fs2" is not present on the disk, zfs list shows "fs2"
3. The size of the file system "fs1" is incorrect
4. After performing the rollback operation "fs1" is not treated as a file system
bash-3.00# mkfile 45m /testpol/fs1/45megfile
bash-3.00# zfs list
NAME                   USED  AVAIL  REFER  MOUNTPOINT
testpol                105M  9.68G  55.0M  /testpol
test...@snap          23.5K      -  10.0M  -
testpol/fs1           20.0M  9.68G  20.0M  /testpol/fs1
testpol/fs2           30.0M  9.68G  30.0M  /testpol/fs2
You could see 45m got added to /testpol not fs1

Did i do something that i shouldn't be doing?
Can anyone please explain me what is wrong with this behavior?

-Abishek
-- 
This message posted from opensolaris.org
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to