As we know Oracle made ZFS is a default root filesystem from Solaris 11 onwards. This shows their future plans of improving ZFS and making it as worlds best volume manager cum filesystem in near future.Customers would like to have ZFS in their environment since its a inbuilt volume manager and there is no additional operating cost unlike VXVM. They preferred ZFS data volumes in mid range servers and recommended as root FS in critical environment for its Liveupgrade facility. So each customer would like to have ZFS knowledgeable system admins on their environment.
Now a days you can expect more questions from ZFS in Solaris interviews. Here we will see some of common ZFS interview questions. More ZFS tips can be found here.
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)
# zpool create -n arenpool raidz cxtxdx cxtxdx cxtxdx
would create 'arenapool' with the following layout:
arenapool
raidz1
cxtxdx
cxtxdx
cxtxdx
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.
Step:1
Export the zpool
# zpool export pool_name
Step:2
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.
Ex:
# 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.
Rishu singh says
How to create a clone in ZFS ?
I read your all topics related to ZFS…u did great job….
Rajesh Kanna says
What is the difference between volsize,quota and reservation?
Abdul says
1. Volsize (Volume Size): Volsize refers to the maximum size that a ZFS dataset (such as a file system or volume) can grow to. It defines the upper limit of storage capacity that can be consumed by the dataset. When you create a ZFS dataset, you can specify its volsize to set this limit.
2.Quota: Quota is a limit set on the amount of storage space that a specific user or group can consume within a ZFS dataset. It restricts the total storage capacity that can be used by files owned by the user or group. When a quota is set, users or groups cannot exceed the allocated storage limit within the dataset, regardless of the available space in the overall pool.
3.Reservation: A reservation is a guarantee of a certain amount of storage capacity within a ZFS dataset. It ensures that a specified amount of space is reserved exclusively for a particular user, group, or application, regardless of the overall pool’s space availability. Reservations are typically used to prevent critical datasets from running out of space due to other datasets consuming all available space in the pool.
Vishwa says
Hi there,
what is difference between zfs dataset and zfs volume?
Lingeswaran R says
ZFS Volume – The Emulated volume is nothing but a portion of zpool space in a Raw format. You can even format this volume as UFS, Vxfs. You have to provide the size of the volume while creating it.
ZFS dataset – the Soft lawyer of ZPOOL. When you set the Quota & Reservation to the dataset, it can act like a Volume with ZFS FS.
ananda raman says
what is the difference between refquota and refreservation ?
Lingeswaran R says
The refquota and refreservation properties are used to manage file system space without accounting for disk space consumed by descendents, such as snapshots and clones.
quota & reservation will account snapshots & clones of the dataset.
Lingesh
ananda raman says
@Lingeswaran..just for my clarify,lets consider we have zpool say newpool size 10gb and inside that we created dataset “test” with quota 8gb and reservation 5gb..Now i have created snapshot of the dataset ..in this scenario how refquota and ref-reservation will be useful .Please let me know
manish says
how to remove disks from zfs pool…?
bala says
You cannot remove disk from zpool, unless its a hotspare.
Suresh Aesu says
You can remove (means detach) disk from pool ,If pool is configured as mirror pool