[Gllug] Mapping from disk block to LVM partitions

Kostas Georgiou k.georgiou at imperial.ac.uk
Sun Dec 6 17:53:05 UTC 2009


On Sun, Dec 06, 2009 at 04:32:48PM +0000, Rich Walker wrote:

> I was thinking "fastest" in the sense "most convenient over slow SSH
> connection". One of the outputs of lvs:
> 
> # lvs -a --segments --verbose --units s
>     Finding all logical volumes
>   LV              VG   Attr   Start      SSize      #Str Type   Stripe Chunk
>   BackupFromThoth V01  -wi-ao         0S  31457280S    1 linear     0S    0S
>   GatewayMirror   V01  -wi-ao         0S  62914560S    1 linear     0S    0S
>   PlatoMirror     V01  -wi-a-         0S 117440512S    1 linear     0S    0S
>   HomeMirror      V02  -wi-ao         0S 251658240S    1 linear     0S    0S
>   HomeMirror      V02  -wi-ao 251658240S 104857600S    1 linear     0S    0S
>   Music           V02  -wi-ao         0S 125829120S    1 linear     0S    0S
>   Music           V02  -wi-ao 125829120S   6324224S    1 linear     0S    0S
>   Root            V02  -wi-a-         0S   6291456S    1 linear     0S    0S
>   Usr             V02  -wi-a-         0S  10485760S    1 linear     0S    0S
>   Var             V02  -wi-a-         0S  10485760S    1 linear     0S    0S
>   Video           V02  -wi-ao         0S  77594624S    1 linear     0S    0S
>   Video           V02  -wi-ao  77594624S  20971520S    1 linear     0S    0S
>   ocfs_test       V02  -wi-a-         0S 104857600S    1 linear     0S    0S
> 
> looks promising, but getting those Start numbers offset from the PV
> base?

What about lvs -o +seg_pe_ranges or something like
pvs -o pv_name,lv_name,pvseg_start,pvseg_size

Kostas
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list