1

I've created an LVM2 script in /etc/init.d/lvm2 and registered it with update-rc for startup, now the manuals I am reading states "immediately after all filesystems were unmounted:" that this should be ran:

vgchange -a n

Where would I place this script, so that it is called to unmount all mounted LVM partitions?

Will I need to implement "start" and "stop" parameters somehow in to my lvm2 script and use update-rc to tell them to use those? I am not sure.

Robert Renu.
  • 81
  • 1
  • 4

1 Answers1

1

Will I need to implement "start" and "stop" parameters somehow in to my lvm2 script

Yes, if you use update-rc or create link in /etc/rc?.d.

and use update-rc to tell them to use those?

Yes, if you need it to run at startup or shutdown of the system.

alvosu
  • 8,357
  • 24
  • 22