All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Blumel <revslowmo@earthlink.net>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Freeing space on a LVM for other partitions
Date: Fri, 10 Feb 2006 11:37:00 -0800	[thread overview]
Message-ID: <43ECEB5C.6030509@earthlink.net> (raw)
In-Reply-To: <43EAD26F.7060303@earthlink.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Richard Blumel wrote:

> I currently have this setup on a hw raid 0+1
>
> [root@cranium][pts/2]:~# fdisk -l
>
> Disk /dev/sda: 320.0 GB, 320073629696 bytes
> 255 heads, 63 sectors/track, 38913 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> Device Boot Start End Blocks Id System
> /dev/sda1 * 1 3732 29977258+ 7 HPFS/NTFS
> /dev/sda2 3860 5076 9775552+ 83 Linux
> /dev/sda3 5077 38913 271795702+ 83 Linux
> /dev/sda4 3733 3859 1020127+ 5 Extended
> /dev/sda5 3733 3859 1020096 82 Linux swap /
> Solaris
>
>
> [root@cranium][pts/2]:~# vgdisplay
> --- Volume group ---
> VG Name raid01
> System ID
> Format lvm2
> Metadata Areas 1
> Metadata Sequence No 6
> VG Access read/write
> VG Status resizable
> MAX LV 0
> Cur LV 4
> Open LV 4
> Max PV 0
> Cur PV 1
> Act PV 1
> VG Size 259.20 GB
> PE Size 4.00 MB
> Total PE 66356[root@cranium][pts/2]:~# lvdisplay
> --- Logical volume ---
> LV Name /dev/raid01/usr
> VG Name raid01
> LV UUID khBZSv-3q6S-OKeX-NHJz-PdC5-FK9C-or6BDb
> LV Write Access read/write
> LV Status available
> # open 1
> LV Size 15.00 GB
> Current LE 3840
> Segments 1
> Allocation inherit
> Read ahead sectors 0
> Block device 254:0
>
> --- Logical volume ---
> LV Name /dev/raid01/var
> VG Name raid01
> LV UUID gxbp4O-pL6I-Ye5o-Yvqp-nrmB-7Q51-8psyn2
> LV Write Access read/write
> LV Status available
> # open 1
> LV Size 5.00 GB
> Current LE 1280
> Segments 1
> Allocation inherit
> Read ahead sectors 0
> Block device 254:1
>
> --- Logical volume ---
> LV Name /dev/raid01/tmp
> VG Name raid01
> LV UUID awX51K-guHb-oAbZ-mvnd-SBg0-YM87-IR5BXQ
> LV Write Access read/write
> LV Status available
> # open 1
> LV Size 1.00 GB
> Current LE 256
> Segments 1
> Allocation inherit
> Read ahead sectors 0
> Block device 254:2
>
> --- Logical volume ---
> LV Name /dev/raid01/home
> VG Name raid01
> LV UUID R6ZBTP-y7LF-1pGl-u1be-lFx4-G31b-qZuCLU
> LV Write Access read/write
> LV Status available
> # open 1
> LV Size 208.20 GB
> Current LE 53300
> Segments 1
> Allocation inherit
> Read ahead sectors 0
> Block device 254:3
>
> Alloc PE / Size 58676 / 229.20 GB
> Free PE / Size 7680 / 30.00 GB
> VG UUID Md0gWC-47Kj-CAft-W9D8-G420-tzQl-34sMBk
>
>
> What I want to do is shrink the /dev/sda3 partition which is lvm, not
> sure why is says just link but eh. Once shrunk I am going to grow the
> ntfs partition which I know how todo. My problem is most of the howto
> talk about moving pv to remove pv so forth. I saw one post that said
> what I am trying todo is voodoo and dangerous but recommend that to
> move the PE towards one edge of the disk us --alloc anywhere however I
> have seen other documents that say that is not implemented yet. I hope
> I haven't lost you guys but if you know what I should I would be
> greatly in your debt.

Ok I solved this problem on my own and I am sure other people want to
know how I did it. Once I used pvresize to shrink the pv I was left
with a partition that was 20G bigger than I wanted to use and I wanted
to reclaim that 20G for my ntfs partition. I assumed that I could use
parted to resize this down, I was wrong. So what I did was delete the
partition in fdisk and then made a new partition that had the same
start but 20G short on the end. Like I said I assumed that this space
was completely unused. I had a backup of my data cause of a raid 0+1
that I failed out raid 1.  This worked and I now have

[root@cranium][pts/1]:~# fdisk  -l

Disk /dev/sda: 320.0 GB, 320073629696 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        6201    49809501    7  HPFS/NTFS
/dev/sda2            6329        7545     9775552+  83  Linux
/dev/sda3            7546       38913   251963460   83  Linux
/dev/sda4            6202        6328     1020127+   f  W95 Ext'd (LBA)
/dev/sda5            6202        6328     1020096   82  Linux swap /
Solaris


I orig had a problem with the space being at the end and I could use
it their. So I used partition magic 8.0 and moved all the data over by
20G. This took 12hrs... heh. All my data is intact so I reconstructed
my raid 1. Good times. I cant believe this worked, it was voodoo.
_______________________________________________
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/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD7Otc48JsCLyRVlARAo27AJ44br1TcpVSLeKbzjNl15oiYzsoGQCaA3KN
GVZvpMNBJ9ddBPhb+7Q60m8=
=zE4d
-----END PGP SIGNATURE-----

      reply	other threads:[~2006-02-10 19:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-09  5:26 [linux-lvm] Freeing space on a LVM for other partitions Richard Blumel
2006-02-10 19:37 ` Richard Blumel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43ECEB5C.6030509@earthlink.net \
    --to=revslowmo@earthlink.net \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.