I have been using an old computer to download my torrents and this has been my usual routine:
1. Press the power button.
2. Connect to the computer through Putty
3. Log in
4. Gain su privileges
mount -t ext4 /dev/vgTransmission/lvTransmission /mnt/transmissionVault
shutdown -h now
I was wondering if there is a way to configure a computer to automatically mount a logical volume “before” the transmission-daemon starts at boot up (note my first Startup Command).
I think the instructions here are related to what I want to do, but I want to get some advice before I attempt to do anything dangerous:
My perfect scenario would be:
1. Send WakeOnLan magic packet to computer to turn it on.
2. Computer boots up, mounts the transmissionVault logical volume
3. Wait 10 seconds to ensure that the logical volume has finished mounting
4. Start transmission-daemon
Send WakeOnLan magic packet to turn off computer, i.e.: Execute “shutdown -h now”
The shutdown command should include:
1. Stop transmission-daemon
2. Wait 10 seconds to ensure that transmission-daemon has finished shutting down
3. Umount transmissionVault logical volume
Recently the Ethernet port of my transmission box has stopped working, so I went ahead and swapped the motherboard with another old motherboard, added a few hard drives, installed a fresh copy of Debian, and re-created the LVM logical volume for transmissionVault. I pretty much have a fairly stock system running at the moment.
Running a headless 3.2.0-4-amd64