* [linux-lvm] which volume is a file on?
@ 2008-06-10 23:02 Zarthan South
2008-06-11 8:33 ` Bryn M. Reeves
0 siblings, 1 reply; 3+ messages in thread
From: Zarthan South @ 2008-06-10 23:02 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 83 bytes --]
Is there a utility or a simple way to determine which volume a file is
located on.
[-- Attachment #2: Type: text/html, Size: 88 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] which volume is a file on?
2008-06-10 23:02 [linux-lvm] which volume is a file on? Zarthan South
@ 2008-06-11 8:33 ` Bryn M. Reeves
2008-06-11 20:17 ` Zarthan South
0 siblings, 1 reply; 3+ messages in thread
From: Bryn M. Reeves @ 2008-06-11 8:33 UTC (permalink / raw)
To: LVM general discussion and development
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Zarthan South wrote:
> Is there a utility or a simple way to determine which volume a file is located on.
That's more of a file system question than an LVM question and it's no
different than any other type of device: find the mount point of the
file system containing the file and then consult /proc/mounts or the
output of the mount command to determine what LV the file is on.
If you want to know where the data blocks are located physically you'll
need to do a bit more work: find the inode location, determine what
block ranges are allocated to it and then figure out how they map to
physical device regions using e.g. lvdisplay --maps. The details for
this step depend on the file system type you are using. For ext2/3 you
can determine the physical location of a file's data blocks using degbugfs.
Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkhPjdUACgkQ6YSQoMYUY97/MwCgiyszlwRO/oYMR6ABbiITOeBU
pnMAn3JLz1XNFbVlqx2KGJsgGWfhdhYk
=MHes
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] which volume is a file on?
2008-06-11 8:33 ` Bryn M. Reeves
@ 2008-06-11 20:17 ` Zarthan South
0 siblings, 0 replies; 3+ messages in thread
From: Zarthan South @ 2008-06-11 20:17 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]
Thanks
I was starting to write some scripts and thought if there was a tool to
determine which LV a file was on it would eliminate a some writing.
On Wed, Jun 11, 2008 at 3:33 AM, Bryn M. Reeves <breeves@redhat.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Zarthan South wrote:
> > Is there a utility or a simple way to determine which volume a file is
> located on.
>
> That's more of a file system question than an LVM question and it's no
> different than any other type of device: find the mount point of the
> file system containing the file and then consult /proc/mounts or the
> output of the mount command to determine what LV the file is on.
>
> If you want to know where the data blocks are located physically you'll
> need to do a bit more work: find the inode location, determine what
> block ranges are allocated to it and then figure out how they map to
> physical device regions using e.g. lvdisplay --maps. The details for
> this step depend on the file system type you are using. For ext2/3 you
> can determine the physical location of a file's data blocks using degbugfs.
>
> Regards,
> Bryn.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkhPjdUACgkQ6YSQoMYUY97/MwCgiyszlwRO/oYMR6ABbiITOeBU
> pnMAn3JLz1XNFbVlqx2KGJsgGWfhdhYk
> =MHes
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
[-- Attachment #2: Type: text/html, Size: 2218 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-11 20:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-10 23:02 [linux-lvm] which volume is a file on? Zarthan South
2008-06-11 8:33 ` Bryn M. Reeves
2008-06-11 20:17 ` Zarthan South
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.