syncing two hard drives

Hi all
The crash I had taking out one drive screwed the other a bit as well, but I did in the end get the backed up files off if.
I’m going to reformat the whole second drive, and install suse in a small 10 GB partition, which will leave 230GB.

How difficult is is to keep the /home partition backed daily on to the second drive, but having to mount the drive before each backup and unmounting afterwards. So if one gets screwed I have a daily backup on each drive and access to the second drive directly from the OS on the 10 GB partition on it…

I’ve learnt lightning can strike in the same place twice :wink:

cheers
Richard

Hi
Just create a software RAID mirror? You could also use a root cron job
to mount the device and run you sync commands as your user.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.24-0.2-default
up 6:02, 2 users, load average: 0.01, 0.05, 0.01
GPU GeForce 8600 GTS Silent - Driver Version: 260.19.21

On 2010-11-12 23:02, malcolmlewis wrote:

> Hi
> Just create a software RAID mirror? You could also use a root cron job
> to mount the device and run you sync commands as your user.

Backups are safer than a RAID: an error will corrupt both copies of a
mirror at the same time.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Hi guys
I’m having a bit of trouble getting my fstab right
what I want is for sdb3 & sdb4 not to be mounted at boot, but when mounted I can move files back and forward between sda* and either sdb3 or sdb4 , they are mounted as srv1 and srv2. I would like them to appear in the places menu ( gnome), so that to access user, or root password is given. It would be nice to be able to execute a file, on these two partitions but not essential.
What happens so far is that both srv1 and srv2 appear in nautilus, but I cant move files into them, as they are empty I can’t check the other way. As they apper in the file manager, they are not listed separately in the places menu.

Here’s my attempt at fstab:-

/dev/disk/by-id/ata-Hitachi_HDS721050CLA362_JPB540HA111KXB-part2 / ext4 acl,user_xattr 1 1
/dev/sda3 /home ext4 acl,user_xattr 1 2
/dev/sda4 /multimedia ext4 acl,user_xattr 1 2
/dev/disk/by-id/ata-Hitachi_HDS721050CLA362_JPB540HA111KXB-part1 swap swap defaults 0 0
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-ExcelStor_Technology_J9250S_GEK234T2ALPJ9B-part3 /srv1
/dev/sdb3 /srv1 ext4 noauto,rw,user,exec 2 1
/dev/disk/by-id/ata-ExcelStor_Technology_J9250S_GEK234T2ALPJ9B-part4 /srv2
/dev/sdb4 /srv2 ext4 noauto,rw,user,exec 2 1

I put the exec in after user to try and get executable file file to run, even though I used user.
the fstab wiki does not list all the switches :frowning:

Thanks
Richard

On 2010-11-13 12:06, rb004a0345 wrote:
>
> Hi guys
> I’m having a bit of trouble getting my fstab right
> what I want is for sdb3 & sdb4 not to be mounted at boot,

That’s “noauto”.

> but when
> mounted I can move files back and forward between sda* and either sdb3
> or sdb4 , they are mounted as srv1 and srv2.

Being ext4 means that linux permissions apply regardless of who mounts them.

> I would like them to appear
> in the places menu ( gnome),

I don’t know about that.

> so that to access user, or root password is
> given.

With “user” any user can mount them, without asking for a password. If you
want a user password asked, don’t use “user”, and mount via command line
with “sudo” - but you have to reconfigure sudo entirely.

> It would be nice to be able to execute a file, on these two
> partitions but not essential.

Thats “exec”.

> What happens so far is that both srv1 and srv2 appear in nautilus, but
> I cant move files into them, as they are empty I can’t check the other
> way.

You have to mount them first - manually. Having an entry in fstab disables
desktop click mounting, I understand.

> As they apper in the file manager, they are not listed separately
> in the places menu.
>
> Here’s my attempt at fstab:-

code:

> /dev/disk/by-id/ata-ExcelStor_Technology_J9250S_GEK234T2ALPJ9B-part3 /srv1
> /dev/sdb3 /srv1 ext4 noauto,rw,user,exec 2 1

> /dev/disk/by-id/ata-ExcelStor_Technology_J9250S_GEK234T2ALPJ9B-part4 /srv2
> /dev/sdb4 /srv2 ext4 noauto,rw,user,exec 2 1


Two entries for srv1 and srv2? That will cause problems.

> the fstab wiki does not list all the switches :frowning:

But the manual does :wink:


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

[QUOTE=robin_listas;2252154]On 2010-11-13 12:06, rb004a0345 wrote:
>
> Hi guys
> I’m having a bit of trouble getting my fstab right
> what I want is for sdb3 & sdb4 not to be mounted at boot,

That’s “noauto”.

> but when
> mounted I can move files back and forward between sda* and either sdb3
> or sdb4 , they are mounted as srv1 and srv2.

Being ext4 means that linux permissions apply regardless of who mounts them.

> I would like them to appear
> in the places menu ( gnome),

I don’t know about that.

> so that to access user, or root password is
> given.

With “user” any user can mount them, without asking for a password. If you
want a user password asked, don’t use “user”, and mount via command line
with “sudo” - but you have to reconfigure sudo entirely.

> It would be nice to be able to execute a file, on these two
> partitions but not essential.

Thats “exec”.

> What happens so far is that both srv1 and srv2 appear in nautilus, but
> I cant move files into them, as they are empty I can’t check the other
> way.

You have to mount them first - manually. Having an entry in fstab disables
desktop click mounting, I understand.

> As they apper in the file manager, they are not listed separately
> in the places menu.
>
> Here’s my attempt at fstab:-

code:

> /dev/disk/by-id/ata-ExcelStor_Technology_J9250S_GEK234T2ALPJ9B-part3 /srv1
> /dev/sdb3 /srv1 ext4 noauto,rw,user,exec 2 1

> /dev/disk/by-id/ata-ExcelStor_Technology_J9250S_GEK234T2ALPJ9B-part4 /srv2
> /dev/sdb4 /srv2 ext4 noauto,rw,user,exec 2 1


Two entries for srv1 and srv2? That will cause problems.

> the fstab wiki does not list all the switches :frowning:

But the manual does :wink:

Hi Robin, man fstab , is that what you are referring to ?
That IMO falls into the category of many of the man pages, written by someone who knows what they are doing , but fails badly in being concise and easy to understand.

Lets try and put my question another way.
Since, the HD was replaced after it wrecked itself while both drives have been in use,
I have not been able to, as a user, access the second drive., even as root recovering the backup files was difficult.
Having chmod everything in each directory before it would allow me to move a file, and then again once on the main HD.
Some files lost in the process as recursive switches would not work.
Without adding anything to the fstab , I can access the partition on the second HD which has another OS installed, but NOT the other two partitions which are now formatted ext4,
As soon as you click on the partition in “places” and give the root password it disappears, even in nautilus as root, I cant grab a file off the desktop and drop it into the partition.

hence the reason for attempting to make it usable with fstab.
When that partition was ext3 and I was running Fed13 and before MDV I could use it as another directory as a user, and with just 2x 250 GB drives it got heavily used for storage of sound and video files.

With my current fstab it should IIMO be usable as a user to move file back and forward between the two HDs , it is not…

Does that make my question clear…

if not the simplest solution may be to build another machine and network backup.

thanks
Richard

On 2010-11-14 08:36, rb004a0345 wrote:
>
> robin_listas;2252154 Wrote:

>>> the fstab wiki does not list all the switches :frowning:
>>
>> But the manual does :wink:
>>
>>
>> Hi Robin, man fstab , is that what you are referring to ?

yes, and mount. There are several pages.

>> That IMO falls into the category of many of the man pages, written by
>> someone who knows what they are doing , but fails badly in being concise
>> and easy to understand.

True.

But it is what we have.

>> Lets try and put my question another way.
>> Since, the HD was replaced after it wrecked itself while both drives
>> have been in use,
>> I have not been able to, as a user, access the second drive., even as
>> root recovering the backup files was difficult.
>> Having chmod everything in each directory before it would allow me to
>> move a file, and then again once on the main HD.

That has nothing to do with fstab or mount options. It is a basic
permission problem. You have to understand how it works: any unix/linux
book would do.

Said otherwise: there is nothing you can do in fstab so that you can access
files in an ext4 partition, as user.

I guess that you created the files as a user in one system, and when you
migrated to another system you did not give the new user the same UUID. The
method for “repair” would be a recursive change of permissions and/or
ownership.

For example:

Code:

find /data/video/ -type f -exec chmod u+r+w,g+r+w,o-r-x-w ‘{}’ ;
find /data/video/ -type d -exec chmod u+r+w+x,g+w+r+x,o-x-r-w ‘{}’ ;
find /data/video/ -type f -exec chown myuser:users ‘{}’ ;
find /data/video/ -type d -exec chown myuser:users ‘{}’ ;

Do this only on your data directories, never on a system directory - you
can damage the system.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Robin
I get the impression your command of the English language is not as good as you think it is.
Would you like me to use google translate to put in in your native language ?

Answers like go read a book are somewhat offensive, but of course as English in not you native language, I’ll will try very hard not to find it offensive, after all I’ve using linux now for 8 years, you back in the days when you had to build you own kernels and everything was CLI.
If as root I can not change the permissions of a directory, using CLI, MC, Gnome-commander, and Nautilus all as root, and I have tried altering the sticky bit., there is something wrong.

FACT: two identical first installs of Suse will provide a single user on each system with the same UUID.
FACT: Suse is well know for having some peculiarities
for instance “adduser” all distro of linux and unix except suse which is “useradd”

And there are plenty more where that came from, probably due to the fact the Suse is a German distro and it common in other languages apart from English to transpose the verb, noun order in a sentence.
I’ve been able to do what I trying to do with other distros, without playing with fstab, without a problem.
I’ve always stayed clear of editing fstab, as it one of the file intolerant to mistakes.
I’m beginning to suspect the is some layer of Suse security stopping what is a straight forward operation.
I moved to Suse after getting fed up with both Mandriva which I used for years, and Fedora trying to get some bleeding edge that every time a new release came out so much was broken that at times and especially with 64 bit systems very little worked.
Suse is using kernel 2.6.34, the latest other releases are on 2.6.36, that at the moment makes no difference as I am not waiting for new kernel drivers. I can accept Suse is a bit behind the others, but where there are differences in structures, its not much point saying RTFM, when in fact TFM is written on the standard distros/unix commands.

I thought that forum were places to get answers,

Richard

On 2010-11-15 01:06, rb004a0345 wrote:
>
> Robin
> I get the impression your command of the English language is not as
> good as you think it is.
> Would you like me to use google translate to put in in your native
> language ?

You want to translate with google my own answer to my first language? It
would be unintelligible.

Or you are suggesting you translate your own question with google? It would
be unintelligible.

> Answers like go read a book are somewhat offensive, but of course as
> English in not you native language, I’ll will try very hard not to find
> it offensive, after all I’ve using linux now for 8 years, you back in

> I thought that forum were places to get answers,

Then I quit this thread, find someone else to help you. I tried my best,
you don’t like me, fine. :-/


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Robin I did not say I did not like you.
On each occasion you did not read what I asked

And if you answer instead of try this or try that, is to go and read a book, it is not at all helpful.
The reason anyone can ask a question, that you consider that they should read a book, is they probably have already and not fully understood what has been written. Especially if it was a man page, these IMO are not clearly written. which do not help when you find this type of thing:-

PAM Access Control
On SUSE LINUX systems, crond now supports access control with PAM - see
pam(8). A PAM configuration file for crond is installed in
/etc/pam.d/crond . crond loads the PAM environment from the pam_env
module, but these can be overriden by settings in the crontab file.

and you end up back where you started.
QED

This is a clear demonstration of why you hear so many people complain that they try linux and give up as soon s they hit a problem and get told to read a document or book.
It one of my major pet hates, sorry if that upsets you, but !

Richard