Setting up External Hard Drive (USB) as a backup system on Slack 12.0
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Setting up External Hard Drive (USB) as a backup system on Slack 12.0
Hey everyone,
I recently got a USB external hard drive for use as a backup system. Now, I am using this hard drive as a backup for a windows computer as well. Basically all I can do right now is mount it (using mount /dev/sdb1 /mnt/tmp) and see the windows file system, but not write to it. So there are a few things I need to know how to do:
1) Make a linux partition (ext2 I suppose) on the harddrive that I can write to...is fdisk the way to go?
2) Make it so that when my computer boots up, if the hard drive is connected it automatically mounts (this is something in fstab obviously, but I know there is some kind of problem with naming sda1,sdb1, etc...how can I make sure the computer can find the linux partition every time? Is there a unique name somewhere I can use, or I've heard about "udev rules" as well...)
3) Some advice on permissions for this kind of process...ie if I am running backups every week or so, should I just keep the hard drive on root permissions, or maybe user-read only or something?
I don't need to many details, mostly just commands to use so I can start doing some web searching.
You don't necessarily need a Linux partition on the disk. NTFS or FAT32 are fine, too. For NTFS you will need ntfs-3g installed (take a slackbuild script from 12.1/12.2 or from http://www.slackbuilds.org .
You only have to look at "umask" to make the partition writable for you as normal user (if you want that).
ok cool thanks for the reply...I've got ntfs-3g on my system already, so that should be fine, but I tried to assign my hard drive a rule via udev and failed. I used
# ls /dev/exthd*
/dev/exthd@
# file /dev/exthd
/dev/exthd: symbolic link to `sdb'
so it makes a link to sdb, not sdb1 or whatever. I know that sdb1 is what I want to try to mount, so how do I incorpoerate that into the rule? I figured the "%n" on the SYMLINK command would make that happen. Any ideas?
I'm not sure if ntfs-3g has done this differently or not, but the windows implementation of NTFS has (or had) some issues regarding storing dates in UTC, but ignoring daylight savings. This could add or subtract an hour here or there... or something like that.
I don't know if that's still the case, I don't know if ntfs-3g does it that way or not, and I don't even know if that would be important to you! I've seen it cause issues for people in the past, so I figured I'd throw it out as a heads up.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.