Re: During shutdown/reboot Network Subsystem v/s Storage Subsystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 14 Mar 2018 11:53:33 +0530, jitendra kumar khasdev said:

> eg. when we do shutdown, which (network or storage)stack goes down first?

Hint:

What order do these *have* to happen in?

What happens if you shut down the network before unmounting an NFS share, or if
you pixie-booted onto an iscsi-based rootfs?

What happens if you spin down the disks before the network is down? (Hint 2 - how
do you load /sbin/ifconfig to 'ifconfig em1 down' if the filesystem is unmounted?)

For bonus points, how do you shut down all of the storage stack before everything
else (since processes have a current working directory which will make the filesystem
"busy")?  And how do you unmount that last filesystem? :)

If you're lucky enough to still be running a sysvinit-based init, boot/shutdown is
controlled by the 'Knnwnatever' files in /etc/rc.d/rc5.d (usually), so perusing those
will tell you most of what happens during boot and shutdown. (The quick summary-
at startup, it runs all the S* scripts in order, S00whatever through S99whatever.
And 'man 8 init' should have all the gory details for you.

If you have systemd, you'll have to do a 'systemctl show' on each service,
look at all the Name/Requires/Conflicts/Before/After/TriggeredBy tags and
build an ordered graph of what gets called for what (keeping in mind that
things happen in parallel, so you'll have a bazillion units that all reference
network.service and a few other key checkpoints in the boot process)

Attachment: pgphB_MsCZM3x.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux