All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [linux-lvm] LVM seems to break tar and cp "stay-local" option s
@ 2000-01-25 20:19 Steve_J_Brueggeman
  2000-01-26  0:59 ` Andi Kleen
  0 siblings, 1 reply; 5+ messages in thread
From: Steve_J_Brueggeman @ 2000-01-25 20:19 UTC (permalink / raw)
  To: Jakma, Paul; +Cc: 'linux-lvm@msede.com'

Well, a quick of the tar source code reveals that they're using a stat(2) and
checking
parent_device != current_stat.st_dev

to determine if the filesystem has changed.

I just did a stat(1) on some files, (using LVM 0.7), and it always returns a
minor number of 0, no matter what Logical Volume the file I checked lives on.

Then again, I got the same result on files that reside on plain SCSI partitions
(I have root and /usr on /dev/sda1 and /dev/sda3 respectively)

System is RedHat 5.2, running linux-2.2.14 with LVM patches.

On a RedHat 6.0 system running linux-2.3.40 W/O LVM patches, /usr/bin/stat
returned expected device numbers.

I need to look into this a bit further.  More to come....

Steve Brueggeman






"Jakma, Paul" <Paul.Jakma@compaq.com> on 01/25/2000 01:07:10 PM

To:   "'Peter.Wuestefeld@resnova.de'" <Peter.Wuestefeld@resnova.de>
cc:   "'linux-lvm@msede.com'" <linux-lvm@msede.com> (bcc: Steve J Brueggeman)

Subject:  RE: [linux-lvm] LVM seems to break tar and cp "stay-local" option s



> Hi Paul,
>
> what about:
>
> cd /
> find . -print > /home/root/list
> vi list (edit to fit your wishes)
> tar -cvf- . -T /home/root/list | (cd /mynewroot; tar -xvf-)
>
> (you might want to check the tar option for "read list from file" - it
> seems to differ between distributions)
>

possible, and i did something similar in the end, eg  .... tar ... /bin /dev
/sbin ...

But the point is, why do these userland tools not recognise the boundary
between fs on ordinary device, and fs on lvm?

Also, another little issue, about partitioning:

if you change the partition table with fdisk, the kernel will not update
it's in-core idea of the partition layout if any of the partitions on that
disk are in-use, eg mounted fs or swap.

However, the kernel doesn't seem to recognise partitions that are active LVM
PV's as marking that disk in use. Ie i can repartition a disk in-use by LVM,
and the kernel does not seem to know that the disk is busy and hence will
commit the new partition table to memory.

I have a feeling LVM is forgetting to set some kind of flag that marks a
physical disk device as in-use. (and this might be related to the tar/cp
"stay-local" problem aswell). However i am not a kernel hacker... :)

regards,

Paul Jakma.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: [linux-lvm] LVM seems to break tar and cp "stay-local" option s
@ 2000-01-25 20:33 Steve_J_Brueggeman
  0 siblings, 0 replies; 5+ messages in thread
From: Steve_J_Brueggeman @ 2000-01-25 20:33 UTC (permalink / raw)
  To: Jakma, Paul; +Cc: 'linux-lvm@msede.com'

Well, I've went and shot-off too quickly again.

My problem appears to be that I never upgraded my libc on my redhat-5.2 setup.

Sorry if I've caused any confusion!!!

Steve Brueggeman





Steve J Brueggeman
01/25/2000 02:19 PM

To:   "Jakma, Paul" <Paul.Jakma@compaq.com> @ INTERNET
cc:   "'linux-lvm@msede.com'" <linux-lvm@msede.com>@INTERNET

Subject:  RE: [linux-lvm] LVM seems to break tar and cp "stay-local" option s
      (Document link: Steve J Brueggeman)

Well, a quick of the tar source code reveals that they're using a stat(2) and
checking
parent_device != current_stat.st_dev

to determine if the filesystem has changed.

I just did a stat(1) on some files, (using LVM 0.7), and it always returns a
minor number of 0, no matter what Logical Volume the file I checked lives on.

Then again, I got the same result on files that reside on plain SCSI partitions
(I have root and /usr on /dev/sda1 and /dev/sda3 respectively)

System is RedHat 5.2, running linux-2.2.14 with LVM patches.

On a RedHat 6.0 system running linux-2.3.40 W/O LVM patches, /usr/bin/stat
returned expected device numbers.

I need to look into this a bit further.  More to come....

Steve Brueggeman





"Jakma, Paul" <Paul.Jakma@compaq.com> on 01/25/2000 01:07:10 PM

To:   "'Peter.Wuestefeld@resnova.de'" <Peter.Wuestefeld@resnova.de>
cc:   "'linux-lvm@msede.com'" <linux-lvm@msede.com> (bcc: Steve J Brueggeman)

Subject:  RE: [linux-lvm] LVM seems to break tar and cp "stay-local" option s



> Hi Paul,
>
> what about:
>
> cd /
> find . -print > /home/root/list
> vi list (edit to fit your wishes)
> tar -cvf- . -T /home/root/list | (cd /mynewroot; tar -xvf-)
>
> (you might want to check the tar option for "read list from file" - it
> seems to differ between distributions)
>

possible, and i did something similar in the end, eg  .... tar ... /bin /dev
/sbin ...

But the point is, why do these userland tools not recognise the boundary
between fs on ordinary device, and fs on lvm?

Also, another little issue, about partitioning:

if you change the partition table with fdisk, the kernel will not update
it's in-core idea of the partition layout if any of the partitions on that
disk are in-use, eg mounted fs or swap.

However, the kernel doesn't seem to recognise partitions that are active LVM
PV's as marking that disk in use. Ie i can repartition a disk in-use by LVM,
and the kernel does not seem to know that the disk is busy and hence will
commit the new partition table to memory.

I have a feeling LVM is forgetting to set some kind of flag that marks a
physical disk device as in-use. (and this might be related to the tar/cp
"stay-local" problem aswell). However i am not a kernel hacker... :)

regards,

Paul Jakma.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: [linux-lvm] LVM seems to break tar and cp "stay-local" option s
@ 2000-01-25 19:07 Jakma, Paul
  0 siblings, 0 replies; 5+ messages in thread
From: Jakma, Paul @ 2000-01-25 19:07 UTC (permalink / raw)
  To: 'Peter.Wuestefeld@resnova.de'; +Cc: 'linux-lvm@msede.com'

> Hi Paul,
> 
> what about:
> 
> cd /
> find . -print > /home/root/list
> vi list (edit to fit your wishes)
> tar -cvf- . -T /home/root/list | (cd /mynewroot; tar -xvf-)
> 
> (you might want to check the tar option for "read list from file" - it
> seems to differ between distributions)
> 

possible, and i did something similar in the end, eg  .... tar ... /bin /dev
/sbin ...

But the point is, why do these userland tools not recognise the boundary
between fs on ordinary device, and fs on lvm?

Also, another little issue, about partitioning: 

if you change the partition table with fdisk, the kernel will not update
it's in-core idea of the partition layout if any of the partitions on that
disk are in-use, eg mounted fs or swap.

However, the kernel doesn't seem to recognise partitions that are active LVM
PV's as marking that disk in use. Ie i can repartition a disk in-use by LVM,
and the kernel does not seem to know that the disk is busy and hence will
commit the new partition table to memory.

I have a feeling LVM is forgetting to set some kind of flag that marks a
physical disk device as in-use. (and this might be related to the tar/cp
"stay-local" problem aswell). However i am not a kernel hacker... :)

regards,

Paul Jakma.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-01-26  2:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-25 20:19 [linux-lvm] LVM seems to break tar and cp "stay-local" option s Steve_J_Brueggeman
2000-01-26  0:59 ` Andi Kleen
2000-01-26  2:52   ` Michael Marxmeier
  -- strict thread matches above, loose matches on Subject: below --
2000-01-25 20:33 Steve_J_Brueggeman
2000-01-25 19:07 Jakma, Paul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.