Hi All, I am new to solaris. Please clarify me on the following questions. 1) On Linux to know the presence of ext2/ext3 file systems on a device we use tune2fs command. Similar to tune2fs command is there any command to know the presence of ZFS file system on a device ? 2) When a device is shared between two machines , What our project does is, -> Create ext2 file system on device a) Mount the device on machine 1 b) Write data on the device c) unmount the device from machine 1 d)mount the device on machine 2 e) read the data on the device f) compare the current read data with previous write data and report the result g) unmount the device from machine 2 h) Goto step a. Like this , Can We share zfs file system between two machines. If so please explain it. 3) Can we create ZFS pools (or ZFS file system ) on VxVm volumes ? if so, how ? 4) Can we share ZFS pools ( ZFS file ststem ) between two machines ? 5) Like fsck command on Linux, is there any command to check the consistency of the ZFS file system ? your help is appreciated. Thanks & Regards Masthan --------------------------------- Need a quick answer? Get one in minutes from people who know. Ask your question on Yahoo! Answers. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20061204/9ec4a168/attachment.html>
Hi Mastan, On Dec 4, 2006, at 11:13 PM, dudekula mastan wrote:> Hi All, > > I am new to solaris. Please clarify me on the following questions. > > 1) On Linux to know the presence of ext2/ext3 file systems on a > device we use tune2fs command. Similar to tune2fs command is there > any command to know the presence of ZFS file system on a device ?"zpool import" will list any zpools even when they''re not currently visible in a "zpool list" "zfs get -r all zpool-name" will list all zfs filesystems> 2) When a device is shared between two machines , What our project > does is, > > -> Create ext2 file system on device > a) Mount the device on machine 1 > b) Write data on the device > c) unmount the device from machine 1 > d)mount the device on machine 2 > e) read the data on the device > f) compare the current read data with previous write data and > report the result > g) unmount the device from machine 2 > h) Goto step a. > > Like this , Can We share zfs file system between two machines. If > so please explain it.It''s always going from machine 1 to machine 2? zfs send filesystem-on-machine1 at some-time | ssh root at machine2 | zfs recv filesystem-one-machine2 will stream a snapshot from the first machine to a filesystem/device/ snapshot on machine2> 3) Can we create ZFS pools (or ZFS file system ) on VxVm volumes ? > if so, how ?It''s been so long since I''ve cared about VxVm volumes, I don''t know.> 4) Can we share ZFS pools ( ZFS file ststem ) between two machines ?Yes but what are the requirements here?> 5) Like fsck command on Linux, is there any command to check the > consistency of the ZFS file system ?ZFS is a transactional, copy-on-write filesystem. It''s always consistent. There is an output for zpool status that includes this information, for example [strongspace12(zone):/] root# zpool status pool: thumper12 state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM thumper ONLINE 0 0 0 raidz2 ONLINE 0 0 0 c5t4d0 ONLINE 0 0 0 c4t4d0 ONLINE 0 0 0 c7t4d0 ONLINE 0 0 0 c6t4d0 ONLINE 0 0 0 c1t4d0 ONLINE 0 0 0 c0t4d0 ONLINE 0 0 0 c4t0d0 ONLINE 0 0 0 c7t0d0 ONLINE 0 0 0 c6t0d0 ONLINE 0 0 0 c1t0d0 ONLINE 0 0 0 c0t0d0 ONLINE 0 0 0 raidz2 ONLINE 0 0 0 c5t5d0 ONLINE 0 0 0 c4t5d0 ONLINE 0 0 0 c7t5d0 ONLINE 0 0 0 c6t5d0 ONLINE 0 0 0 c1t5d0 ONLINE 0 0 0 c0t5d0 ONLINE 0 0 0 c4t1d0 ONLINE 0 0 0 c7t1d0 ONLINE 0 0 0 c6t1d0 ONLINE 0 0 0 c1t1d0 ONLINE 0 0 0 c0t1d0 ONLINE 0 0 0 raidz2 ONLINE 0 0 0 c5t6d0 ONLINE 0 0 0 c4t6d0 ONLINE 0 0 0 c7t6d0 ONLINE 0 0 0 c6t6d0 ONLINE 0 0 0 c1t6d0 ONLINE 0 0 0 c0t6d0 ONLINE 0 0 0 c4t2d0 ONLINE 0 0 0 c7t2d0 ONLINE 0 0 0 c6t2d0 ONLINE 0 0 0 c1t2d0 ONLINE 0 0 0 c0t2d0 ONLINE 0 0 0 raidz2 ONLINE 0 0 0 c5t7d0 ONLINE 0 0 0 c4t7d0 ONLINE 0 0 0 c7t7d0 ONLINE 0 0 0 c6t7d0 ONLINE 0 0 0 c1t7d0 ONLINE 0 0 0 c0t7d0 ONLINE 0 0 0 c4t3d0 ONLINE 0 0 0 c7t3d0 ONLINE 0 0 0 c6t3d0 ONLINE 0 0 0 c1t3d0 ONLINE 0 0 0 c0t3d0 ONLINE 0 0 0 spares c5t1d0 AVAIL c5t2d0 AVAIL c5t3d0 AVAIL errors: No known data errors Regards, Jason ???????????????????????????????????????????????????????????? Jason A. Hoffman, PhD | Founder, CTO, Joyent Inc. Applications => http://joyent.com/ Hosting => http://textdrive.com/ Backups => http://strongspace.com/ Weblog => http://joyeur.com/ Email => jason at joyent.com or jason at textdrive.com Mobile => (858)342-2179 ????????????????????????????????????????????????????????????
> 1) On Linux to know the presence of ext2/ext3 file systems on a device we use tune2fs command. Similar to tune2fs command is there any command to know the presence of ZFS file system on a device ? >You can use ''zpool import'' to check normal disk devices, or give an optional list of devices/directories to search specifically for zfs presence, or you can use ''fstyp'' to guess at a filesystem on any type of named device based on signature. # fstyp /dev/rdsk/c0t8d0s0 ufs # fstyp /dev/rdsk/c1t8d0s0 zfs> 2) When a device is shared between two machines , What our project does is, > > -> Create ext2 file system on device > a) Mount the device on machine 1 > b) Write data on the device > c) unmount the device from machine 1 > d)mount the device on machine 2 > e) read the data on the device > f) compare the current read data with previous write data and report the result > g) unmount the device from machine 2 > h) Goto step a. > > Like this , Can We share zfs file system between two machines. If soplease explain it. Yes. ''zpool export'' and ''zpool import'' can be used to unmount and remount the pool and filesystems on different machines at separate times.> 3) Can we create ZFS pools (or ZFS file system ) on VxVm volumes ?if so, how ? Haven''t tried it, but you should be able to pass the volume in on the zpool create command line as a device.> 4) Can we share ZFS pools ( ZFS file ststem ) between two machines ?Not simultaneously at this point.> 5) Like fsck command on Linux, is there any command to check the consistency of the ZFS file system ?Not in exactly the same way (because it''s not needed in the same way), but it can be scrubbed periodically to verify that all the data checksums correctly. Also, you can do this while it is online. -- Darren Dunham ddunham at taos.com Senior Technical Consultant TAOS http://www.taos.com/ Got some Dr Pepper? San Francisco, CA bay area < This line left intentionally blank to confuse you. >
Hey all, Jason A. Hoffman wrote:> On Dec 4, 2006, at 11:13 PM, dudekula mastan wrote: >> 3) Can we create ZFS pools (or ZFS file system ) on VxVm volumes ? if >> so, how ? > > It''s been so long since I''ve cared about VxVm volumes, I don''t know.Yep. You can create ZFS pools from VxVM, or SVM, or anything that looks like a disk to OpenSolaris. Not sure why you''d do it, except just for giggles. I''d be inclined not to run something like this http://blogs.sun.com/timf/entry/zfs_in_perfect_harmony in production though. In general, closer you get ZFS to your physical disks, the better. cheers, tim -- Tim Foster, Sun Microsystems Inc, Solaris Engineering Ops http://blogs.sun.com/timf
dudekula mastan wrote:> > 5) Like fsck command on Linux, is there any command to check the > consistency of the ZFS file system ? >As others have mentioned, ZFS doesn''t require off line consistency checking. You can run ''zpool scrub'' on a live system and check the result with ''zpool status'': zpool status pool: tank state: ONLINE scrub: scrub completed with 0 errors on Tue Dec 5 21:07:08 2006 config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 mirror ONLINE 0 0 0 c3d0 ONLINE 0 0 0 c4d0 ONLINE 0 0 0 errors: No known data errors Ian
dudekula mastan <d_mastan at yahoo.com> wrote:> 1) On Linux to know the presence of ext2/ext3 file systems on a device we use tune2fs command. Similar to tune2fs command is there any command to know the presence of ZFS file system on a device ? > > 2) When a device is shared between two machines , What our project does is, > > -> Create ext2 file system on device > a) Mount the device on machine 1 > b) Write data on the device > c) unmount the device from machine 1 > d)mount the device on machine 2 > e) read the data on the device > f) compare the current read data with previous write data and report the resultIf you like to compare directora trees, I rcommend to use star -diff -vv ftp://ftp.berlios.de/pub/star/alpha/ J?rg -- EMail:joerg at schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 Berlin js at cs.tu-berlin.de (uni) schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
Le 04/12/2006 ? 23:34:39-0800, Jason A. Hoffman a ?crit> Hi Mastan, > > >Like this , Can We share zfs file system between two machines. If > >so please explain it. > > It''s always going from machine 1 to machine 2? > > zfs send filesystem-on-machine1 at some-time | ssh root at machine2 | zfs > recv filesystem-one-machine2 > > will stream a snapshot from the first machine to a filesystem/device/ > snapshot on machine2That''s impressive. Whath the size of the file you send throught ssh ? Is that size is exactly same of the FS or the occupation of FS ? Can I send just the diff ? For example At t=0 I send a big file using your command at t=t+1 I just send the diff not a big file Regards. -- Albert SHIH Universite de Paris 7 (Denis DIDEROT) U.F.R. de Mathematiques. 7 i?me ?tage, plateau D, bureau 10 Heure local/Local time: Tue Dec 5 14:53:13 CET 2006
On Tue, 2006-12-05 at 14:56 +0100, Albert Shih wrote:> That''s impressive. Whath the size of the file you send throught ssh ? Is > that size is exactly same of the FS or the occupation of FS ? Can I send > just the diff ? For example > > At t=0 I send a big file using your command > at t=t+1 I just send the diff not a big fileYes. The "zfs send" contents are the amount of occupied space of the filesystem at a given point in time (a snapshot). You can use "zfs send -i" to send incremental snapshots, containing only the data that differs between filesyste at t0 and filesystem at t1. More info in the ZFS man pages, the (excellent) ZFS Administration guide, at http://docs.sun.com/app/docs/doc/819-5461/6n7ht6qt0?a=view (you want Chapter 6) and a blog post from Matt at: http://blogs.sun.com/ahrens/entry/is_it_magic Matt has mentioned some additional features to zfs send/recv coming soon, including ways to send all incremental snapshots, send nested filesystem, and ways to preserve filesystem properties while sending. cheers, tim -- Tim Foster, Sun Microsystems Inc, Solaris Engineering Ops http://blogs.sun.com/timf
> is there any command to know the presence of ZFS file system on a device ?fstyp is the Solaris command to determine what type of file system may be present on a disk: # fstyp /dev/dsk/c0t1d0s6 zfs> When a device is shared between two machines?[ ... ]You can use the same mount/unmount mechanism with ZFS, except that you will both need to unmount the file systems and export the pool. It''s critical that you export the pool from machine A before trying to access it from machine B.> Can we create ZFS pools (or ZFS file system ) on VxVm volumes ? if so, how ?Yes. Just give the name of the VxVM volume to the ''zpool create'' command, where the name of a disk would go. [Disclaimer: I haven''t tested this.]> Can we share ZFS pools ( ZFS file system ) between two machines ?If you mean, can you have a pool simultaneously mounted on two machines, the answer is no. You must unmount/export the pool from one machine before allowing another machine to access it.> Like fsck command on Linux,?is there any command ?to check the consistency of > the ZFS file system ?No. This message posted from opensolaris.org