Hi Everyone, I perform a snapshot and a zfs send on a filesystem with a recordsize of 16k, and redirect the output to a plain file. Later, I use cat sentfs | zfs receive otherpool/filesystem. In this case the new filesystem''s recordsize will be the default 128k again. The other filesystem attributes (for example atime) are reverted to defaults too. Okay, I can set these later, but I can''t set the recordsize for existing files. Are there any solutions for this problem? This is the case on Solaris 10u5 and on Nevada b91 too. ______ /_____/\ Peter Boros /_____\\ \ /_____\ \\ / Technical Specialist /_____/ \/ / / /_____/ / \//\ Sun Microsystems Inc. \_____\//\ / / Hungary-1027 Budapest, Kapas u. 11-15. \_____/ / /\ / Phone: +36 1 489-8900 \_____/ \\ \ \_____\ \\ \_____\/
Peter Boros wrote:> I perform a snapshot and a zfs send on a filesystem with a recordsize > of 16k, and redirect the output to a plain file. Later, I use cat > sentfs | zfs receive otherpool/filesystem. In this case the new > filesystem''s recordsize will be the default 128k again. The other > filesystem attributes (for example atime) are reverted to defaults > too. Okay, I can set these later, but I can''t set the recordsize for > existing files. Are there any solutions for this problem? This is the > case on Solaris 10u5 and on Nevada b91 too.My impression is you should change the recordsize on the first filesystem before performing the zfs send. This will then be used for all files when you receive the filesystem. I haven''t tested this with recordsize, but I did with compression and I imagine recordsize (and others) will behave the same way. -- James Andrewartha
Hi James, Of course, changing the recordsize was the first thing I did, after I created the original filesystem. I copied some files on it, made a snapshot, and then performed the zfs send (with the decreased recordsize). After I performed a zfs receive, the recordsize was the default (128k) on the new filesystem. On Jun 25, 2008, at 8:27 AM, James Andrewartha wrote:> Peter Boros wrote: >> I perform a snapshot and a zfs send on a filesystem with a recordsize >> of 16k, and redirect the output to a plain file. Later, I use cat >> sentfs | zfs receive otherpool/filesystem. In this case the new >> filesystem''s recordsize will be the default 128k again. The other >> filesystem attributes (for example atime) are reverted to defaults >> too. Okay, I can set these later, but I can''t set the recordsize for >> existing files. Are there any solutions for this problem? This is the >> case on Solaris 10u5 and on Nevada b91 too. > > My impression is you should change the recordsize on the first > filesystem > before performing the zfs send. This will then be used for all files > when > you receive the filesystem. I haven''t tested this with recordsize, > but I did > with compression and I imagine recordsize (and others) will behave > the same way. > > -- > James Andrewartha > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss______ /_____/\ Peter Boros /_____\\ \ /_____\ \\ / Technical Specialist /_____/ \/ / / /_____/ / \//\ Sun Microsystems Inc. \_____\//\ / / Hungary-1027 Budapest, Kapas u. 11-15. \_____/ / /\ / Phone: +36 1 489-8900 \_____/ \\ \ \_____\ \\ \_____\/
Peter Boros wrote:> Hi James, > > Of course, changing the recordsize was the first thing I did, after I > created the original filesystem. I copied some files on it, made a > snapshot, and then performed the zfs send (with the decreased > recordsize). After I performed a zfs receive, the recordsize was the > default (128k) on the new filesystem.Ah, I was using the -R option to zfs send, which does what you want. It''s been in since nv77, PSARC/2007/574. To quote the manpage: -R Generate a replication stream package, which will replicate the specified filesystem, and all descendant file sys- tems, up to the named snapshot. When received, all properties, snapshots, des- cendent file systems, and clones are preserved. If the -i or -I flags are used in con- junction with the -R flag, an incremental replication stream is generated. The current values of properties, and current snapshot and file system names are set when the stream is received. If the -F flag is specified when this stream is recieved, snapshots and file systems that do not exist on the sending side are des- troyed. -- James Andrewartha
Hi, Is there any way to do this in Solaris 10? For example create an empty zfs filesystem before receiving and then receive the stream without touching the metadata? On Jun 25, 2008, at 2:37 PM, James Andrewartha wrote:> Peter Boros wrote: >> Hi James, >> >> Of course, changing the recordsize was the first thing I did, after I >> created the original filesystem. I copied some files on it, made a >> snapshot, and then performed the zfs send (with the decreased >> recordsize). After I performed a zfs receive, the recordsize was the >> default (128k) on the new filesystem. > > Ah, I was using the -R option to zfs send, which does what you want. > It''s > been in since nv77, PSARC/2007/574. To quote the manpage: > -R Generate a replication stream package, > which will replicate the specified > filesystem, and all descendant file sys- > tems, up to the named snapshot. When > received, all properties, snapshots, des- > cendent file systems, and clones are > preserved. > > If the -i or -I flags are used in con- > junction with the -R flag, an incremental > replication stream is generated. The > current values of properties, and current > snapshot and file system names are set > when the stream is received. If the -F > flag is specified when this stream is > recieved, snapshots and file systems that > do not exist on the sending side are des- > troyed. > > -- > James Andrewartha > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss______ /_____/\ Peter Boros /_____\\ \ /_____\ \\ / Technical Specialist /_____/ \/ / / /_____/ / \//\ Sun Microsystems Inc. \_____\//\ / / Hungary-1027 Budapest, Kapas u. 11-15. \_____/ / /\ / Phone: +36 1 489-8900 \_____/ \\ \ \_____\ \\ \_____\/