Hi everyone. I was just wondering if there was a way to for a specific vdev in a pool to be read-only? I can think of several uses for this, but would need to know if it was possible before thinking them through properly. Cheers Mouse -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20110408/bc3512ea/attachment-0001.html>
On 08 April, 2011 - Karl Wagner sent me these 3,5K bytes:> Hi everyone. > > > > I was just wondering if there was a way to for a specific vdev in a pool to > be read-only? > > > > I can think of several uses for this, but would need to know if it was > possible before thinking them through properly.I can''t think of any, so what are your uses? /Tomas -- Tomas ?gren, stric at acc.umu.se, http://www.acc.umu.se/~stric/ |- Student at Computing Science, University of Ume? `- Sysadmin at {cs,acc}.umu.se
> -----Original Message----- > From: Tomas ?gren [mailto:stric at acc.umu.se] > Sent: 08 April 2011 11:23 > To: Karl Wagner > Cc: zfs-discuss at opensolaris.org > Subject: Re: [zfs-discuss] Read-only vdev > > On 08 April, 2011 - Karl Wagner sent me these 3,5K bytes: > > > Hi everyone. > > > > > > > > I was just wondering if there was a way to for a specific vdev in a pool > to > > be read-only? > > > > > > > > I can think of several uses for this, but would need to know if it was > > possible before thinking them through properly. > > I can''t think of any, so what are your uses?(sorry for the resend Tomas, I realised just as I pressed send that I''d sent it just to your address) One of them was simply an alternative way to do a "live CD" environment. As ZFS already does COW etc, it would avoid all the hassle you get in e.g. linux. You could have a ZFS vdev on the CD, then use a RAM disk as a second vdev. Another would be, in the case of a failing disk, set that vdev to read-only to mitigate the chances of data loss until you can replace the disk.
On Apr 8, 2011, at 2:38 PM, Karl Wagner wrote:> One of them was simply an alternative way to do a "live CD" environment. As > ZFS already does COW etc, it would avoid all the hassle you get in e.g. > linux. You could have a ZFS vdev on the CD, then use a RAM disk as a second > vdev.IIRC this idea was discussed here in the past, and there is an RFE for this.> Another would be, in the case of a failing disk, set that vdev to read-only > to mitigate the chances of data loss until you can replace the disk.We already avoid allocating new blocks from failing top-level vdevs, see metaslab_alloc_dva(): http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/zfs/metaslab.c#1334 Victor