Operating System - HP-UX
1820254 Members
2855 Online
109622 Solutions
New Discussion юеВ

Re: What are difference betaween /sbin/vg* ,lv* and /usr/sbin/vg* ,lv*?

 
SOLVED
Go to solution
Worapoj P.
Regular Advisor

What are difference betaween /sbin/vg* ,lv* and /usr/sbin/vg* ,lv*?

Dear all expertise,

Please help me to explain, what are difference between those files located in /sbin/vg*,lv* and
/usr/sbin/vg*,lv* ? Because of they do same function but difference file size and wasn't symbolic link.

Thank advance for your answer,
Best regards,
Worapoj P.
For LOVE For Honor For Mankind
4 REPLIES 4
Steven Sim Kok Leong
Honored Contributor

Re: What are difference betaween /sbin/vg* ,lv* and /usr/sbin/vg* ,lv*?

Hi,

The binaries in /sbin are accessible from single-user-mode ie. boot-up time. If I am right, they are stripped-down versions that are sufficient for activating the volume groups as well as health-checks at boot-up.

The binaries in /usr/sbin has full-fledged usage when /usr is mounted in the other run-levels.

Regards.

Steven Sim.
John Palmer
Honored Contributor

Re: What are difference betaween /sbin/vg* ,lv* and /usr/sbin/vg* ,lv*?

I don't believe that the /sbin binaries lack any functionality. They are statically linked so don't require any shared libraries in /usr so are functional as Steven Sim explains at boot time before /usr is mounted.
The 'file' command will give some details eg
file /sbin/vgimport
/sbin/vgimport: PA-RISC1.1 shared executable
file /usr/sbin/vgimport
/usr/sbin/vgimport: PA-RISC1.1 shared executable dynamically linked
Steven Sim Kok Leong
Honored Contributor
Solution

Re: What are difference betaween /sbin/vg* ,lv* and /usr/sbin/vg* ,lv*?

Hi,

Thanks for the correction!

Had forgotten all about that. Since /usr is not mounted and thus the libraries in /usr/lib are not accessible at boot-time, the binaries in /sbin have to be statically-linked.

Regards.

Steven Sim.
Emmanuel Eyer
Frequent Advisor

Re: What are difference betaween /sbin/vg* ,lv* and /usr/sbin/vg* ,lv*?

Yep, and that's not only the LVM commands' case. In fact all /sbin commands have their dynamically-linked counterparts in /usr/sbin or /usr/bin.

In addition, all vg* and lv* (in the same directory) are hard-links. There's only one single executable (well, two ;-) that does all the job.

Have fun! Emmanuel