This will get you a mapping from the by-id to the by-path device names: for file in /dev/disk/by-id/*; do echo ${file/*\/} \ $(ls -l /dev/disk/by-path | grep $(ls -l $file | awk '{print $11}') | awk '{print $9}') done
...which should give you a start on writing a script to edit /etc/fstab. Look out for the multiple ways of specifying by-id and by-path devices in fstab, though. And it would probably make sense to create a backup in case the script misinterprets something. On Fri, Jan 15, 2010 at 1:57 PM, Ray Waters <ray.wat...@opensolutions.com>wrote: > I went ahead and started over and re-installed LINUX under my z/VM 540 > system. > > SUSE Linux Enterprise Server 10 SP2 (s390x) - Kernel 2.6.16.60-0.21 > > I see I still need to change /dev/disk/by-id to /dev/disk/by-path, so I > don't get hosed again. > > How is the best way to change my "by-path" to "by-id"? > > > LINUXEKM:/dev/disk # ls by-id > ccw-0X0150 > ccw-0X0150-part1 > ccw-0X0151 > ccw-0X0151-part1 > ccw-0X0152 > ccw-0X0152-part1 > ccw-0X0153 > ccw-0X0153-part1 > ccw-HTC.65000000028194.0100.70 > ccw-HTC.65000000028194.0100.70-part1 > ccw-HTC.65000000028194.0100.70.00000006000000370000000000000000 > ccw-HTC.65000000028194.0100.70.00000006000000370000000000000000-part1 > ccw-HTC.65000000028194.0100.70.0000003800000d0a0000000000000000 > ccw-HTC.65000000028194.0100.70.0000003800000d0a0000000000000000-part1 > ccw-HTC.65000000028194.0300.4c > ccw-HTC.65000000028194.0300.4c-part1 > ccw-HTC.65000000028194.0300.4c.0000000100000d0a0000000000000000 > ccw-HTC.65000000028194.0300.4c.0000000100000d0a0000000000000000-part1 > ccw-HTC.65000000028194.0800.3a > ccw-HTC.65000000028194.0800.3a-part1 > ccw-HTC.65000000028194.0800.3a.0000000100000d0a0000000000000000 > ccw-HTC.65000000028194.0800.3a.0000000100000d0a0000000000000000-part1 > LINUXEKM:/dev/disk # > > > LINUXEKM:/dev/disk # ls by-path > ccw-0.0.0150 ccw-0.0.0151-part1 ccw-0.0.0153 > ccw-0.0.0160-part1 > ccw-0.0.0150-part1 ccw-0.0.0152 ccw-0.0.0153-part1 > ccw-0.0.0151 ccw-0.0.0152-part1 ccw-0.0.0160 > LINUXEKM:/dev/disk # > > > > LINUXEKM:/proc # cat cmdline > root=/dev/disk/by-id/ccw-HTC.65000000028194.0800.3a.0000000100000d0a0000000000000000-part1 > TERM=dumb BOOT_IMAGE=0 > LINUXEKM:/proc # > > > > > LINUXEKM:/proc # cd dasd > LINUXEKM:/proc/dasd # ls -l > total 0 > -rw-r--r-- 1 root root 0 Jan 11 15:18 devices > -rw-r--r-- 1 root root 0 Jan 11 15:18 statistics > linux-etljzvm:/proc/dasd # cat devices > 0.0.0150(ECKD) at ( 94: 0) is dasda : active at blocksize: 4096, > 9000 blocks, 35 MB > 0.0.0151(ECKD) at ( 94: 4) is dasdb : active at blocksize: 4096, > 59094 0 blocks, 2308 MB > 0.0.0152(ECKD) at ( 94: 8) is dasdc : active at blocksize: 4096, > 60084 0 blocks, 2347 MB > 0.0.0153(ECKD) at ( 94: 12) is dasdd : active at blocksize: 4096, > 60084 0 blocks, 2347 MB > 0.0.0160(FBA ) at ( 94: 16) is dasde : active at blocksize: 512, > 200000 blocks, 97 MB > > Ray Waters > > NOTICE: > This e-mail is intended solely for the use of the individual to whom it is > addressed and may contain information that is privileged, confidential or > otherwise exempt from disclosure. If the reader of this e-mail is not the > intended recipient or the employee or agent responsible for delivering the > message to the intended recipient, you are hereby notified that any > dissemination, distribution, or copying of this communication is strictly > prohibited. If you have received this communication in error, please > immediately notify us by replying to the original message at the listed > email address. Thank You. > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or > visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390