5 replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
source | link

If I understand you correctly, you want to use the free space on sdd2 for creating another Partition sdd3. To do that, you first need to resize the physical volume (if you haven't done that already) using pvresize.

First have a look at how big your physical volume is using pvdisplay /dev/sdd2. If it already has the correct size, skip to the next step. Otherwise you need to resize it first:

pvresize --setphysicalvolumesize 123G /dev/sdd2

Instead of 123G use the appropriate new size. Be careful with this.

When pvresize fails with an error that certain extents are allocated, then there can be two reasons for it: 1) you tried to make the pv size too small 2) certain extents are allocated towards the end of the disk instead of the beginning.

In the latter case you need to move those extents to the beginning first. For a list of contiguous segment allocations run

pvs -v --segments

When you have free space on your PV, not everything will be allocated from first to last segment. Move the fragments that block your pvresize to the beginning with

pvmove --alloc anywhere SOURCE_SEGMENTS

(SOURCE_SEGMENTS being the segments you want to move)

For a more detailed explanation have a look at the answers here: http://unix.stackexchange.com/a/67707/154982https://unix.stackexchange.com/a/67707/154982

The next step is to reduce the partition size. Write down the new total size of your physical volume. Then use fdisk (or your graphical tool or whatever partitioning program you prefer), write down the starting block of the partition sdd2, delete it and create a new one with the size of your physical volume. It is important that this new partition starts at the exact same block that your old sdd2 partition started at! For the partition size, keep in mind, that you may have to convert block/sector numbers into bytes. fdisk will tell you how many bytes are allocated for one sector (usually 512). Also keep in mind, that magnitudes are of base 1024, not 1000 (i.e. KiB instead of kB).

After creating the new smaller sdd2 you have new unallocated space on your disk which you can use to create another partition sdd3.

However, if you just want to use the free 600MB at the end of sdd2 for your LVM, you may just want to enlarge your pv using

pvresize /dev/sdd2

Afterwards increase the size of your lv and file system (using lvresize -r) and you're done. You can, of course also create a new lv on the free pv space.

If I understand you correctly, you want to use the free space on sdd2 for creating another Partition sdd3. To do that, you first need to resize the physical volume (if you haven't done that already) using pvresize.

First have a look at how big your physical volume is using pvdisplay /dev/sdd2. If it already has the correct size, skip to the next step. Otherwise you need to resize it first:

pvresize --setphysicalvolumesize 123G /dev/sdd2

Instead of 123G use the appropriate new size. Be careful with this.

When pvresize fails with an error that certain extents are allocated, then there can be two reasons for it: 1) you tried to make the pv size too small 2) certain extents are allocated towards the end of the disk instead of the beginning.

In the latter case you need to move those extents to the beginning first. For a list of contiguous segment allocations run

pvs -v --segments

When you have free space on your PV, not everything will be allocated from first to last segment. Move the fragments that block your pvresize to the beginning with

pvmove --alloc anywhere SOURCE_SEGMENTS

(SOURCE_SEGMENTS being the segments you want to move)

For a more detailed explanation have a look at the answers here: http://unix.stackexchange.com/a/67707/154982

The next step is to reduce the partition size. Write down the new total size of your physical volume. Then use fdisk (or your graphical tool or whatever partitioning program you prefer), write down the starting block of the partition sdd2, delete it and create a new one with the size of your physical volume. It is important that this new partition starts at the exact same block that your old sdd2 partition started at! For the partition size, keep in mind, that you may have to convert block/sector numbers into bytes. fdisk will tell you how many bytes are allocated for one sector (usually 512). Also keep in mind, that magnitudes are of base 1024, not 1000 (i.e. KiB instead of kB).

After creating the new smaller sdd2 you have new unallocated space on your disk which you can use to create another partition sdd3.

However, if you just want to use the free 600MB at the end of sdd2 for your LVM, you may just want to enlarge your pv using

pvresize /dev/sdd2

Afterwards increase the size of your lv and file system (using lvresize -r) and you're done. You can, of course also create a new lv on the free pv space.

If I understand you correctly, you want to use the free space on sdd2 for creating another Partition sdd3. To do that, you first need to resize the physical volume (if you haven't done that already) using pvresize.

First have a look at how big your physical volume is using pvdisplay /dev/sdd2. If it already has the correct size, skip to the next step. Otherwise you need to resize it first:

pvresize --setphysicalvolumesize 123G /dev/sdd2

Instead of 123G use the appropriate new size. Be careful with this.

When pvresize fails with an error that certain extents are allocated, then there can be two reasons for it: 1) you tried to make the pv size too small 2) certain extents are allocated towards the end of the disk instead of the beginning.

In the latter case you need to move those extents to the beginning first. For a list of contiguous segment allocations run

pvs -v --segments

When you have free space on your PV, not everything will be allocated from first to last segment. Move the fragments that block your pvresize to the beginning with

pvmove --alloc anywhere SOURCE_SEGMENTS

(SOURCE_SEGMENTS being the segments you want to move)

For a more detailed explanation have a look at the answers here: https://unix.stackexchange.com/a/67707/154982

The next step is to reduce the partition size. Write down the new total size of your physical volume. Then use fdisk (or your graphical tool or whatever partitioning program you prefer), write down the starting block of the partition sdd2, delete it and create a new one with the size of your physical volume. It is important that this new partition starts at the exact same block that your old sdd2 partition started at! For the partition size, keep in mind, that you may have to convert block/sector numbers into bytes. fdisk will tell you how many bytes are allocated for one sector (usually 512). Also keep in mind, that magnitudes are of base 1024, not 1000 (i.e. KiB instead of kB).

After creating the new smaller sdd2 you have new unallocated space on your disk which you can use to create another partition sdd3.

However, if you just want to use the free 600MB at the end of sdd2 for your LVM, you may just want to enlarge your pv using

pvresize /dev/sdd2

Afterwards increase the size of your lv and file system (using lvresize -r) and you're done. You can, of course also create a new lv on the free pv space.

4 added 8 characters in body
source | link

If I understand you correctly, you want to use the free space on sdd2 for creating another Partition sdd3. To do that, you first need to resize the physical volume (if you haven't done that already) using pvresize.

First have a look at how big your physical volume is using pvdisplay /dev/sdd2. If it already has the correct size, skip to the next step. Otherwise you need to resize it first:

pvresize --setphysicalvolumesize 123G /dev/sdd2

Instead of 123G use the appropriate new size. Be careful with this.

When pvresize fails with an error that certain extents are allocated, then there can be two reasons for it: 1) you tried to make the pv size too small 2) certain extents are allocated towards the end of the disk instead of the beginning.

In the latter case you need to move those extents to the beginning first. For a list of contiguous segment allocations run

pvs -v --segments

When you have free space on your PV, not everything will be allocated from first to last segment. Move the fragments that block your pvresize to the beginning with

pvmove --alloc anywhere SOURCE_SEGMENTS

(SOURCE_SEGMENTS being the segments you want to move)

For a more detailed explanation have a look at the answers here: http://unix.stackexchange.com/a/67707/154982

The next step is to reduce the partition size. Write down the new total size of your physical volume. Then use fdisk (or your graphical tool or whatever partitioning program you prefer), write down the starting block of the partition sdd2, delete it and create a new one with the size of your physical volume. It is important that this new partition starts at the exact same block that your old sdd2 partition started at! For the partition size, keep in mind, that you may have to convert block/sector numbers into bytes. fdisk will tell you how many bytes are allocated for one blocksector (usually 512). Also keep in mind, that magnitudes are of base 1024, not 1000 (i.e. KiB instead of kB).

After creating the new smaller sdd2 you have new unallocated space on your disk which you can use to create another partition sdd3.

However, if you just want to use the free 600MB at the end of sdd2 for your LVM, you may just want to enlarge your pv using

pvresize /dev/sdd2

Afterwards increase the size of your lv and file system (using lvresize -r) and you're done. You can, of course also create a new lv on the free pv space.

If I understand you correctly, you want to use the free space on sdd2 for creating another Partition sdd3. To do that, you first need to resize the physical volume (if you haven't done that already) using pvresize.

First have a look at how big your physical volume is using pvdisplay /dev/sdd2. If it already has the correct size, skip to the next step. Otherwise you need to resize it first:

pvresize --setphysicalvolumesize 123G /dev/sdd2

Instead of 123G use the appropriate new size. Be careful with this.

When pvresize fails with an error that certain extents are allocated, then there can be two reasons for it: 1) you tried to make the pv size too small 2) certain extents are allocated towards the end of the disk instead of the beginning.

In the latter case you need to move those extents to the beginning first. For a list of contiguous segment allocations run

pvs -v --segments

When you have free space on your PV, not everything will be allocated from first to last segment. Move the fragments that block your pvresize to the beginning with

pvmove --alloc anywhere SOURCE_SEGMENTS

(SOURCE_SEGMENTS being the segments you want to move)

For a more detailed explanation have a look at the answers here: http://unix.stackexchange.com/a/67707/154982

The next step is to reduce the partition size. Write down the new total size of your physical volume. Then use fdisk (or your graphical tool or whatever partitioning program you prefer), write down the starting block of the partition sdd2, delete it and create a new one with the size of your physical volume. It is important that this new partition starts at the exact same block that your old sdd2 partition started at! For the partition size, keep in mind, that you may have to convert block numbers into bytes. fdisk will tell you how many bytes are allocated for one block (usually 512). Also keep in mind, that magnitudes are of base 1024, not 1000 (i.e. KiB instead of kB).

After creating the new smaller sdd2 you have new unallocated space on your disk which you can use to create another partition sdd3.

However, if you just want to use the free 600MB at the end of sdd2 for your LVM, you may just want to enlarge your pv using

pvresize /dev/sdd2

Afterwards increase the size of your lv and file system (using lvresize -r) and you're done. You can, of course also create a new lv on the free pv space.

If I understand you correctly, you want to use the free space on sdd2 for creating another Partition sdd3. To do that, you first need to resize the physical volume (if you haven't done that already) using pvresize.

First have a look at how big your physical volume is using pvdisplay /dev/sdd2. If it already has the correct size, skip to the next step. Otherwise you need to resize it first:

pvresize --setphysicalvolumesize 123G /dev/sdd2

Instead of 123G use the appropriate new size. Be careful with this.

When pvresize fails with an error that certain extents are allocated, then there can be two reasons for it: 1) you tried to make the pv size too small 2) certain extents are allocated towards the end of the disk instead of the beginning.

In the latter case you need to move those extents to the beginning first. For a list of contiguous segment allocations run

pvs -v --segments

When you have free space on your PV, not everything will be allocated from first to last segment. Move the fragments that block your pvresize to the beginning with

pvmove --alloc anywhere SOURCE_SEGMENTS

(SOURCE_SEGMENTS being the segments you want to move)

For a more detailed explanation have a look at the answers here: http://unix.stackexchange.com/a/67707/154982

The next step is to reduce the partition size. Write down the new total size of your physical volume. Then use fdisk (or your graphical tool or whatever partitioning program you prefer), write down the starting block of the partition sdd2, delete it and create a new one with the size of your physical volume. It is important that this new partition starts at the exact same block that your old sdd2 partition started at! For the partition size, keep in mind, that you may have to convert block/sector numbers into bytes. fdisk will tell you how many bytes are allocated for one sector (usually 512). Also keep in mind, that magnitudes are of base 1024, not 1000 (i.e. KiB instead of kB).

After creating the new smaller sdd2 you have new unallocated space on your disk which you can use to create another partition sdd3.

However, if you just want to use the free 600MB at the end of sdd2 for your LVM, you may just want to enlarge your pv using

pvresize /dev/sdd2

Afterwards increase the size of your lv and file system (using lvresize -r) and you're done. You can, of course also create a new lv on the free pv space.

3 added 712 characters in body
source | link

If I understand you correctly, you want to use the free space on sdd2 for creating another Partition sdd3. To do that, you first need to resize the physical volume (if you haven't done that already) using pvresize.

First have a look at how big your physical volume is using pvdisplay /dev/sdd2. If it already has the correct size, skip to the next step. Otherwise you need to resize it first:

pvresize --setphysicalvolumesize 123G /dev/sdd2

Instead of 123G use the appropriate new size. Be careful with this. Making

When pvresize fails with an error that certain extents are allocated, then there can be two reasons for it: 1) you tried to make the pv smaller thansize too small 2) certain extents are allocated towards the end of the disk instead of the beginning.

In the latter case you need to move those extents to the beginning first. For a list of contiguous segment allocations run

pvs -v --segments

When you have free space on your PV, not everything will leadbe allocated from first to data losslast segment. Move the fragments that block your pvresize to the beginning with

pvmove --alloc anywhere SOURCE_SEGMENTS

(SOURCE_SEGMENTS being the segments you want to move)

For a more detailed explanation have a look at the answers here: http://unix.stackexchange.com/a/67707/154982

The next step is to reduce the partition size. Write down the new total size of your physical volume. Then use fdisk (or your graphical tool or whatever partitioning program you prefer), write down the starting block of the partition sdd2, delete it and create a new one with the size of your physical volume. It is important that this new partition starts at the exact same block that your old sdd2 partition started at! For the partition size, keep in mind, that you may have to convert block numbers into bytes. fdisk will tell you how many bytes are allocated for one block (usually 512). Also keep in mind, that magnitudes are of base 1024, not 1000 (i.e. KiB instead of kB).

After creating the new smaller sdd2 you have new unallocated space on your disk which you can use to create another partition sdd3.

However, if you just want to use the free 600MB at the end of sdd2 for your LVM, you may just want to enlarge your pv using

pvresize /dev/sdd2

Afterwards increase the size of your lv and file system (using lvresize -r) and you're done. You can, of course also create a new lv on the free pv space.

If I understand you correctly, you want to use the free space on sdd2 for creating another Partition sdd3. To do that, you first need to resize the physical volume (if you haven't done that already) using pvresize.

First have a look at how big your physical volume is using pvdisplay /dev/sdd2. If it already has the correct size, skip to the next step. Otherwise you need to resize it first:

pvresize --setphysicalvolumesize 123G /dev/sdd2

Instead of 123G use the appropriate new size. Be careful with this. Making the pv smaller than the free space will lead to data loss.

The next step is to reduce the partition size. Write down the new total size of your physical volume. Then use fdisk (or your graphical tool or whatever partitioning program you prefer), write down the starting block of the partition sdd2, delete it and create a new one with the size of your physical volume. It is important that this new partition starts at the exact same block that your old sdd2 partition started at! For the partition size, keep in mind, that you may have to convert block numbers into bytes. fdisk will tell you how many bytes are allocated for one block (usually 512).

After creating the new smaller sdd2 you have new unallocated space on your disk which you can use to create another partition sdd3.

However, if you just want to use the free 600MB at the end of sdd2 for your LVM, you may just want to enlarge your pv using

pvresize /dev/sdd2

Afterwards increase the size of your lv and file system (using lvresize -r) and you're done. You can, of course also create a new lv on the free pv space.

If I understand you correctly, you want to use the free space on sdd2 for creating another Partition sdd3. To do that, you first need to resize the physical volume (if you haven't done that already) using pvresize.

First have a look at how big your physical volume is using pvdisplay /dev/sdd2. If it already has the correct size, skip to the next step. Otherwise you need to resize it first:

pvresize --setphysicalvolumesize 123G /dev/sdd2

Instead of 123G use the appropriate new size. Be careful with this.

When pvresize fails with an error that certain extents are allocated, then there can be two reasons for it: 1) you tried to make the pv size too small 2) certain extents are allocated towards the end of the disk instead of the beginning.

In the latter case you need to move those extents to the beginning first. For a list of contiguous segment allocations run

pvs -v --segments

When you have free space on your PV, not everything will be allocated from first to last segment. Move the fragments that block your pvresize to the beginning with

pvmove --alloc anywhere SOURCE_SEGMENTS

(SOURCE_SEGMENTS being the segments you want to move)

For a more detailed explanation have a look at the answers here: http://unix.stackexchange.com/a/67707/154982

The next step is to reduce the partition size. Write down the new total size of your physical volume. Then use fdisk (or your graphical tool or whatever partitioning program you prefer), write down the starting block of the partition sdd2, delete it and create a new one with the size of your physical volume. It is important that this new partition starts at the exact same block that your old sdd2 partition started at! For the partition size, keep in mind, that you may have to convert block numbers into bytes. fdisk will tell you how many bytes are allocated for one block (usually 512). Also keep in mind, that magnitudes are of base 1024, not 1000 (i.e. KiB instead of kB).

After creating the new smaller sdd2 you have new unallocated space on your disk which you can use to create another partition sdd3.

However, if you just want to use the free 600MB at the end of sdd2 for your LVM, you may just want to enlarge your pv using

pvresize /dev/sdd2

Afterwards increase the size of your lv and file system (using lvresize -r) and you're done. You can, of course also create a new lv on the free pv space.

2 added 248 characters in body
source | link
1
source | link