Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What Is The Difference Between Quota And Reservation?

Answer»
  • Quota LIMITS the amount of space a dataset and all its children can consume.
  • When you SET a quota on parent dataset all the child dataset INHERIT it from the parent. But you can set a different quota on the children if you want.
  • If you set the quota on child dataset, it will not affect the quota of the parent dataset.
  • Quotas cannot be set on ZFS volumes as the volsize property acts as an implicit quota.
  • Reservation sets the minimum amount of space that is guaranteed to a dataset and all its child DATASETS.
  • Similar to quota, when you set reservation on a parent dataset, all the child dataset inherit it from the parent.
  • SETTING reservation on child dataset, does not affect the reservation of the parent.
  • Reservation cannot be set on ZFS volumes.

Example: Consider a ZFS pool (data pool) of size 10 GB. Setting a reservation of 5 GB on zfs file system fs1 will reserve 5 GB for fs1 in the pool and no other dataset can use that space. But fs1 can use more than 5 GB if there is space in the pool.

# zfs set reservation=5g data pool/fs1

Similarly, when we set a quota of 5 GB on fs1, it cannot use space more than 5 GB from the pool. But it’s not reserved for fs1. It means that any other dataset can use a space of 8GB out of 10 GB even if the quota for fs1 is 5GB.

# zfs set quota=5g data pool/fs1

Setting both the properties on the dataset makes fs1 to use only 5 GB from the pool and no other dataset can use this 5 GB reserved for fs1.

Example: Consider a ZFS pool (data pool) of size 10 GB. Setting a reservation of 5 GB on zfs file system fs1 will reserve 5 GB for fs1 in the pool and no other dataset can use that space. But fs1 can use more than 5 GB if there is space in the pool.

# zfs set reservation=5g data pool/fs1

Similarly, when we set a quota of 5 GB on fs1, it cannot use space more than 5 GB from the pool. But it’s not reserved for fs1. It means that any other dataset can use a space of 8GB out of 10 GB even if the quota for fs1 is 5GB.

# zfs set quota=5g data pool/fs1

Setting both the properties on the dataset makes fs1 to use only 5 GB from the pool and no other dataset can use this 5 GB reserved for fs1.

2.

How Would You Create Different Raid Levels In Zfs? Give Examples?

Answer»

Below are few examples of creating DIFFERENT RAID level ZFS POOLS.

Using Whole disks

# zpool CREATE GEEK pool c1t1d0

Using DISK slices

# zpool create geek pool c1t1d0s0

Using Files

# mkfile 100m file1

# zpool create geek pool /file1

Using Dynamic striping

# zpool create geek pool c1t1d0 c1t2d0

Mirrored ZFS pool

# zpool create geek pool mirror c1t1d0 c1t2d0

3 way mirror

# zpool create geek pool mirror c1t1d0 c1t2d0 c1t3d0

raidz1

# zpool create geek pool raidz c1t1d0 c1t2d0 c1t3d0

raidz2

# zpool create geek pool raidz2 c1t1d0 c1t2d0 c1t3d0

raidz3

# zpool create geek pool raidz3 c1t1d0 c1t2d0 c1t3d0 c1t4d0

Below are few examples of creating different RAID level ZFS pools.

Using Whole disks

# zpool create geek pool c1t1d0

Using disk slices

# zpool create geek pool c1t1d0s0

Using Files

# mkfile 100m file1

# zpool create geek pool /file1

Using Dynamic striping

# zpool create geek pool c1t1d0 c1t2d0

Mirrored ZFS pool

# zpool create geek pool mirror c1t1d0 c1t2d0

3 way mirror

# zpool create geek pool mirror c1t1d0 c1t2d0 c1t3d0

raidz1

# zpool create geek pool raidz c1t1d0 c1t2d0 c1t3d0

raidz2

# zpool create geek pool raidz2 c1t1d0 c1t2d0 c1t3d0

raidz3

# zpool create geek pool raidz3 c1t1d0 c1t2d0 c1t3d0 c1t4d0

3.

How To Add A Zfs Volume As A Swap?

Answer»

First create a ZFS volume (size – 1 GB) and the ADD it as a swap:

# zfs create -V 1G rpool/swapvol

# swap -a /dev/zvol/dsk/rpool/swapvol

First create a ZFS volume (size – 1 GB) and the add it as a swap:

# zfs create -V 1g rpool/swapvol

# swap -a /dev/zvol/dsk/rpool/swapvol

4.

How To List All The Zfs Pools?

Answer»

The command to list all the ZFS POOLS on a system is:

# ZPOOL list

The command to list all the ZFS pools on a system is:

# zpool list

5.

How To Resize A Zfs Mount-point?

Answer»

To resize a ZFS mount point we need to set the reservation PROPERTY:

# zfs set reservation=10g tank/geek

Remember that the QUOTA property does not resize the ZFS mount-point. It limits space that can be consumed by the ZFS FILE SYSTEM, but does not reserve it.

To resize a ZFS mount point we need to set the reservation property:

# zfs set reservation=10g tank/geek

Remember that the quota property does not resize the ZFS mount-point. It limits space that can be consumed by the ZFS file system, but does not reserve it.

6.

How To Resize A Zfs Volume?

Answer»

We need to only SET the volume SIZE (either HIGHER or lower than the original size) using the volsize PROPERTY:

# ZFS set volsize=2g fort/geekvol

We need to only set the volume size (either higher or lower than the original size) using the volsize property:

# zfs set volsize=2g fort/geekvol

7.

How To Destroy A Zfs Pool?

Answer»

To DESTROY a ZFS pool:

# zpool destroy geek pool

To destroy a DAMAGED ZFS pool forcefully:

# zpool destroy -f geek pool

To destroy a ZFS pool:

# zpool destroy geek pool

To destroy a damaged ZFS pool forcefully:

# zpool destroy -f geek pool

8.

How To Do A Dry Run Before Actually Creating A Zfs Pool?

Answer»

We can simulate a ZFS operation USING the -n option without actually writing to the disk devices. For EXAMPLE, a dry run of zpool CREATION is:

# zpool create -n geek pool mirror c1t0d0 c1t1d0

WOULD create 'geek pool' with the following layout:

tank

mirror

c1t0d0

c1t1d0

We can simulate a ZFS operation using the -n option without actually writing to the disk devices. For example, a dry run of zpool creation is:

# zpool create -n geek pool mirror c1t0d0 c1t1d0

would create 'geek pool' with the following layout:

tank

mirror

c1t0d0

c1t1d0

9.

How To Create A Zfs Volume?

Answer»

The command to create a ZFS VOLUME of 1 GB is :

# zfs create -V 1g geek pool/volume 01

The command to create a ZFS volume of 1 GB is :

# zfs create -V 1g geek pool/volume 01

10.

Do We Have To Run Mkfs Command To Create A Zfs On Zfs Datasets?

Answer»

No.We no need to create ZFS file system using mkfs.XFS will AUTOMATICALLY create filesystem and mount point when you create DATASET. It will be automatically mount with dataset NAME if you did not MENTIONED the mount point there.

No.We no need to create ZFS file system using mkfs.XFS will automatically create filesystem and mount point when you create dataset. It will be automatically mount with dataset name if you did not mentioned the mount point there.

11.

How To Perform The Zpool Scrub To Check Zpool Integrity?

Answer»

USE COMMAND “zpool scrub POOL name”.

use command “zpool scrub pool name”.

12.

Do We Need To Maintain Any Configuration Files For Zpool?

Answer»

No.We no need to maintain any configuration FILES. By default all device based ZPOOL will be IMPORTED and MOUNTED according to the mount POINT value.

No.We no need to maintain any configuration files. By default all device based zpool will be imported and mounted according to the mount point value.

13.

Do We Need To Update /etc/vfstab For Zfs Datasets?

Answer»

By default, we no need to update vfstab for ZFS dataset. If you set zfs MOUNT POINT as LEGACY, then you have to update it.

By default, we no need to update vfstab for zfs dataset. If you set zfs mount point as legacy, then you have to update it.

14.

Is It Possible To Create Zpool Using Files?

Answer»

YES. We can CREATE a zpool using FILES which are created by using mkfile command. 

Ex:

# mkfile 64M /TEST

# zpool create arenzpool /test

Yes. We can create a zpool using files which are created by using mkfile command. 

Ex:

# mkfile 64m /test

# zpool create arenzpool /test

15.

How To Rename The Zpool?

Answer»

We can rename the zpool USING below METHOD.

Step:1

Export the zpool

# zpool export pool_name

Step:2

Import the zpool NAME using new name.

# zpool import pool_name new_poolname

We can rename the zpool using below method.

Step:1

Export the zpool

# zpool export pool_name

Step:2

Import the zpool name using new name.

# zpool import pool_name new_poolname

16.

Is It Possible To Use Zfs As Swap In Solaris?

Answer»

Yes. We can USE ZFS EMULATED VOLUME as SWAP.

Yes. We can use ZFS emulated volume as swap.

17.

How To Do The Dry Run On Zpool?

Answer»

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:

arenapool

raidz1

cxtxdx

cxtxdx

cxtxdx

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:

arenapool

raidz1

cxtxdx

cxtxdx

cxtxdx

18.

What Is Emulated Volume In Zfs?

Answer»

It is a ZFS VOLUME WITHOUT ZFS FILESYSTEM on it.You can CREATE UFS/VXFS on this.

It is a ZFS volume without ZFS filesystem on it.You can create UFS/VXFS on this.

19.

Will Snapshot Consume Any Disk Space When You Create It?

Answer»

No.It will not consume any space when you create snapshot. The snapshot SIZE will GROW ACCORDING to data changes in the volume.

No.It will not consume any space when you create snapshot. The snapshot size will grow according to data changes in the volume.

20.

How To Create Zfs Data Set Like Vxvm/ufs Volume?

Answer»

By SETTING quota and RESERVATION for DATASET ,we can get volumes like vxvm.

By setting quota and reservation for dataset ,we can get volumes like vxvm.

21.

Is It Possible To Convert Root Filesystem From Ufs To Zfs?

Answer»

YES. We can convert ROOT FILESYSTEM from UFS to ZFS using live upgrade.

Yes. We can convert root filesystem from UFS to ZFS using live upgrade.

22.

How To Increase Rpool Size?

Answer»

We can INCREASE the rpool SIZE by using NEW big DISKS.

We can increase the rpool size by using new big disks.

23.

How To Assign Zpool/zfs Data Set To Local Zones?

Answer»

We can ASSIGN zpool/zfs to LOCAL ZONE.

We can assign zpool/zfs to local zone.

24.

Is It Possible To Recover Destroyed Zpool?

Answer»

YES. We can RECOVER DESTROYED ZPOOL.

Yes. We can recover destroyed zpool.

25.

How To Rename Zfs Data Set?

Answer»

We can USEZFS RENAME pool_name/dataset_name_old pool_name/dataset_name_new”.

We can use “zfs rename pool_name/dataset_name_old pool_name/dataset_name_new”.

26.

How To Set New Mount Point To Zfs Data Set?

Answer»

USINGZFS SET MOUNT point=/new mountpoint POOL name/dataset name.

Using “zfs set mount point=/new mountpoint pool name/dataset name.

27.

How To Destroy Zfs Data Set?

Answer»

USINGZFS DESTROY pool_name/dataset_name”.

Using “zfs destroy pool_name/dataset_name”.

28.

Best Practice Of Zfs Mirrored Root Pool Disk Replacement.

Answer»

You can perform the live disk REPLACEMENT if the server supports hot plug and rpool is mirrored.

Step:1 

OFFLINE the disk in zpool

# zpool offline rpool cxtxdx

Step:2 

Unconfigure the disk from OS level

# cfgadm -C unconfigure c1::dsk/cxtxdx

Step:3 

Physical replace the disk

Step:4 

Reconfigure the disk in OS level

# cfgadm -c configure c1::dsk/cxtxdx

Step:5 

Confirm that the replacement disk has an SMI label and a SLICE 0 to match the existing root pool configuration

Step:6

MAKING ZFS aware by using below command.

# zpool replace rpool cxtxdxs0

Step:7

Bring the disk in to zfs online.

# zpool online rpool cxtxdxs0

Step:8

Install the bootblock.

# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/cxtxdxs0

You can perform the live disk replacement if the server supports hot plug and rpool is mirrored.

Step:1 

Offline the disk in zpool

# zpool offline rpool cxtxdx

Step:2 

Unconfigure the disk from OS level

# cfgadm -c unconfigure c1::dsk/cxtxdx

Step:3 

Physical replace the disk

Step:4 

Reconfigure the disk in OS level

# cfgadm -c configure c1::dsk/cxtxdx

Step:5 

Confirm that the replacement disk has an SMI label and a slice 0 to match the existing root pool configuration

Step:6

Making ZFS aware by using below command.

# zpool replace rpool cxtxdxs0

Step:7

Bring the disk in to zfs online.

# zpool online rpool cxtxdxs0

Step:8

Install the bootblock.

# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/cxtxdxs0

29.

What Is Minimum Physical Memory If You Are Using Zfs?

Answer»

Normally we recommend USING 4GB PHYSICAL memory.

Normally we recommend using 4GB physical memory.

30.

Is Possible To Extend Zpool On Fly?

Answer»

Yes. You can extend the zpool in ONLINE by just adding new disks USING “zpool ADD pool_name cxtxdx ” COMMAND.

Yes. You can extend the zpool in online by just adding new disks using “zpool add pool_name cxtxdx ” command.

31.

Is Possible To Extend Zfs Data Set In Online?

Answer»

Yes. You can increase the ZFS dataset SIZE in ONLINE WITHOUT un-mounting it.

Yes. You can increase the ZFS dataset size in online without un-mounting it.

32.

Is It Possible To Use Fsck In Zfs?

Answer»

No. You can’t use FSCK in ZFS. You can CHECK the ZPOOL integrity using “zpool scrub POOL name”.

No. You can’t use fsck in ZFS. You can check the zpool integrity using “zpool scrub pool name”.

33.

How To List The Zfs Snapshots?

Answer»

Use “ZFS LIST |GREP @ ” to get the list of SNAPSHOTS.

Use “zfs list |grep @ ” to get the list of snapshots.

34.

How Many Pools Can Be Created In Solaris Global Zone?

Answer»

264 ZPOOL CA be CREATED in a SYSTEM.

264 zpool ca be created in a system.

35.

How Many Data Set Can Be Created Per Zpool?

Answer»

264 DATASET can be CREATED in SINGLE ZPOOL.

264 dataset can be created in single zpool.

36.

How Many Luns Or Disks Can Be Added To One Zpool?

Answer»

264 LUNS or DISKS can be ADDED to one zpool THEORETICALLY.

264 LUNS or DISKS can be added to one zpool theoretically.

37.

How To Create A New Dataset In Zfs?

Answer»

USING ZFS CREATE POOL NAME/dataset name.

Using zfs create pool name/dataset name.

38.

What Is Data Set In Zfs?

Answer»

ZFS data SET is a VIRTUAL filesystem LIKE VOLUME in VXVM terminology.

ZFS data set is a virtual filesystem like volume in VXVM terminology.

39.

How To List Zpools?

Answer»

USINGZPOOL LISTCOMMAND.

using “zpool list” command.

40.

Is It Possible To Reduce The Zpool Size?

Answer»

No.You can;t reduce the ZPOOL size SINCE all the DISKS will in stripped by DEFAULT.

No.You can;t reduce the zpool size since all the disks will in stripped by default.

41.

What Type Of Raid Levels Is Supported In Zfs?

Answer»
  1. Striped Vdev (RAID0)
  2. MIRRORED Vdev (RAID1)
  3. Stripe Mirrored Vdev (RAID10)
  4. RAIDZ (RAID5-Single parity)
  5. RAIDZ2 (RAID6-Double parity)
  6. RAIDZ3 (TRIPLE Parity)

42.

How To Create New Zpool?

Answer»

The NEW ZPOOL can be CREATE USING “zpool create pool_name cxtxdx cxtxdx ”.

The new zpool can be create using “zpool create pool_name cxtxdx cxtxdx ”.

43.

What Is Zfs?

Answer»

ZFS is FILESYSTEM CUM volume MANAGED developed by sun Microsystems (Now its Oracle).It is a 128-bit file SYSTEM.

ZFS is filesystem cum volume managed developed by sun Microsystems (Now its Oracle).It is a 128-bit file system.