ZFS Interview Point

Q 1.What is ZFS ?
A. ZFS is filesystem cum volume managed developed by sun microsystems (Now its Oracle).It is a 128-bit file system.
Q 2.How to create new zpool ?
A. The new zpool can be create using “zpool create pool_name cxtxdx cxtxdx ”
Q 3.What type of raid levels are supported in ZFS ?
A. Striped Vdev’s (RAID0)
Mirrored Vdev’s (RAID1)
Striped Mirrored Vdev’s (RAID10)
RAIDZ (RAID5-Single parity)
RAIDZ2 (RAID6-Double parity)
RAIDZ3 (Triple Parity)
Q 4. Is it possible to reduce the zpool size ?
A. No .You can;t reduce the zpool size since all the disks will in stripped by default.
Q 5.How to list zpool’s ?
A. using “zpool list” command
Q 6. What is dataset in ZFS ?
A. ZFS dataset is a virtual filesystem like volume in VXVM terminology.
Q 7.How to create a new dataset in ZFS ?
A. Using zfs create pool_name/dataset_name
Q 8.How many LUNS or DISKS can be added to one ZPOOL ?
A. 264 LUNS or DISKS can be added to one zpool theoretically.
Q 9.How many dataset can be created per zpool ?
A. 264 dataset can be created in single zpool.
Q 10.How many zpools can be created in Solaris global zone ?
A. 264 zpools ca be created in a system.
Q 11.How to list the zfs snapshots ?
A. Use “zfs list |grep @ ” to get the list of snapshots.
Q 12. Is it possible to use fsck in ZFS ?
A. No.You can’t use fsck in ZFS.You can check the zpool integrity using “zpool scrub pool_name”
Q 13.Is possible to extend zfs dataset in online ?
A. Yes. you can increase the ZFS dataset size in online without un-mounting it .
Q 14.Is possible to extend zpool on fly ?
A. Yes. You can extend the zpool in online by just adding new disks using “zpool add pool_name cxtxdx ” command .
Q 15.What is minimum physical memory if you are using ZFS ?
A. Normally we recommend to use 4GB physical memory .
Q 16.Best practice of ZFS Mirrored Root Pool Disk Replacement.
A. You can perform the live disk replacement if the server supports hotplug and rpool is mirrored.
Offline the disk in zpool
# zpool offline rpool cxtxdx
Unconfigure the disk from OS level
# cfgadm -c unconfigure c1::dsk/cxtxdx
Physical replace the disk
Reconfigure the disk in OS level
# cfgadm -c configure c1::dsk/cxtxdx
Confirm that the replacement disk has an SMI label and a slice 0 to match the existing root pool configuration
Making ZFS aware by using below command.
# zpool replace rpool cxtxdxs0
Bring the disk in to zfs online.
# zpool online rpool cxtxdxs0
Install the bootblock.
# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/cxtxdxs0
Q 17. How to destroy zfs dataset ?
A. Using “zfs destroy pool_name/dataset_name”
Q 18.How to set new mountpoint to zfs dataset ?
A. Using “zfs set mountpoint=/new_mount_point pool_name/dataset_name
Q.17.How to rename ZFS dataset ?
A. We can use “zfs rename pool_name/dataset_name_old pool_name/dataset_name_new”
Q 18.Is it possible to recover destroyed zpool ?
A. Yes.We can recover destroyed zpool.
Q 19.How to assign zpool/zfs dataset to local zones ?
A. We can assign zpool/zfs to local zone.
Q 20.How to increase rpool size ?
A. We can increase the rpool size by using new big disks.
Q 21.Is it possible to convert root filesystem from UFS to ZFS ?
A. Yes. we can convert root filesystem from UFS to ZFS using liveupgrade .
Q 22.How to create ZFS dataset like vxvm/ufs volume ?
A. By setting quota and reservation for dataset ,we can get volumes like vxvm.
Q 23.Will snapshot consume any disk space when you create it ?
A. No.It will not consume any space when you create snapshot.The snapshot size will grow according to data changes in the volume.
Q 24. What is emulated volume in ZFS ?
A. It is a ZFS volume without ZFS filesystem on it.You can create UFS/VXFS on this.
Q 25.How to do the dry run on zpool?
A. You can use “-n” option to run dry run without performing any action.For an example if you want to know how the objects will be build using command without create the zpool,use -n option.
# zpool create -n arenpool raidz cxtxdx cxtxdx cxtxdx
would create ‘arenapool’ with the following layout:
Q 26. Is it possible to use ZFS as swap in solaris ?
A. Yes.We can use ZFS emulated volume as swap.
Q 27.How to rename the zpool ?
A. We can rename the zpool using below method.
Export the zpool
# zpool export pool_name
Import the zpool name using new name.
# zpool import pool_name new_poolname
Q 30. Is it possible to create zpool using files ?
A. Yes. we can create a zpool using files which are created by using mkfile command.
# mkfile 64m /test
# zpool create arenzpool /test
Q 31.Do we need to update /etc/vfstab for ZFS datasets ?
A. By default,we no need to update vfstab for zfs dataset. If you set zfs mountpoint as legacy,then you have to update it .
Q 32.Do we need to maintain any configuration files for zpool ?
A. No.We no need to maintain any configuration files.By default all device based zpool will be imported and mounted according to the mountpoint value.
Q 33. How to perform the zpool scrub to check zpool integrity ?
A. use command “zpool scurb pool_name”
Q 34.Do we have to run mkfs command to create a ZFS on zfs datasets ?
A. No.We no need to create ZFS filesystem using mkfs.ZFS will automatically create filesystem and mountpoint when you create dataset. It will be automatically mount with dataset name if you didn’t mentioned the mountpoint there.