[sclug] sclug Digest, Vol 114, Issue 4

Neil Haughton haughtonomous at googlemail.com
Tue Mar 5 12:36:20 UTC 2013


On 5 March 2013 12:00, <sclug-request at sclug.org.uk> wrote:

> Send sclug mailing list submissions to
>         sclug at sclug.org.uk
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://sclug.org.uk/mailman/listinfo/sclug
> or, via email, send a message with subject or body 'help' to
>         sclug-request at sclug.org.uk
>
> You can reach the person managing the list at
>         sclug-owner at sclug.org.uk
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sclug digest..."
>
> Today's Topics:
>
>    1. Re: Copy drive problem (Dickon Hood)
>    2. Re: Copy drive problem (John Stumbles)
>    3. Re: Copy drive problem (Ed Davies)
>    4. Re: Copy drive problem (Dickon Hood)
>
>
> ---------- Forwarded message ----------
> From: Dickon Hood <dickon-ml at fluff.org>
> To: Neil Haughton <haughtonomous at googlemail.com>
> Cc: Paul Branston <apbran at rannoch.demon.co.uk>, "<sclug at sclug.org.uk>" <
> sclug at sclug.org.uk>
> Date: Mon, 4 Mar 2013 19:33:40 +0000
> Subject: Re: [sclug] Copy drive problem
> On Sun, Mar 03, 2013 at 18:05:08 +0000, Neil Haughton wrote:
> : On 2 March 2013 17:40, Paul Branston <apbran at rannoch.demon.co.uk> wrote:
>
> : > Since the partitions are not the same size you would be better using
> : > something like tar to do the transfer. Moving stuff using dd is very
> low
> : > level block copying hence you have an image of the old partition with
> the
> : > same used and free space and 'lost' a load of space.
>
> : > > The command I used was
>
> : > > dd iflag=nofollow if=/dev/sdb2 of=/dev/sdc2
>
> : > > I used the iflag argument because I didn't want symlinks to my
> external
> : > > drive to be followed. What is occupying all the extra space?
>
> : It puzzled me too, but *man dd* has 'IFLAG=nofollow' clearly documented
> : (albeit without much explanation), so I can only assume it does what it
> : says on the box: "do not follow symlinks". *info coreutils* gives the
> same
> : concise explanation. Helpful.
>
> Well, yes, actually.  It means that if you pass the path to a symlink as
> if= or of=, it won't follow that symlink to the target, and possibly
> trample all over it.  I'm not sure why it exists, but I think the
> behaviour is fairly obvious.
>
> That said, it is an odd flag to have.  /dev/disk/by-*/* are all symlinks,
> for example, and it's quite handy to be able to pass those as device nodes
> to use, as they're consistent across reboots.  ZFS-on-Linux recommends
> using by-id/* for this reason.
>
>
> Dickon Hood
> --
> Due to the release of iOS 6 Maps, my .signature is temporarily lost.
>  Normal
> service will be resumed as soon as possible.  We apologise for the
> inconvenience in the meantime.
>
> This email was sent from a colocated server, and needs no excuses.
>
>
>
> ---------- Forwarded message ----------
> From: John Stumbles <sclug at yaph.org.uk>
> To: sclug at sclug.org.uk
> Cc:
> Date: Mon, 04 Mar 2013 23:58:20 +0000
> Subject: Re: [sclug] Copy drive problem
> On 04/03/13 19:33, Dickon Hood wrote:
>
>  That said, it is an odd flag to have.  /dev/disk/by-*/* are all symlinks,
>>
>
> oh cool: I wish I'd known/remembered those when I was trying to rebuild my
> raid box. Trying to work out which of two 1.5TB drives and which of two
> 2.0TBs was sda, sdb, c & d did my head in.
> /dev/disk/by-path/ seems to show the physical order.
>
>
>  for example, and it's quite handy to be able to pass those as device nodes
>> to use, as they're consistent across reboots.  ZFS-on-Linux recommends
>> using by-id/* for this reason.
>>
>
> > That said, it is an odd flag to have.
>
> Presumably the coders thought the default 'follow' behaviour was the
> sensible default so added 'nofollow' to allow for those infinitely rare
> occasions where coders fail to second-guess users' actual requirements? ;-)
>
> --
> John Stumbles                                       http://yaph.org.uk
> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-**:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-**
> :-:-:-:-:-:
>
>
>
> ---------- Forwarded message ----------
> From: Ed Davies <sclug.xu.1106 at edavies.me.uk>
> To: sclug at sclug.org.uk
> Cc:
> Date: Tue, 05 Mar 2013 09:01:28 +0000
> Subject: Re: [sclug] Copy drive problem
> On 2013-03-04 23:58, John Stumbles wrote:
> >  > That said, it is an odd flag to have.
> >
> > Presumably the coders thought the default 'follow' behaviour was the
> > sensible default so added 'nofollow' to allow for those infinitely rare
> > occasions where coders fail to second-guess users' actual requirements?
> ;-)
>
> As far as I can see all this flag does is cause an error
> message if the name passed on the if switch happens to be a
> symlink. I'm having a hard time third-guessing when that
> would be the user's actual requirement.
>
> edavies at bill:~/temp$ mkdir t
> edavies at bill:~/temp$ cd t
> edavies at bill:~/temp/t$ echo abc > a
> edavies at bill:~/temp/t$ echo bcd > b
> edavies at bill:~/temp/t$ ln -s a s
> edavies at bill:~/temp/t$ ls -Al
> total 8
> -rw-rw-r-- 1 edavies edavies 4 Mar  5 08:54 a
> -rw-rw-r-- 1 edavies edavies 4 Mar  5 08:55 b
> lrwxrwxrwx 1 edavies edavies 1 Mar  5 08:55 s -> a
> edavies at bill:~/temp/t$ dd iflag=nofollow if=s of=a
> dd: opening `s': Too many levels of symbolic links
> edavies at bill:~/temp/t$
>
> Any further thoughts?
>
> Ed.
>
>
>
> ---------- Forwarded message ----------
> From: Dickon Hood <dickon-ml at fluff.org>
> To: Ed Davies <sclug.xu.1106 at edavies.me.uk>
> Cc: sclug at sclug.org.uk
> Date: Tue, 5 Mar 2013 10:21:33 +0000
> Subject: Re: [sclug] Copy drive problem
> On Tue, Mar 05, 2013 at 09:01:28 +0000, Ed Davies wrote:
> : On 2013-03-04 23:58, John Stumbles wrote:
> : >  > That said, it is an odd flag to have.
>
> : > Presumably the coders thought the default 'follow' behaviour was the
> : > sensible default so added 'nofollow' to allow for those infinitely rare
> : > occasions where coders fail to second-guess users' actual
> requirements? ;-)
>
> : As far as I can see all this flag does is cause an error
> : message if the name passed on the if switch happens to be a
> : symlink.
>
> Correct.
>
> : I'm having a hard time third-guessing when that
> : would be the user's actual requirement.
>
> Probably when used scripted.  I can't see why anyone would bother to
> specify it when using it manually.  It seems to be a Gnuism, so it's
> probably appeared as part of their kitchen-sink mentality.
>
>
Do you mean the mentality that tries its hardest to save users from their
foolish mistakes before they make them, and thus (strange thought) make
life a little more pleasant for them ? :-)

Whatever next....


Neil

>
> Dickon Hood
> --
> Due to the release of iOS 6 Maps, my .signature is temporarily lost.
>  Normal
> service will be resumed as soon as possible.  We apologise for the
> inconvenience in the meantime.
>
> This email was sent from a colocated server, and needs no excuses.
>
>
> _______________________________________________
> sclug mailing list
> sclug at sclug.org.uk
> http://sclug.org.uk/mailman/listinfo/sclug
>



More information about the Sclug mailing list