Re: Moving/merging a filesystem back into /

2013-12-03 Thread Charles Marcus

On 2013-12-02 5:55 PM, Kevin Korb k...@sanitarium.net wrote:

mount/dev/sda3 /mnt/gentoo/
You might have to specify more options here.  Check what they are
before you shut down.


Ok, thinking about this more... since booting off a liveCD means I'm not 
using the systems fstab, so I have to specify the filesystem too?


/ is ext3, so just use the same options as in fstab:

mount -o noatime /dev/sda3 /mnt/gentoo/ ?

Or do I need to specify the filesystem type?

mount -t ext3 -o noatime /dev/sda3 /mnt/gentoo/ ?

Hmmm... and any concerns about the filesystem for /usr changing from 
reiserfs to ext3?


- --numeric-ids won't matter if rsync isn't networking but it is an 
important one to know about.


Someone on the gentoo list claimed that because when booting from a 
liveDVD you're essentially accessing the filesystem from 'another 
system', that it was (possibly very) important to use --numeric-ids, 
someone else then backed him up, and no one has said anything to the 
contrary, so... are you sure?


Doesn't matter though, since it can't hurt anything, I'll always use it 
regardless... ;)


ext[34] can remember acl as a default mount option. I have no idea if 
reiserfs can do that or not and I recommend against using reiserfs at all.


I know, but this system was built over 8 years ago (when gentoo still 
recommended reiserfs), and runs like a champ, so no desire to 'fix what 
ain't broke'... anyway, acls are not enabled on it, so no worries...


;)


For Gentoo if you don't have USE=caps or USE=caps-ng set then you
probably don't have and xattrs in /usr


emerge --info shows neither:

USE=3dnow acl amd64 bash-completion berkdb bzip2 cli cracklib crypt 
curl cxx dovecot-sasl dri fam fortran gd gdbm iconv mmx modules mudflap 
multilib ncurses nls nptl openmp pam pcre readline sasl session snmp sse 
sse2 ssl tcpd truetype unicode vhosts xml zlib


So, no -X...


That command will not list symlinks.  Anything it lists is a hard link.


Weird, you're right... dunno how I confused myself there...


- -H is only hard links. Symbolic links are handled in -a.


Ok, good, thanks, definitely want -H..


If you want to watch the --progress output then -P is a perfectly fine
shortcut for it.  -p is --perms which is unrelated and part of -a.


Gotcha, thanks...

So, to be safe, use --numeric-ids...? 

It won't hurt.  It is just extra typing but it could be considered to
be a good habit for when it does matter.


Understood... and since it can't hurt anything, but can prevent serious 
problems... :)



One more thing I didn't mention before...

Since /usr is pretty static you could prime the copy by doing the
rsync initially to /usr.new while the system is running.  Then you
would really only have an mv and and fstab edit to do from your live
environment.  You could probably even do those right before rebooting
if you are careful.

Even on something more dynamic like /home you can still do an initial
copy then update it from the live environment.


Ok, so... if I wanted to do this, would I need to add anything to the 
rsync command on the subsequent run(s)?


So, looks like the command I'll be using:

rsync -avHP --numeric-ids /mnt/gentoo/oldusr/ /mnt/gentoo/usr/

Thanks very much Kevin for your time and help...

--

Best regards,

*/Charles/*
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: lastes sources don't include drop_cache option

2013-12-03 Thread Holger Hoffstaette
On Mon, 02 Dec 2013 00:30:58 -0800, Linda A. Walsh wrote:

 Was there some reason that patch got dropped?

AFAIK it was never applied in the first place. I disagree with the
reasoning, but whatever. This just came up this morning on Gentoo:
https://bugs.gentoo.org/show_bug.cgi?id=475408

..and as I looked for solutions that don't require the patch I found:
https://github.com/Feh/nocache

This seems to work and is useful to other applications as well, if you can
live with the naive assumption that buffer cache behaviour is global to an
entire application/command.

-h


-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Moving/merging a filesystem back into /

2013-12-03 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/03/13 08:11, Charles Marcus wrote:
 On 2013-12-02 5:55 PM, Kevin Korb k...@sanitarium.net wrote:
 mount /dev/sda3 /mnt/gentoo/ You might have to specify more
 options here.  Check what they are before you shut down.
 
 Ok, thinking about this more... since booting off a liveCD means
 I'm not using the systems fstab, so I have to specify the
 filesystem too?
 
 / is ext3, so just use the same options as in fstab:
 
 mount -o noatime /dev/sda3 /mnt/gentoo/ ?
 
 Or do I need to specify the filesystem type?
 
 mount -t ext3 -o noatime /dev/sda3 /mnt/gentoo/ ?

I would expect to do this.  Also, you should be converting to ext4 not
ext3.  In fact, your kernel probably doesn't even have ext3 in it
anymore.  Standard kernels now use the ext4 code for ext3 mounts.

 
 Hmmm... and any concerns about the filesystem for /usr changing
 from reiserfs to ext3?

Concerns no.  Lack of terror, yes.  You will no longer be exposed to
an fsck that is almost as destructive as a mkfs.

 - --numeric-ids won't matter if rsync isn't networking but it is
 an important one to know about.
 
 Someone on the gentoo list claimed that because when booting from
 a liveDVD you're essentially accessing the filesystem from
 'another system', that it was (possibly very) important to use
 --numeric-ids, someone else then backed him up, and no one has said
 anything to the contrary, so... are you sure?

Nonsense.  --numeric-ids disables the ownership translation between 2
different systems when rsync is networking.  When you are booted from
a live environment you still only have 1 user database.  It might
disagree with the one you normally boot from but you still have only 1
so there is nothing to translate.

 Doesn't matter though, since it can't hurt anything, I'll always
 use it regardless... ;)
 
 ext[34] can remember acl as a default mount option. I have no
 idea if reiserfs can do that or not and I recommend against using
 reiserfs at all.
 
 I know, but this system was built over 8 years ago (when gentoo
 still recommended reiserfs), and runs like a champ, so no desire to
 'fix what ain't broke'... anyway, acls are not enabled on it, so no
 worries...

If you ever have an instance where reiserfs needs an fsck you may as
well reformat and restore.  Reiserfs's fsck just deletes almost
everything then declares success.  Reiserfs was never recommended
except for /usr/portage which can always be re-downloaded.  It should
absolutely never be used for anything important.


 ;)
 
 For Gentoo if you don't have USE=caps or USE=caps-ng set then
 you probably don't have and xattrs in /usr
 
 emerge --info shows neither:
 
 USE=3dnow acl amd64 bash-completion berkdb bzip2 cli cracklib
 crypt curl cxx dovecot-sasl dri fam fortran gd gdbm iconv mmx
 modules mudflap multilib ncurses nls nptl openmp pam pcre readline
 sasl session snmp sse sse2 ssl tcpd truetype unicode vhosts xml
 zlib

After you finish with this, try adding caps to that.  It is a
significant security improvement IMO.

 So, no -X...
 
 That command will not list symlinks.  Anything it lists is a hard
 link.
 
 Weird, you're right... dunno how I confused myself there...
 
 - -H is only hard links. Symbolic links are handled in -a.
 
 Ok, good, thanks, definitely want -H..
 
 If you want to watch the --progress output then -P is a perfectly
 fine shortcut for it.  -p is --perms which is unrelated and part
 of -a.
 
 Gotcha, thanks...
 
 So, to be safe, use --numeric-ids...?
 It won't hurt.  It is just extra typing but it could be
 considered to be a good habit for when it does matter.
 
 Understood... and since it can't hurt anything, but can prevent
 serious problems... :)
 
 One more thing I didn't mention before...
 
 Since /usr is pretty static you could prime the copy by doing
 the rsync initially to /usr.new while the system is running.
 Then you would really only have an mv and and fstab edit to do
 from your live environment.  You could probably even do those
 right before rebooting if you are careful.
 
 Even on something more dynamic like /home you can still do an
 initial copy then update it from the live environment.
 
 Ok, so... if I wanted to do this, would I need to add anything to
 the rsync command on the subsequent run(s)?

nope.

 So, looks like the command I'll be using:
 
 rsync -avHP --numeric-ids /mnt/gentoo/oldusr/ /mnt/gentoo/usr/

yep.

 Thanks very much Kevin for your time and help...
 
 --
 
 Best regards,
 
 */Charles/*
 
 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin Korb  Phone:(407) 252-6853
Systems Administrator   Internet:
FutureQuest, Inc.   ke...@futurequest.net  (work)
Orlando, Floridak...@sanitarium.net (personal)
Web page:   http://www.sanitarium.net/
PGP public key available on web site.

Re: Moving/merging a filesystem back into /

2013-12-03 Thread Charles Marcus

On 2013-12-03 9:37 AM, Kevin Korb k...@sanitarium.net wrote:

Or do I need to specify the filesystem type?

mount -t ext3 -o noatime /dev/sda3 /mnt/gentoo/ ?

I would expect to do this.  Also, you should be converting to ext4 not
ext3.  In fact, your kernel probably doesn't even have ext3 in it
anymore.  Standard kernels now use the ext4 code for ext3 mounts.


One thing at a time... ;)

It is working now, and currently has ext3 in the fstab. I'd rather not 
change that at the same time as doing something like this.


Concerns no. Lack of terror, yes. You will no longer be exposed to an 
fsck that is almost as destructive as a mkfs


Yes, I've read the horror stories. I've also had this system running for 
8+ years, and had 2 hard resets (and successful fscks) during this time...


There is a lot of FUD about reiserfs.

Not saying it is perfect, or that your concerns are misplaced (my new 
system will use xfs instead), but it isn't as bad as you're making out... ;)


Nonsense. --numeric-ids disables the ownership translation between 2 
different systems when rsync is networking. When you are booted from a 
live environment you still only have 1 user database. It might 
disagree with the one you normally boot from but you still have only 1 
so there is nothing to translate.


Ok, well, like I said, since it doesn't matter, that is an argument I 
may pursue later, if I fell a need...



Doesn't matter though, since it can't hurt anything, I'll always
use it regardless... ;)


ext[34] can remember acl as a default mount option. I have no
idea if reiserfs can do that or not and I recommend against using
reiserfs at all.

I know, but this system was built over 8 years ago (when gentoo
still recommended reiserfs), and runs like a champ, so no desire to
'fix what ain't broke'... anyway, acls are not enabled on it, so no
worries...

If you ever have an instance where reiserfs needs an fsck you may as
well reformat and restore.  Reiserfs's fsck just deletes almost
everything then declares success.  Reiserfs was never recommended
except for /usr/portage which can always be re-downloaded.  It should
absolutely never be used for anything important.


Sorry Kevin, this is just plain BS.

When I installed gentoo, it was recommended for things like mail storage 
when you were using maildir (lots of small files)...


And as I said, my experience directly refutes your silly claim that 
Reiserfs's fsck just deletes almost

everything then declares success.

It has had its problems, and indeed may under certain circumstances be 
more likely to experience unrecoverable damage to the filesystem, but 
most serious problems it has had were fixed fairly quickly (but maybe 
not after lots of people got bit). The fact is ext4 has had its problems 
and horror stories too, just as xfs and every other filesystem out 
there. It is best to stick to verifiable facts when discussing things 
like this.



emerge --info shows neither:

USE=3dnow acl amd64 bash-completion berkdb bzip2 cli cracklib
crypt curl cxx dovecot-sasl dri fam fortran gd gdbm iconv mmx
modules mudflap multilib ncurses nls nptl openmp pam pcre readline
sasl session snmp sse sse2 ssl tcpd truetype unicode vhosts xml
zlib

After you finish with this, try adding caps to that.  It is a
significant security improvement IMO.


Any pointers to docs explaining how/why? I'll google later, but I'm 
curious...



Even on something more dynamic like /home you can still do an
initial copy then update it from the live environment.


Ok, so... if I wanted to do this, would I need to add anything to
the rsync command on the subsequent run(s)?

nope.


So, looks like the command I'll be using:

rsync -avHP --numeric-ids /mnt/gentoo/oldusr/ /mnt/gentoo/usr/

yep.


Cool, thanks again Kevin... :)/**//*
*/
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: Moving/merging a filesystem back into /

2013-12-03 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/03/13 10:05, Charles Marcus wrote:
 On 2013-12-03 9:37 AM, Kevin Korb k...@sanitarium.net wrote:
 Or do I need to specify the filesystem type?
 
 mount -t ext3 -o noatime /dev/sda3 /mnt/gentoo/ ?
 I would expect to do this.  Also, you should be converting to
 ext4 not ext3.  In fact, your kernel probably doesn't even have
 ext3 in it anymore.  Standard kernels now use the ext4 code for
 ext3 mounts.
 
 One thing at a time... ;)

Sure.  Simply put, you can just change ext[23] to ext4 in fstab and it
will just work.  Faster even.

 It is working now, and currently has ext3 in the fstab. I'd rather
 not change that at the same time as doing something like this.
 
 Concerns no. Lack of terror, yes. You will no longer be exposed
 to an fsck that is almost as destructive as a mkfs
 
 Yes, I've read the horror stories. I've also had this system
 running for 8+ years, and had 2 hard resets (and successful fscks)
 during this time...
 
 There is a lot of FUD about reiserfs.

Reiserfs can take a hard crash without needing an fsck just like
ext[34] can.  This is what journaling is for.  I am talking about when
fsck -p aborts and says you need to run fsck manually.  In ext[34]
this is a minor inconvenience and you can usually even run fsck with
- -y to just say yes to any prompts.  With reiserfs if you ever have a
problem at this level you are screwed.

 Not saying it is perfect, or that your concerns are misplaced (my
 new system will use xfs instead), but it isn't as bad as you're
 making out... ;)
 
 Nonsense. --numeric-ids disables the ownership translation
 between 2 different systems when rsync is networking. When you
 are booted from a live environment you still only have 1 user
 database. It might disagree with the one you normally boot from
 but you still have only 1 so there is nothing to translate.
 
 Ok, well, like I said, since it doesn't matter, that is an argument
 I may pursue later, if I fell a need...
 
 Doesn't matter though, since it can't hurt anything, I'll
 always use it regardless... ;)
 
 ext[34] can remember acl as a default mount option. I have
 no idea if reiserfs can do that or not and I recommend
 against using reiserfs at all.
 I know, but this system was built over 8 years ago (when
 gentoo still recommended reiserfs), and runs like a champ, so
 no desire to 'fix what ain't broke'... anyway, acls are not
 enabled on it, so no worries...
 If you ever have an instance where reiserfs needs an fsck you may
 as well reformat and restore.  Reiserfs's fsck just deletes
 almost everything then declares success.  Reiserfs was never
 recommended except for /usr/portage which can always be
 re-downloaded.  It should absolutely never be used for anything
 important.
 
 Sorry Kevin, this is just plain BS.
 
 When I installed gentoo, it was recommended for things like mail
 storage when you were using maildir (lots of small files)...
 
 And as I said, my experience directly refutes your silly claim
 that Reiserfs's fsck just deletes almost everything then declares
 success.

I have seen it happen.  It is rare that reiserfs needs an fsck but if
it does the fsck is destructive.

 It has had its problems, and indeed may under certain circumstances
 be more likely to experience unrecoverable damage to the
 filesystem, but most serious problems it has had were fixed fairly
 quickly (but maybe not after lots of people got bit). The fact is
 ext4 has had its problems and horror stories too, just as xfs and
 every other filesystem out there. It is best to stick to verifiable
 facts when discussing things like this.

I wouldn't recommend XFS on Gentoo either.  The XFS development is
mostly done by RedHat these days.  It tends to only work completely in
1 out of 5 or so kernel versions.  This is fine if you are on RedHat
because they make sure it works on every kernel version they release
but the same is not true on Gentoo.  I used to use XFS for my media
storage (it is great on large files) but I had to give it up because
it had a bunch of weird problems interacting with NFS.

 emerge --info shows neither:
 
 USE=3dnow acl amd64 bash-completion berkdb bzip2 cli cracklib 
 crypt curl cxx dovecot-sasl dri fam fortran gd gdbm iconv mmx 
 modules mudflap multilib ncurses nls nptl openmp pam pcre
 readline sasl session snmp sse sse2 ssl tcpd truetype unicode
 vhosts xml zlib
 After you finish with this, try adding caps to that.  It is a 
 significant security improvement IMO.
 
 Any pointers to docs explaining how/why? I'll google later, but
 I'm curious...

http://www.friedhoff.org/posixfilecaps.html

 Even on something more dynamic like /home you can still do
 an initial copy then update it from the live environment.
 
 Ok, so... if I wanted to do this, would I need to add anything
 to the rsync command on the subsequent run(s)?
 nope.
 
 So, looks like the command I'll be using:
 
 rsync -avHP --numeric-ids /mnt/gentoo/oldusr/ /mnt/gentoo/usr/
 yep.
 
 Cool, 

Guard against destination = existing directory

2013-12-03 Thread Andre Majorel
Trying to use rsync to make sure that _dest_ is a regular file
with the same content as file _source_.

If _dest_ already exists and is a symlink, FIFO or device file,
rsync deletes it and creates a regular file in its place. Good.

If _dest_ already exists and is a directory, rsync creates
_dest_/$(basename _source_). Not what I want.

Is there an option similar to GNU install -T or GNU cp -T which
guarantees that if _dest_ exists and is a directory, rsync will
either remove it or fail, but NOT use it as a path ?

Thanks in advance.

-- 
André Majorel http://www.teaser.fr/~amajorel/
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Moving/merging a filesystem back into /

2013-12-03 Thread Paul Slootman
On Tue 03 Dec 2013, Kevin Korb wrote:
 
 Sure.  Simply put, you can just change ext[23] to ext4 in fstab and it
 will just work.  Faster even.

Just be very sure that you have ext4 support in your kernel, otherwise
you have a problem. ext4 should be listed in /proc/filesystems .
Of course, the root filesystem is mounted before /etc/fstab can be
read... :-)  ignoring initrd for now.

  There is a lot of FUD about reiserfs.
 
 Reiserfs can take a hard crash without needing an fsck just like
 ext[34] can.  This is what journaling is for.  I am talking about when
 fsck -p aborts and says you need to run fsck manually.  In ext[34]
 this is a minor inconvenience and you can usually even run fsck with
 - -y to just say yes to any prompts.  With reiserfs if you ever have a
 problem at this level you are screwed.

Not necessarily, but with reiser it's documented that reiser expects
_no_ storage failure whatsoever, so some form of RAID with redundancy is
a must.  You _are_ screwed if you happen to have an image of a reiser
filesystem on your reiser filesystem, as the fsck will see the reiser
markers and merge that image into your real filesystem.

I've avoided reiser since Hans got jailed for murder (but that's another
topic :-)

 I have seen it happen.  It is rare that reiserfs needs an fsck but if
 it does the fsck is destructive.

I've seen a reiser fsck eat the filesystem about 5 in 100 times.
(I used to help administer a server farm with 200 servers, running on
reiser at the time.)

 but the same is not true on Gentoo.  I used to use XFS for my media
 storage (it is great on large files) but I had to give it up because
 it had a bunch of weird problems interacting with NFS.

I used XFS with NFS for my dreambox (DVB satellite receiver), storing
multi-GB recordings. Of course there was only one NFS client. That
worked great. It's especially good at large files. That said, ext4 has
become quite amazing and even if it does fall mostly over, chances of
extracting files from the broken fs are excellent.

btrfs is promising to be quite cool as well, I love the snapshot system.
However having had some bad experiences with corruption I'm hesitant to
use it for anything critical for now. That _was_ a number of years ago,
on a 8TB filesystem which got hammered pretty badly with daily backups
(each being snapshotted and deleted after some time), so not really
representative of normal usage.

Paul
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Guard against destination = existing directory

2013-12-03 Thread Wayne Davison
On Tue, Dec 3, 2013 at 6:55 AM, Andre Majorel aym-2cn...@teaser.fr wrote:

 If _dest_ already exists and is a directory, rsync
 creates _dest_/$(basename _source_). Not what I want.


To do that with rsync you need to specify the destination directory,
leaving off the destination filename part. e.g. if you want to create
/dest/foobar from /src/foobar, you would copy:

rsync -aiv /src/foobar /dest/

See also --force if you want a /dest/foobar dir to be removed even if it is
not empty.

If you're wanting to change the name of a file for the transfer, the only
way to do that with this idiom is to create the new name on the source side
for the transfer, e.g.:

ln -s /src/foobar barbaz
rsync -aiv -L barbaz /dest/
rm barbaz

..wayne..
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

[Bug 10304] safe_read failed to read 1 bytes

2013-12-03 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=10304

Wayne Davison way...@samba.org changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #2 from Wayne Davison way...@samba.org 2013-12-04 06:41:04 UTC ---
The Connection reset by peer error is just telling you that the remote side
went away.  Since it is a daemon, you'll need to find out why the daemon side
is exiting.  If the daemon log doesn't have any info, you may be able to run
something like strace -f -o /tmp/output -p $DAEMON_PID and see if that tells
you what is going wrong.

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html