Is it safe to gnome-session-quit && shutdown -h now?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a LUKS external partition that is automatically opened/mounted and closed/unmounted by pam_mount during login and logout. Right now I am having to log out in the terminal and then shutdown using the GUI at the login screen.
I want to write an alias for the command gnome-session-quit && shutdown -h now
to make this quick and easy but I don't know if this would affect the LUKS partition in any way if I don't give it enough time to gracefully unmount and close. I don't want to boot into a session where my encrypted drive fails to work because this command crashed it while it was still doing I/O operations.
partition encryption io luks cryptsetup
add a comment |Â
up vote
0
down vote
favorite
I have a LUKS external partition that is automatically opened/mounted and closed/unmounted by pam_mount during login and logout. Right now I am having to log out in the terminal and then shutdown using the GUI at the login screen.
I want to write an alias for the command gnome-session-quit && shutdown -h now
to make this quick and easy but I don't know if this would affect the LUKS partition in any way if I don't give it enough time to gracefully unmount and close. I don't want to boot into a session where my encrypted drive fails to work because this command crashed it while it was still doing I/O operations.
partition encryption io luks cryptsetup
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a LUKS external partition that is automatically opened/mounted and closed/unmounted by pam_mount during login and logout. Right now I am having to log out in the terminal and then shutdown using the GUI at the login screen.
I want to write an alias for the command gnome-session-quit && shutdown -h now
to make this quick and easy but I don't know if this would affect the LUKS partition in any way if I don't give it enough time to gracefully unmount and close. I don't want to boot into a session where my encrypted drive fails to work because this command crashed it while it was still doing I/O operations.
partition encryption io luks cryptsetup
I have a LUKS external partition that is automatically opened/mounted and closed/unmounted by pam_mount during login and logout. Right now I am having to log out in the terminal and then shutdown using the GUI at the login screen.
I want to write an alias for the command gnome-session-quit && shutdown -h now
to make this quick and easy but I don't know if this would affect the LUKS partition in any way if I don't give it enough time to gracefully unmount and close. I don't want to boot into a session where my encrypted drive fails to work because this command crashed it while it was still doing I/O operations.
partition encryption io luks cryptsetup
edited Jun 5 at 20:23
asked Jun 5 at 20:18
MyWrathAcademia
1409
1409
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
Shutdown will wait for disks to be unmounted. See https://serverfault.com/questions/327758/linux-graceful-shutdown or https://www.tldp.org/LDP/sag/html/shutdown.html
The command you've posted will shutdown without data loss from filesystem corruption.
So the command will work? Thats good to know, now I can make an alias for it. Your link does ay that shutdown is graceful, but it doesn't address whether pam_mount will still close the LUKS encrypted drive.
â MyWrathAcademia
Jun 7 at 13:37
@MyWrathAcademia if the partition is cleanlyumount
'ed, it shouldn't matter whether or not it gets aluksClose
since that doesn't do any writing to the drive itself anyway.
â Xen2050
Jun 16 at 3:40
thanks @Xen2050. Do you think I should set a timer in between the log off and shutdown, in order to ensure the partition is cleanly unmounted, e.g.gnome-session-quit && shutdown -h 1
? Or is a delay not necessary in your opinion.
â MyWrathAcademia
Jun 19 at 19:36
@MyWrathAcademia I'm not sure what gnome-session-quit umounts, but shutdown should be doing safe umounting anyway. Unless you're seeing errors (like dirty filesystems) I probably wouldn't bother with a delay, but if it's just a few seconds that might not be a big deal either
â Xen2050
Jun 29 at 22:31
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Shutdown will wait for disks to be unmounted. See https://serverfault.com/questions/327758/linux-graceful-shutdown or https://www.tldp.org/LDP/sag/html/shutdown.html
The command you've posted will shutdown without data loss from filesystem corruption.
So the command will work? Thats good to know, now I can make an alias for it. Your link does ay that shutdown is graceful, but it doesn't address whether pam_mount will still close the LUKS encrypted drive.
â MyWrathAcademia
Jun 7 at 13:37
@MyWrathAcademia if the partition is cleanlyumount
'ed, it shouldn't matter whether or not it gets aluksClose
since that doesn't do any writing to the drive itself anyway.
â Xen2050
Jun 16 at 3:40
thanks @Xen2050. Do you think I should set a timer in between the log off and shutdown, in order to ensure the partition is cleanly unmounted, e.g.gnome-session-quit && shutdown -h 1
? Or is a delay not necessary in your opinion.
â MyWrathAcademia
Jun 19 at 19:36
@MyWrathAcademia I'm not sure what gnome-session-quit umounts, but shutdown should be doing safe umounting anyway. Unless you're seeing errors (like dirty filesystems) I probably wouldn't bother with a delay, but if it's just a few seconds that might not be a big deal either
â Xen2050
Jun 29 at 22:31
add a comment |Â
up vote
2
down vote
Shutdown will wait for disks to be unmounted. See https://serverfault.com/questions/327758/linux-graceful-shutdown or https://www.tldp.org/LDP/sag/html/shutdown.html
The command you've posted will shutdown without data loss from filesystem corruption.
So the command will work? Thats good to know, now I can make an alias for it. Your link does ay that shutdown is graceful, but it doesn't address whether pam_mount will still close the LUKS encrypted drive.
â MyWrathAcademia
Jun 7 at 13:37
@MyWrathAcademia if the partition is cleanlyumount
'ed, it shouldn't matter whether or not it gets aluksClose
since that doesn't do any writing to the drive itself anyway.
â Xen2050
Jun 16 at 3:40
thanks @Xen2050. Do you think I should set a timer in between the log off and shutdown, in order to ensure the partition is cleanly unmounted, e.g.gnome-session-quit && shutdown -h 1
? Or is a delay not necessary in your opinion.
â MyWrathAcademia
Jun 19 at 19:36
@MyWrathAcademia I'm not sure what gnome-session-quit umounts, but shutdown should be doing safe umounting anyway. Unless you're seeing errors (like dirty filesystems) I probably wouldn't bother with a delay, but if it's just a few seconds that might not be a big deal either
â Xen2050
Jun 29 at 22:31
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Shutdown will wait for disks to be unmounted. See https://serverfault.com/questions/327758/linux-graceful-shutdown or https://www.tldp.org/LDP/sag/html/shutdown.html
The command you've posted will shutdown without data loss from filesystem corruption.
Shutdown will wait for disks to be unmounted. See https://serverfault.com/questions/327758/linux-graceful-shutdown or https://www.tldp.org/LDP/sag/html/shutdown.html
The command you've posted will shutdown without data loss from filesystem corruption.
answered Jun 5 at 22:31
Nick ODell
8922819
8922819
So the command will work? Thats good to know, now I can make an alias for it. Your link does ay that shutdown is graceful, but it doesn't address whether pam_mount will still close the LUKS encrypted drive.
â MyWrathAcademia
Jun 7 at 13:37
@MyWrathAcademia if the partition is cleanlyumount
'ed, it shouldn't matter whether or not it gets aluksClose
since that doesn't do any writing to the drive itself anyway.
â Xen2050
Jun 16 at 3:40
thanks @Xen2050. Do you think I should set a timer in between the log off and shutdown, in order to ensure the partition is cleanly unmounted, e.g.gnome-session-quit && shutdown -h 1
? Or is a delay not necessary in your opinion.
â MyWrathAcademia
Jun 19 at 19:36
@MyWrathAcademia I'm not sure what gnome-session-quit umounts, but shutdown should be doing safe umounting anyway. Unless you're seeing errors (like dirty filesystems) I probably wouldn't bother with a delay, but if it's just a few seconds that might not be a big deal either
â Xen2050
Jun 29 at 22:31
add a comment |Â
So the command will work? Thats good to know, now I can make an alias for it. Your link does ay that shutdown is graceful, but it doesn't address whether pam_mount will still close the LUKS encrypted drive.
â MyWrathAcademia
Jun 7 at 13:37
@MyWrathAcademia if the partition is cleanlyumount
'ed, it shouldn't matter whether or not it gets aluksClose
since that doesn't do any writing to the drive itself anyway.
â Xen2050
Jun 16 at 3:40
thanks @Xen2050. Do you think I should set a timer in between the log off and shutdown, in order to ensure the partition is cleanly unmounted, e.g.gnome-session-quit && shutdown -h 1
? Or is a delay not necessary in your opinion.
â MyWrathAcademia
Jun 19 at 19:36
@MyWrathAcademia I'm not sure what gnome-session-quit umounts, but shutdown should be doing safe umounting anyway. Unless you're seeing errors (like dirty filesystems) I probably wouldn't bother with a delay, but if it's just a few seconds that might not be a big deal either
â Xen2050
Jun 29 at 22:31
So the command will work? Thats good to know, now I can make an alias for it. Your link does ay that shutdown is graceful, but it doesn't address whether pam_mount will still close the LUKS encrypted drive.
â MyWrathAcademia
Jun 7 at 13:37
So the command will work? Thats good to know, now I can make an alias for it. Your link does ay that shutdown is graceful, but it doesn't address whether pam_mount will still close the LUKS encrypted drive.
â MyWrathAcademia
Jun 7 at 13:37
@MyWrathAcademia if the partition is cleanly
umount
'ed, it shouldn't matter whether or not it gets a luksClose
since that doesn't do any writing to the drive itself anyway.â Xen2050
Jun 16 at 3:40
@MyWrathAcademia if the partition is cleanly
umount
'ed, it shouldn't matter whether or not it gets a luksClose
since that doesn't do any writing to the drive itself anyway.â Xen2050
Jun 16 at 3:40
thanks @Xen2050. Do you think I should set a timer in between the log off and shutdown, in order to ensure the partition is cleanly unmounted, e.g.
gnome-session-quit && shutdown -h 1
? Or is a delay not necessary in your opinion.â MyWrathAcademia
Jun 19 at 19:36
thanks @Xen2050. Do you think I should set a timer in between the log off and shutdown, in order to ensure the partition is cleanly unmounted, e.g.
gnome-session-quit && shutdown -h 1
? Or is a delay not necessary in your opinion.â MyWrathAcademia
Jun 19 at 19:36
@MyWrathAcademia I'm not sure what gnome-session-quit umounts, but shutdown should be doing safe umounting anyway. Unless you're seeing errors (like dirty filesystems) I probably wouldn't bother with a delay, but if it's just a few seconds that might not be a big deal either
â Xen2050
Jun 29 at 22:31
@MyWrathAcademia I'm not sure what gnome-session-quit umounts, but shutdown should be doing safe umounting anyway. Unless you're seeing errors (like dirty filesystems) I probably wouldn't bother with a delay, but if it's just a few seconds that might not be a big deal either
â Xen2050
Jun 29 at 22:31
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f448070%2fis-it-safe-to-gnome-session-quit-shutdown-h-now%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password