[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fstab update for persistent device names



On Thu, Jul 26, 2007 at 11:40:19AM +0200, Bastian Blank wrote:
> Hi folks
> 
> For the libata-pata support we need to change fstab on several arches to
> not break all systems which uses them.

Not to mention bootloader configs and other things that may handle
dump partitions.

> We need to decide which arches needs this rewrite now and which value
> should be filed in.

And also, how should we re-write them? Should we just provide
documentation, or also provide a utility to do it?

linux-images w/ libata-pata should probably detect non-persistent
names and fail to install, telling the user they need to run the
upgrade utility (or manually upgrade) before continuing.

> There are 5 or so variants:
> - /dev/disk/by-id: Includes disk serial number or wwnn.
> - /dev/disk/by-label: Filesystem label.

Do all filesystems support labels? fat doesn't, iirc.

> - /dev/disk/by-path: Includes pci device and lun.
> - /dev/disk/by-uuid: UUID of filesystem. Maybe we want the uuid of md
>   devices also?

Do all filesystems support UUID? 

> - LABEL=
> - UUID=

Another option is to leave the option to the user with a sane default.
I'm thinking something like:
 1) scan all config files we know about that contain such references
 2) Probe these devices for available persistent-names
 3) Present the list of available names to the user
 4) re-write all config files that reference that device

For 4), we could either try and incorporate all config file knowledge
in the utility, or provide a hook system by which we make a name map
available but each package is responsible for doing its own
renaming. The latter would give us a pass on the "don't edit other
package's config files" rule.

> We have to support the following device types, I think:
> - pata, sata, parallel scsi, sas
>   No problem, I would prefer by-id. It should be stable for this types
>   of devices. So a user needs to fix this entry for a disk replacement.
> - fiberchannel
>   by-id. It includes the wwnn, which is defined as unique for each
>   device. If someone have more than one path to the disk, they need
>   multipath-tools anyway, which creates /dev/mapper/$wwnn.
> - iscsi
>   This is a problem. iscsi have a stable identifier for a device, but it
>   is not exported by udev. udev provides the following:
>   | /dev/disk/by-id/scsi-16465616462656166333a3100000000000000000000000000
>   This is the usual disc identification. And:
>   | /dev/disk/by-path/ip-192.168.9.13:3260-iscsi-iqn.2007-07.org.zseries.debian00:storage.org.zseries.debian04v4-lun-1
>   This includes the ip of the target, the id and the lun. The id is
>   defined to be unique for a device.
>   Maybe we want something like
>   by-id/iscsi-iqn.2007-07.org.zseries.debian00:storage.org.zseries.debian04v4-lun-1.
>   More than one path needs multipath-tools also.
> 
> The following devices can be ignored:
> - md*
> - mapper/*
> - lvm symlinks
> 
> Or should we ignore all devices which we don't know about?

I would think so.

-- 
dann frazier



Reply to: