Sponsored Content
Top Forums UNIX for Advanced & Expert Users Command to see the logical volume path, device mapper path and its corresponding dm device path Post 303007747 by royalibrahim on Tuesday 21st of November 2017 03:56:28 AM
Old 11-21-2017
Command to see the logical volume path, device mapper path and its corresponding dm device path

Currently I am using this laborious command
Code:
lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3}  /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}'

Would like to know if there is any shorter method to get this mapping of combined output (lvpath, /dev/mapper/ and /dev/dm/* ), possibly a single command.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

serial port device path

hi. Im trying to install a switch. And the manual says i should type a command including a SerialPortDevicePath. which is the filepath to serial port used for connection. However.. nothing about how to find this info. Could anyone help me where to find this path? thx mr.T (6 Replies)
Discussion started by: tyskertøs
6 Replies

2. HP-UX

Question about the hareware path and device name

# ioscan -f | grep disk Class I H/W Path Driver S/W State H/W Type Description disk 3 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-N disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 146 GST3146707LC ... (1 Reply)
Discussion started by: bluepluto
1 Replies

3. AIX

Logical volume to raw device

Hy I have several logical volumes that are turned into raw devices used by Informix DB. I would like to add some more. In /dev directory i see logical volumes as block files: lv_name1, lv_name2 ... and i see raw devices defined as character files: rlv_name1, rlv_name2 ... As i see,... (5 Replies)
Discussion started by: veccinho
5 Replies

4. Shell Programming and Scripting

Executing Commands From Non-Standard Path (Changing user's PATH secretely???)

Hi: I have a requirement as below: I have some standard Unix commands modified and kept them in a directory say /usr/clsh/bin. For example I have a script named "ls" kept here which is modified version of "ls" (say it always gives long listing i.e. ls -l). When any user logs on and types... (2 Replies)
Discussion started by: ramesh_samane
2 Replies

5. Red Hat

device-mapper-multipath path [undef]

I have an HP blade with Qlogic HBA's connected to an EVA8000. I have downloaded the latest multipath.conf from HP's website. The drive presented to the server appears to be configured and working except the output of "multipath -l" shows for all paths. What is causing this output? mpath0... (2 Replies)
Discussion started by: manzier
2 Replies

6. UNIX for Advanced & Expert Users

PATH included in .o file of device driver

Hello friends, I am building one driver related to wifi. When I am looking its hex dump, I can see that it is including a path to one particular file of kernel headers. It is as under. 6C 75 65 2E 0A 00 00 00 25 64 2E 25 64 2E 25 64 lue.....%d.%d.%d 2D 25 73 00 00 00 00 00 42 45... (4 Replies)
Discussion started by: linuxdevnoob
4 Replies

7. Solaris

Tape device 1cbn path not getting created

After we upgraded one PW450 machine from (networker 7.2 & solaris 9) to (networker 7.4 and solaris 10) through scratch installation Only one of two HP tape drives is shown in inquire command And we are getting strange logs in messages file (attached) For 2nd drive 1cbn character specific file... (4 Replies)
Discussion started by: kashif_islam
4 Replies

8. Red Hat

Ethernet Port device path?

Hi, I have a server program that reads data coming in on USB ports. Device paths are in the format: /dev/ttyUSB0 Now, I would like to log data from another device coming in over Ethernet. My first step is trying to track down what the correct device path is which I am unsure of. Anyone... (9 Replies)
Discussion started by: fedora18
9 Replies

9. Shell Programming and Scripting

Moving files from parent path to multiple child path using bash in efficient way

Hi All, Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created. /Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt /Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Discussion started by: karthikgv417
6 Replies

10. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

Hello, I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
mkdevmaps(1M)						  System Administration Commands					     mkdevmaps(1M)

NAME
mkdevmaps - make device_maps entries SYNOPSIS
/usr/sbin/mkdevmaps DESCRIPTION
The mkdevmaps command writes to standard out a set of device_maps(4) entries describing the system's frame buffer, audio, and removable media devices. The mkdevmaps command is used by the init.d(4) scripts to create or update the /etc/security/device_maps file. Entries are generated based on the device special files found in /dev. For the different categories of devices, the mkdevmaps command checks for the following files under /dev: audio /dev/audio, /dev/audioctl, /dev/sound/... tape /dev/rst*, /dev/nrst*, /dev/rmt/... floppy /dev/diskette, /dev/fd*, /dev/rdiskette, /dev/rfd* removable disk /dev/dsk/c0t?d0s?, /dev/rdsk/c0t?d0s? frame buffer /dev/fb ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Obsolete | +-----------------------------+-----------------------------+ SEE ALSO
allocate(1), bsmconv(1M), attributes(5) NOTES
mkdevmaps might not be supported in a future release of the Solaris operating system. SunOS 5.11 8 Oct 2003 mkdevmaps(1M)
All times are GMT -4. The time now is 02:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy