?? How to auto mount logical volume before transmission-daemon starts at start up
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 Startup Commands: Code:
/etc/init.d/transmission-daemon stop Code:
/etc/init.d/transmission-daemon stop 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: http://tille.garrels.be/training/tld...#sect_04_02_04 My perfect scenario would be: Startup Routine: 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 Shutdown Routine: 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 |
For startup:
- mounting /mnt/transmissionVault can be done automagically via /etc/fstab (no reason why you shouldn't), - ensure /etc/init.d/transmission-daemon doesn't start on boot, - create a shell script that performs 'apt-get update; /etc/init.d/transmission-daemon start', - add script in /etc/crontab as a "@reboot" job. For shutdown: - umounting /mnt/transmissionVault can be done automagically via /etc/fstab, - stopping /etc/init.d/transmission-daemon can be done automagically as well, just depends on how you configured update-rc.d / insserv / whatever else Debian uses. |
Hi unSpawn, thank you for answering. Here's what I've put together so far. I haven't executed any of these on the computer yet.
Output of fdisk -l: Code:
Disk /dev/mapper/vgTransmission-lvTransmission: 2454.4 GB, 2454376677376 bytes Code:
/dev/mapper/vgTransmission-lvTransmission 2.2T 201M 2.1T 1% /mnt/transmissionVault - mounting /mnt/transmissionVault can be done automagically via /etc/fstab (no reason why you shouldn't), Output of “vi fstab”: Code:
# /etc/fstab: static file system information. Code:
update-rc.d -f transmission-daemon remove Script: Create the script inside “bin” folder: Code:
vi startTransmission Code:
# Script to update the system and start Transmission Code:
chmod 755 /etc/init.d/startTransmission Code:
update-rc.d startTransmission defaults I don't know how to do this, but this is what my crontab shows. Output of “vi crontab”: Code:
# /etc/crontab: system-wide crontab - umounting /mnt/transmissionVault can be done automagically via /etc/fstab, Does this cover both startup and shutdown? Code:
update-rc.d startTransmission defaults I think I have to modify this, I don't know what to modify though. Code:
/dev/vgTransmission/lvTransmission /mnt/transmissionVault ext4 defaults 0 1 |
Can someone check my previous post for errors?
|
All times are GMT -5. The time now is 06:11 PM. |