Solaris – Always Mount All ZFS Filesystems In Single User Mode

Traditionally I have always mounted just the filesystems I needed in single user mode whilst tinkering in Solaris. Turns out this is a dumb method for ZFS filesystems.

What happens is that the zfs mount command will create any directories necessary to mount the filesystem. Later this can stop other ZFS filesystems from mounting when the tinkering is finished. This could be an argument for not creating hierarchies of filesystems, but that’s rather extreme.

The better solution is to mount all the ZFS filesystems in one go with :-

zfs mount -a

Comments

2 responses to “Solaris – Always Mount All ZFS Filesystems In Single User Mode”

  1. Robert Milkowski avatar

    Perhaps ‘zpool import -R path pool’ would be useful to you.

  2. mike avatar

    It would have worked as an alternative solution to the problem I was facing. Just mounting the UFS filesystems you needed in single-user mode was a way of slightly reducing risk; as the old behaviour with ZFS increases risk because of the changed behaviour (not that the change itself is wrong mind you), mounting all ZFS filesystems is itself the right way to reduce risk.

Leave a Reply

Your email address will not be published. Required fields are marked *