I have two HDs in my computer, one of which has about 400 GB of unpartitioned space. I’m trying to create a partition on that disk that I can use as a “backup” partition for /home using something like rsync. However, I can’t seem to get the partition created correctly. What I’d like is to have it read/writable by both root and my normal user account, so I can run rsync in a cron job in the middle of the night. I’m using Yast to format the space to ext2, with the “mount as user” option, gid=users, and a mount point of /media/backup. It seemingly works, until I try something like cp foo.bar /media/backup. I don’t have permissions to create the file. So, I open up /etc/fstab and everything looks good. Ok, umount -a as root. Then mount -a as root. I get an error:
wrong fs type, bad option, bad superblock on /dev/sda4,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Thanks, Malcolm. I’m not actually the only user. Will I have to modify your code? I’ll be sure to try your suggesion later, but I’m afraid I may not have been clear with my original post. Getting write access as a user is now only half of my problem. The other half is that I can’t even get the partition mounted. I get the error from my original post when trying to mount. Even a reboot won’t mount the partition.
IMO you should check that /media/backup (I suppose root is the owner) is read/write/searchable for the world. Else a normal user is not alowed to write any file in it. That has nothing to do with mounting. Is always the case.
BTW, I should be carefull using umount -a. It unmounts all filesystems (though it will refuse to do so when they are in use) and I doubt if that is what you want.
I was right. It was a simple thing. I was trying to mount the drive with the command:
# mount /dev/sda4
I should have been using:
# mount /dev/sda4 /media/backup
I’m not sure why I need the mount point in the command, since the mount point is defined in fstab, but it seems that I do need to specify it when mounting manually. Once I got the disk mounted, I followed Malcolm’s advice, chown-ed and chmod-ed things around, and now all works as I was looking for.
And thanks to hcw for the advice about umount -a. You’re right, it was overkill for what I needed to do.