[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: transferring boot



Charles Curley (HE12025-08-01):
> > Separating the things that move a lot and the things that are stable
> > is still a good idea.
       ^^^^^
> Right. With /root r-o, you never get your shell history saved. And
> things do change from time to time under /etc.

Elementary language clarification: “still” over there means “even if you
do not do it”, with “it” being “mounting / read-only”.

But still, every write to a filesystem is a tiny risk of damage: maybe
thermal noise did flip a bit on the bus at the wrong time, maybe there
was a bug in the specific version of the kernel we were running right
now.

And every write to a filesystem costs in the incremental backups.

Two of the reasons to want to keep subtrees that move a lot and
subtrees that do not separate.

Also, if you save your history, especially as root, odds are there have
been some confidential information in there at some point in time.

> > No, it is an excellent occasion to rework the partitioning, wasting is
> > not a good idea.
> Agree. I don't think the ideas are mutually exclusive.

Sorry, I had not read what you wrote carefully enough. Forget that part:
yes, doing the migration in steps, keeping working with the existing
system during the transition is a good idea.


>	To give the appearance of having copied everything over, he can
> use symlinks.

No need for symlinks when it can be just mounted in place.

> Agree, except I'm not sure what you mean by "letting Linux worry about
> the split".

Let us assume he booted a live system to make things simple. He mounted
the hard drive in /mnt/src, getting a tree like that:

		│
		├── mnt
sdb2		     └── src 
sdb3		          ├── usr
		          └── var

Then he will create a new set of volumes and mount them in /mnt/dst:

		│
		└── mnt
sdb2		     ├── src 
sdb3		     │    ├── usr
		     │    └── var
mapper/ssd-root	     └── dst
mapper/ssd-var            └── var

Now he copies the contents:

	cp -a /mnt/src/. /mnt/dst/

(or rsync). cp is a simple userland program, it does not care about
mount points, they are just directories. So, it sees src/usr but no
dst/usr: it creates dst/usr, not caring that src/usr was a mount point.
And it sees src/var, it sees dst/var is already there, so it does not
create it, it just copies the permissions.

On the other hand, Linux, the kernel, does not care we are copying a
whole tree, it just sees files being opened and directories being
created, and its normal virtual filesystem operations will direct these
open() and mkdir() to the right underlying device.

> Again, agree. OP didn't indicate that any of his partitions were LVs,
> so I didn't suggest it.

Somebody who sees a sda13 and a good occasion and does not suggest to
use it to switch to LVM is not giving good advice.

Regards,

-- 
  Nicolas George


Reply to: