Howdy,
Last night we had some bad weather where I live and we ended up with
some power problems. Ironically they went out a few hours after the
storm was gone. Anyway. I had all sorts of encrypted drives open.
My usual drives inside my puter plus the large 14TB external backup
drive that is still copying files over. Glad my UPS held up while I
closed all those drives and did a proper shutdown. Doing all that
tho, it made me think about if I wasn't here to do all that. Being
Linux, I'd suspect that upsmon would tell the puter to do a proper
shutdown which includes unmounting the file system, closing the
encrypted drives, like I do with cryptsetup close <name> etc and then shutting down. However, one has to ask, is it set up to do so by
default? I manage the encrypted drives manually. I don't use the
crypt services for that like people do when all of the system
drive(s) is encrypted or when just /home is encrypted. My encrypted
stuff is mounted within /home or for the external backups, in /mnt.
Thing is, some aren't open unless I'm using them or are external.
Since I do it manually, is there a tool that sees they need
unmounting and closing and does it or do I need to do something to
make sure it is done before a shutdown?
I suspect this would happen on its own but I'd like to make sure. I'd
hate to mess up the file system badly on any of my drives or in a
worst case scenario, brick a hard drive with some 1 in a million
chance problem.
I thought about having a drive connected, open and mounted that I
don't really need and just do a shutdown, see what happens. Then
again, why not ask and see if anyone else has had this happen and if
things turned out OK or if there was problems. I'm lucky, most of
the time I'm either home or very close by. Still, it can happen when
I'm not here. I already wonder if upsmon will kick in correctly and
do a proper shutdown. After all, it has never had to before. I'm
running on faith that it will. I hope I'm right.
Thoughts? Default will take care of things? I need to take steps to
be sure in case I'm not here? Personal experience? A good theory?
;-)
Howdy,
Last night we had some bad weather where I live and we ended up with
some power problems. Ironically they went out a few hours after the
storm was gone. Anyway. I had all sorts of encrypted drives open. My usual drives inside my puter plus the large 14TB external backup drive
that is still copying files over. Glad my UPS held up while I closed
all those drives and did a proper shutdown. Doing all that tho, it made
me think about if I wasn't here to do all that. Being Linux, I'd
suspect that upsmon would tell the puter to do a proper shutdown which includes unmounting the file system, closing the encrypted drives, like
I do with cryptsetup close <name> etc and then shutting down. However,
one has to ask, is it set up to do so by default? I manage the
encrypted drives manually. I don't use the crypt services for that like people do when all of the system drive(s) is encrypted or when just
/home is encrypted. My encrypted stuff is mounted within /home or for
the external backups, in /mnt. Thing is, some aren't open unless I'm
using them or are external. Since I do it manually, is there a tool
that sees they need unmounting and closing and does it or do I need to
do something to make sure it is done before a shutdown?
I suspect this would happen on its own but I'd like to make sure. I'd
hate to mess up the file system badly on any of my drives or in a worst
case scenario, brick a hard drive with some 1 in a million chance problem.
I thought about having a drive connected, open and mounted that I don't really need and just do a shutdown, see what happens. Then again, why
not ask and see if anyone else has had this happen and if things turned
out OK or if there was problems. I'm lucky, most of the time I'm either home or very close by. Still, it can happen when I'm not here. I
already wonder if upsmon will kick in correctly and do a proper
shutdown. After all, it has never had to before. I'm running on faith that it will. I hope I'm right.
Thoughts? Default will take care of things? I need to take steps to be sure in case I'm not here? Personal experience? A good theory? ;-)
Thanks.
Dale
:-) :-)
On 2022-09-11 20:56-0500 Dale <rdalek1967@gmail.com> wrote:
Howdy,Yes, /etc/init.d/mount-ro will take care of that. It first calls `sync`
Last night we had some bad weather where I live and we ended up with
some power problems. Ironically they went out a few hours after the
storm was gone. Anyway. I had all sorts of encrypted drives open.
My usual drives inside my puter plus the large 14TB external backup
drive that is still copying files over. Glad my UPS held up while I
closed all those drives and did a proper shutdown. Doing all that
tho, it made me think about if I wasn't here to do all that. Being
Linux, I'd suspect that upsmon would tell the puter to do a proper
shutdown which includes unmounting the file system, closing the
encrypted drives, like I do with cryptsetup close <name> etc and then
shutting down. However, one has to ask, is it set up to do so by
default? I manage the encrypted drives manually. I don't use the
crypt services for that like people do when all of the system
drive(s) is encrypted or when just /home is encrypted. My encrypted
stuff is mounted within /home or for the external backups, in /mnt.
Thing is, some aren't open unless I'm using them or are external.
Since I do it manually, is there a tool that sees they need
unmounting and closing and does it or do I need to do something to
make sure it is done before a shutdown?
I suspect this would happen on its own but I'd like to make sure. I'd
hate to mess up the file system badly on any of my drives or in a
worst case scenario, brick a hard drive with some 1 in a million
chance problem.
I thought about having a drive connected, open and mounted that I
don't really need and just do a shutdown, see what happens. Then
again, why not ask and see if anyone else has had this happen and if
things turned out OK or if there was problems. I'm lucky, most of
the time I'm either home or very close by. Still, it can happen when
I'm not here. I already wonder if upsmon will kick in correctly and
do a proper shutdown. After all, it has never had to before. I'm
running on faith that it will. I hope I'm right.
Thoughts? Default will take care of things? I need to take steps to
be sure in case I'm not here? Personal experience? A good theory?
;-)
and then calls `umount -r` on everything. It's set up to ruin on
shutdown by default. I'm sure systemd does something similar.
I don't think `cryptsetup luksClose` is necessary on shutdown, since it
only sets up the mapping(?).
Kind regards, tastytea
If your using nut, it has to be setup - and should be regularly tested
to make sure it works.
BillK
William Kenworthy wrote:
If your using nut, it has to be setup - and should be regularly tested
to make sure it works.
BillK
I think upsmon is part of nut. I keep forgetting that since the service
is ups something. Thing is, I've never quite figured out how to test it without unplugging and running down the batteries. I do have everything configured and have ever since I built this puter. I did the same on previous puter and UPS. Pretty sure it will work. When power blinks
etc, it does notice it and logs it in messages file. Also, the upsc
command outputs the info correctly when run.
I wish I could send a command to the UPS to fake a power failure, wait
say one minute and then it tell puter to shutdown all on its own. If it
does it correctly, it should work in the event of a actual power failure
and not run down my batteries either. I try to keep the batteries
topped off at all times since we do on occasion have some crazy driver
not watching where he/she is going and hits a power pole. Doesn't do
the pole any good and the car seems to not enjoy it either. :/
Sometimes the driver is no longer caring about it.
I actually wish I had a much larger external battery. Thing is, I'm concerned about the charging bit. The charging section in a UPS isn't
really that powerful since it mostly just keeps the batteries topped
off. I have 7Amp/hr batteries and I think it takes like 7 or 8 hours to charge from almost dead. I'd guess it is at most a 1 to 1.5 amp
charging circuit.
If you know of a command to test without running down batteries, I have
a Cyberpower UPS and I'm certainly interested. It's only a decade or so
old so has quite a few features. There may be a way to do this but I've
yet to find it.
Thanks.
Dale
:-) :-)
I suspect this would happen on its own but I'd like to make sure. I'd
hate to mess up the file system badly on any of my drives or in a worst
case scenario, brick a hard drive with some 1 in a million chance problem.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 302 |
Nodes: | 16 (0 / 16) |
Uptime: | 96:47:34 |
Calls: | 6,764 |
Calls today: | 2 |
Files: | 12,295 |
Messages: | 5,376,370 |
Posted today: | 1 |