I am already using symlinks.
But the problem is the ZFS framework won't know about them .
I would expect something like this from ZVOL specially abstracting the poolname path from zvol. Specially since many database will store the path names in their metadata and is hard to change later on.

Regards,
Jignesh


Jonathan Edwards wrote:


On Dec 8, 2006, at 05:20, Jignesh K. Shah wrote:


Hello ZFS Experts

I have two ZFS pools zpool1 and zpool2

I am trying to create bunch of zvols such that their paths are similar except for consisent number scheme without reference to the zpools that actually belong. (This will allow me to have common references in my setup scripts)



If I create
zfs create -V 100g zpool1/tablespace1
zfs create -V 100g zpool2/tablespace2
zfs create -V 100g zpool1/tablespace3
zfs create -V 100g zpool2/tablespace4

Then I get
/dev/zvol/rdsk/zpool1/tablespace1
/dev/zvol/rdsk/zpool1/tablespace2
/dev/zvol/rdsk/zpool1/tablespace3
/dev/zvol/rdsk/zpool2/tablespace4

As you notice I have two series zpool and tablespace.. I am trying to eliminate 1 series. So I tried


zfs create zpool1/dbdata1
zfs create zpool2/dbdata2
zfs create zpool1/dbdata3
zfs create zpool2/dbdata4

And changed their mount point as follows
zfs set mountpoint=/tablespace1 zpool1/dbdata1
zfs set mountpoint=/tablespace2 zpool1/dbdata2
zfs set mountpoint=/tablespace3 zpool2/dbdata3
zfs set mountpoint=/tablespace4 zpool2/dbdata4


And then created a common zvol name for all pools:

zfs create -V 100g zpool1/dbdata1/data
zfs create -V 100g zpool2/dbdata2/data
zfs create -V 100g zpool1/dbdata3/data
zfs create -V 100g zpool2/dbdata4/data

I was expecting I will get
/dev/zvol/rdsk/tablespace1/data
/dev/zvol/rdsk/tablespace2/data
/dev/zvol/rdsk/tablespace3/data
/dev/zvol/rdsk/tablespace4/data

Instead I got

/dev/zvol/rdsk/zpool1/dbdata1/data
/dev/zvol/rdsk/zpool2/dbdata2/data
/dev/zvol/rdsk/zpool1/dbdata3/data
/dev/zvol/rdsk/zpool2/dbdata4/data


Any idea how do I get my abstracted zvol paths like I can do with my mountpoints in regular ZFS.


setting the mountpoint isn't going to affect the volume name .. for vanity zvol paths you'll have to use symlinks .. try:

mkdir /dev/zvol/rdsk/tablespace1 /dev/zvol/dsk/tablespace1
ln -s /dev/zvol/rdsk/zpool1/dbdata1/data /dev/zvol/rdsk/tablespace1/data
ln -s /dev/zvol/dsk/zpool1/dbdata1/data /dev/zvol/rdsk/tablespace1/data
... etc ...

or better yet, simply link to the underlying /devices entry and you don't even have to keep it in the /dev/zvol tree since everything in the /dev tree is a symlink anyhow ..

.je

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to