[zfs-discuss] Rename disk labels in an already running zpool?

Gregor Kopka (@zfs-discuss) zfs-discuss at kopka.net
Sat Dec 2 15:36:09 EST 2017



Am 02.12.2017 um 11:21 schrieb Zenny:
> Thanks for the inputs
>
> First, I forgot to mention that the 'ls -la /dev/disk/by-id/' points
> sde and sda to other labels, too as follows:
>
>     lrwxrwxrwx 1 root root   9 Dec  2 08:08 wwn-0x5000c500a3eaef9e ->
>     ../../sde
>     lrwxrwxrwx 1 root root  10 Dec  2 08:08
>     wwn-0x5000c500a3eaef9e-part1 -> ../../sde1
>     lrwxrwxrwx 1 root root  10 Dec  2 08:08
>     wwn-0x5000c500a3eaef9e-part9 -> ../../sde9
>     lrwxrwxrwx 1 root root   9 Dec  2 08:08 wwn-0x5000c500a3ecb69f ->
>     ../../sda
>     lrwxrwxrwx 1 root root  10 Dec  2 08:08
>     wwn-0x5000c500a3ecb69f-part1 -> ../../sda1
>     lrwxrwxrwx 1 root root  10 Dec  2 08:08
>     wwn-0x5000c500a3ecb69f-part9 -> ../../sda9
>
>
>     lrwxrwxrwx 1 root root   9 Dec  2 08:08
>     ata-ST10000VN0004-1ZD101_ZA22435B -> ../../sde
>     lrwxrwxrwx 1 root root  10 Dec  2 08:08
>     ata-ST10000VN0004-1ZD101_ZA22435B-part1 -> ../../sde1
>     lrwxrwxrwx 1 root root  10 Dec  2 08:08
>     ata-ST10000VN0004-1ZD101_ZA22435B-part9 -> ../../sde9
>     lrwxrwxrwx 1 root root   9 Dec  2 08:08
>     ata-ST10000VN0004-1ZD101_ZA224RJK -> ../../sda
>     lrwxrwxrwx 1 root root  10 Dec  2 08:08
>     ata-ST10000VN0004-1ZD101_ZA224RJK-part1 -> ../../sda1
>     lrwxrwxrwx 1 root root  10 Dec  2 08:08
>     ata-ST10000VN0004-1ZD101_ZA224RJK-part9 -> ../../sda9
>
>
> If I execute after 'zpool export',
>
> # zpool import xtbmr /dev/disk/by-id
>
> which label will be imported between the one starts with ata- or with
> wwn-?
> How can I specify the specific labels beginning with ata-, but NOT wnn-?
In case zfs picks the 'wrong' ones: You can also create symlinks (with
the names you want) to the devices in question in a directory (and
specify that with -d)

> Second, what I derive is this is not possible to change labels with
> rpool as it gets mounted as soon as the OS gets booted, right?
You could modify the script in the iniramfs that imports the pool and
mounts the root dataset, if you really want/need.

Gregor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20171202/c37a2459/attachment.html>


More information about the zfs-discuss mailing list