Slave HD questions

Hi all,

I installed a second HD, and formatted it to ext4. I gave it the “/backup” label. I am trying to figure out how to mount it so that I can run cron to backup my home folder onto it once a week.

This is what the fstab looks like now

/dev/disk/by-id/ata-ST3250410AS_6RYBS6D8-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-ST3250410AS_6RYBS6D8-part2 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-ST3250410AS_6RYBS6D8-part3 /home                ext4       acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
/dev/disk/by-id/ata-ST380815AS_6RABYKTG-part1 /backup              ext4       user,acl,user_xattr   1 2



How did you format it??

The easiest way is to use Yast. You can then define the mount point and it will be automagically added to the fstab.

And what exactly is the problem? I don’t see anything unusual in your fstab for the new disk. The only thing I can recommend is add to all ext4 partitions the ‘noatime’ option which can, in specific cases, increase performance by up to 30%

Should have looked at the table closer. Your new drive should be mounted as /backup in the root directory. As root user type mount -a or just reboot to see it.

Thanks for the replies.

I used gparted off a live cd to partition/format it.

I will add the “noatime”

It is listed in the root directory as a folder, but it only has root privileges.

Now my fstab looks like this:

/dev/disk/by-id/ata-ST3250410AS_6RYBS6D8-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-ST3250410AS_6RYBS6D8-part2 /                    ext4       acl,user_xattr,noatime 1 1
/dev/disk/by-id/ata-ST3250410AS_6RYBS6D8-part3 /home                ext4       acl,user_xattr,noatime 1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
/dev/disk/by-id/ata-ST380815AS_6RABYKTG-part1 /backup              ext4       user,acl,user_xattr,noatime 1 2



The actual folder /backup must exist in /
It’s confusing you say label, to me when you are taking partitioning I think of the HD’s ID or Volume Label
/backup in fstab is a mount point

/dev/disk/by-id/ata-ST380815AS_6RABYKTG-part1 /backup              ext4       acl,user_xattr,noatime 1 2

I removed a user duplicate

Mount the partition to /backup
open a console and change its permissions; chown yourusername:users /backup

when you unmount it, the /backup directory will get root:root permissions
when you mount it again, the /backup directory will have your username & group permissions

And why did you do that? I suspect he explicitly wants to be able to mount that partition as normal user, hence the ‘user’ option

Do not confuse ‘user’ with ‘user_xattr’. Those are two very different options

Thanks microchip,

That did the trick.

I am now copying stuff into the folder.I will be setting up my cron jobs to backup onto that drive.



First to make it clearl @Heeter: do not start changing anything when you are satisfied with what you are doing only because what I am grumbling about.

Why do you mount a disk that you do NOT want to use for the system, but for the end-user in /backup. I would mount it in /home/heeter/backup (and of course the owner:group of that directory will be heeter:users as all the other files/directories there). It is apparently for user heeter to back up things to and not for a system backup (where root is responsible).

If it is setup that way, wouldn’t it back up the /home folder in itself?

That is why I am setting it up that way.

I could be mistaken.


Note that there’s a difference between the ‘user’ option and the ‘users’ one. If you want to be able to always mount/unmount that partition at any time, you should use ‘users’ instead. The reason for this is that if you use ‘user’ and you reboot, the partition will be mounted again as the root user and the ‘user’ option only allows those who mounted the partition to unmount it again. Since root is used to mount during boot, only root will be able to unmount it again and if you need to unmount it after boot for whatever reasons with your normal user, you will fail and you’ll need to login as root to unmount it

If you use ‘users’ instead of ‘user’, any user can mount/unmount the partition so it doesn’t matter who mounted it. If root user mounts it and ‘users’ is present in fstab, you as normal user will be able to unmount it, in contrast to when only ‘user’ is present in fstab which will not allow you to unmount it as normal user since root has mounted it

Also, personally, I dislike polluting the / root tree with non-standard directories. If I was you, I’ll use /media, which is also the main directory used to mount portable devices, so I’ll create a backup dir in /media and change the /backup in fstab to /media/backup. But this is just me, you do as you please…

That depends on what/how you backup. I do not know what backup software you use, nor if you backup everything in /home (often people back up just their documents, music. movies), etc. It must be easy to tell your backup software to backup everything to /home/heeter/backup except /home/heeter/backup.

My post was because in general I see a total lack of background knowledge about the fact that in the Unix/Linux file hierarchy you can mount where needed. To me it seems that a lot of people are infected by some MS virus and do not understand the message that a partition does not have to be at the uppermost level (directly below /) like the (still worse) MS way of having it even as a new hierarchy.

But when you are aware of these facts and choose to mount on /backup, I am not telling you to do otherwise. It is your deecision after looking at the Pro and Con arguments. And that is as it should be, not doing what other stupids did or told you, but thinking about it and comming to a conclusion.

BTW, when you choose for the solution to mount this “user disk space” on a “system place” you should have thought about the fact that then the user must be the owner of this place :wink: The fact that you didn’t let me think that you did not realy understand the freedom the Unix/Linux way of mounting offers you and that let me make my post.


Thanks for all your responses…