Hello all. I have a drive that is dedicated as a backup device. I have a script that runs every night and backs up certain parts of the system to this drive. Now, the script mounts the drive and when the backup process is done, the drive is unmounted. I figure that my backed up data is more secure if I don't leave the drive mounted when its not in use. Also, I am going to be adding an hdparm command to power the drive down when the backup is completed also. Now, the question is since the drive and partition information is in both /etc/fstab and /etc/mtab, how do I go about stopping the boot process from mounting this drive automaically at boot but still give me the ability to do a "mount /backup" command from the script? thanks, Jim
On Mon, 27 Oct 2003 19:10:47 -0800
Jim Norton
how do I go about stopping the boot process from mounting this drive automaically at boot but still give me the ability to do a "mount /backup" command from the script?
Put noauto as one of the parameters for the partition in fstab. Charles -- "Whip me. Beat me. Make me maintain AIX." (By Stephan Zielinski)
On 10/28/2003 11:33 AM, Charles Philip Chan wrote:
On Mon, 27 Oct 2003 19:10:47 -0800 Jim Norton
wrote: how do I go about stopping the boot process from mounting this drive automaically at boot but still give me the ability to do a "mount /backup" command from the script?
Put noauto as one of the parameters for the partition in fstab.
Yes, the noauto does what you want, but I will share a gotcha, having already done exactly what you are doing. Assuming you do not boot every day, by mounting and unmounting the drive daily?, you can be sure your drive will be fsck'ed on every boot, at least ext2 and ext3, don't know how reiser handles the mount count check. -- Joe Morris New Tribes Mission Email Address: Joe_Morris@ntm.org Web Address: http://www.mydestiny.net/~joe_morris Registered Linux user 231871 God said, I AM that I AM. I say, by the grace of God, I am what I am.
On Tue, 28 Oct 2003 14:15:53 +0800
"Joe Morris (NTM)"
you can be sure your drive will be fsck'ed on every boot, at least ext2 and ext3, don't know how reiser handles the mount count check.
Don't know about Reiser, but for ext2/3 you can adjust that with tune2fs. Charles -- The nice thing about Windows is - It does not just crash, it displays a dialog box and lets you press 'OK' first. (Arno Schaefer's .sig)
On 10/28/2003 03:06 PM, Charles Philip Chan wrote:
On Tue, 28 Oct 2003 14:15:53 +0800 "Joe Morris (NTM)"
wrote: you can be sure your drive will be fsck'ed on every boot, at least ext2 and ext3, don't know how reiser handles the mount count check.
Don't know about Reiser, but for ext2/3 you can adjust that with tune2fs.
But when its months between reboots, and a script mounts and unmounts a drive every night, you would almost have to disable it for it not to fsck the disk. If the drive isn't too big, it may be acceptable. I know I just decided to leave it mounted, so it would be checked less frequently. Now, though, I am thinking I maybe should set it to check every reboot, even if it takes a while (2x80G, 1 40G), since it goes so long between reboots. It might be a good idea to verify data integrity every few months, or at least a couple times a year. ;-) Linux runs so solid, that reaching a mount count of 20 could take a long, long time. -- Joe Morris New Tribes Mission Email Address: Joe_Morris@ntm.org Web Address: http://www.mydestiny.net/~joe_morris Registered Linux user 231871 God said, I AM that I AM. I say, by the grace of God, I am what I am.
I have a second drive in /etc/fstab that mounts automatically, perhaps yours says noauto, this works -- /dev/hdc2 /usr1 reiserfs defaults 1 1 Regards Sid. Jim Norton wrote:
Hello all.
I have a drive that is dedicated as a backup device. I have a script that runs every night and backs up certain parts of the system to this drive.
Now, the script mounts the drive and when the backup process is done, the drive is unmounted.
I figure that my backed up data is more secure if I don't leave the drive mounted when its not in use. Also, I am going to be adding an hdparm command to power the drive down when the backup is completed also.
Now, the question is since the drive and partition information is in both /etc/fstab and /etc/mtab, how do I go about stopping the boot process from mounting this drive automaically at boot but still give me the ability to do a "mount /backup" command from the script?
thanks, Jim
participants (4)
-
Charles Philip Chan
-
Jim Norton
-
Joe Morris (NTM)
-
Sid Boyce