Skip to contentSkip to conversation

path info cache

RFC christophe varoqui 2 participants 2 messages Jul 21, 2005 – Jul 24, 2005 Device mapper

lore
Share & tools
lore
#0 lore raw

I just merged a quite invasive patch that needs commenting.

The patch explore a new solution to /sbin/multipath inefficiency wrt systems with lots of paths.

What did we have :
==================
The previous attempt was the cache file plus hot/cold policy, which was suboptimal in many ways :

- hard to get the security right
- early userspace annoyances wrt umounted FS
- needs to allocate a few bytes on FS
- the 5 seconds hot to cold policy is not adequate for everyone (see recent Adic post)
- hard to settle on an a consensual FS location for the file

The proposed solution is : "/sbin/multipath asks the path cache to multipathd through its unix socket" (the same used for the CLI). When the ademon doesn't run, multipath has to do a full rescan.

What do we get :
================
- security is easy
- no more FS allocation to satisfy
- The daemon has its pathvec always up-to-date, thanks to its event-driven model. No more hot/cold policy.

What should be debated :
========================
- settle on a FS socket location (currently /var/cache/multipath/uxsock)
- people who care about early userspace have now 2 options :

- No daemon in early userspace, and disable hotplug-triggered multipath. /sbin/multipath is ran once.

- Start the daemon in early userspace, let multipath be hotplug-triggered

Comments and critics are welcome.
Regards,

Signature · 1 line
christophe varoqui <[email protected]>
#1 lore raw
Quoted 1 line · christophe varoqui

I just merged a quite invasive patch that needs commenting.

WIFI doesn't work for me at the Ottawa airport right now, so I'm commenting just on the basis of this mail instead of also looking at the code ;-)

I like the way this is going, btw. Thanks for all the good work.

Quoted 3 lines

The proposed solution is : "/sbin/multipath asks the path cache to multipathd through its unix socket" (the same used for the CLI). When the ademon doesn't run, multipath has to do a full rescan.

Yes. Can I try and summarize the new design doctrine to check whether I understand where you want to go?

"The daemon is authoritive. If it is running, all the cmdline tool does is talk to the daemon (unless explicitly instructed otherwise). If it is not, it'll have to do a one-shoot operation, which involves basically a full daemon startup (which includes the mentioned full rescan)."

Is that about correct? I think that direction will lead us to a much more coherent design over time, which basically might end up with multipath being a hard link to multipathd. I like that, it'll resolve some confusion about what goes into the daemon and what goes into the cmdline tool.

Quoted 3 lines

What should be debated :
========================
- settle on a FS socket location (currently /var/cache/multipath/uxsock)

I think sockets should go to /var/run/ somewhere according to the LSB File System Hierarchy standard.

Quoted 4 lines

- people who care about early userspace have now 2 options :

- No daemon in early userspace, and disable hotplug-triggered multipath. /sbin/multipath is ran once.

... and the daemon subsequently started later.

Quoted 2 lines

- Start the daemon in early userspace, let multipath be hotplug-triggered

This makes sense.

Thanks,
Lars

Signature · 4 lines
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"