comment below... On Jan 24, 2011, at 1:58 PM, Rahul Deb wrote: > I have a pool "tank" and "dir1" is the filesystem on that pool. "zfs list" > and "df -h" both shows "tank/dir1" mounted. > > ----------------------------------------------------- > # zfs list > tank 124K 228G 32K /tank > tank/dir1 31K 228G 31K /tank/dir1 > # > > # df -h > tank 229G 32K 229G 1% /tank > tank/dir1 229G 31K 229G 1% /tank/dir1 > # > ----------------------------------------------------- > > After that I created a directory "dir2" with mkdir command under /tank/dir1 > and touch couple of files inside dir2 > > ------------------- > # cd /tank/dir1 > # mkdir dir2 > # cd dir2 > # touch file1 file2 > ------------------- > > > Now if I try to create zfs filesystem named "dir2/dir3" under "tank/dir1", it > gives the following message. Though I am using -p flag, it only creates > filesystem until tank/dir1/dir2 but not dir3 and also "df -h" does not show > "/tank/dir1/dir2" as mounted. > > # zfs create -p tank/dir1/dir2/dir3 > cannot mount '/tank/dir1/dir2': directory is not empty > # > > # zfs list > tank 250K 228G 33K /tank > tank/dir1 63K 228G 32K /tank/dir1 > tank/dir1/dir2 31K 228G 31K /tank/dir1/dir2 > # > > Is it a normal behaviour?
Yes. With the -p option, ZFS will create: /tank/dir1/dir2 when that succeeds, it will try and create: /tank/dir1/dir2/dir3 The creation of /tank/dir1/dir2 file system succeeds, as you note. But the mounting of that file system fails because the /tank/dir1/dir2 directory contains files. Therefore the /tank/dir1/dir2/dir3 file system is not created. -- richard
_______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss