Increase size in dev/sda
Alright People be nice. First question here. I tried to search on blogs but could get anywhere.
I am using debian which is on vmware so case may be little different.
Situation :
This is machine setup in vmware environment in data center, So i can not put bootable disk.
Have two option :
1: resizing same dev/sda1 partition which seems impossible. So I have decided to do option 2.
2 : add another partition with remaining of disk space
Have already increased size on vmware to 300 GB (also tried adding another disk 1st 30 gb, second 200 gb)
+++++++++++++++
less /proc/version
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02)
/proc/version (END)
root@Penxxy3:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 29G 29G 0 100% /
udev 10M 0 10M 0% /dev
tmpfs 1.6G 29M 1.6G 2% /run
tmpfs 4.0G 12K 4.0G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 4.0G 0 4.0G 0% /sys/fs/cgroup
10.224.0.124:/data/backups/xxmer 11T 521G 11T 5% /homer
tmpfs 801M 4.0K 801M 1% /run/user/1000
root@PentahoSy3:/#
++++++++++++++
Command (m for help): p
Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors <<<<< 300 GiB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8476ef5a
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 60262399 60260352 28.8G 83 Linux
/dev/sda2 60264446 62912511 2648066 1.3G 5 Extended
/dev/sda5 60264448 62912511 2648064 1.3G 82 Linux swap / Solaris
Command (m for help): m
Command (m for help): n
Partition type
p primary (1 primary, 1 extended, 2 free)
l logical (numbered from 5)
Select (default p):
Using default response p.
Partition number (3,4, default 3):
First sector (60262400-629145599, default 60262400):
Last sector, +sectors or +size{K,M,G,T,P} (60262400-60264445, default 60264445):
Created a new partition 3 of type 'Linux' and of size 1023 KiB.
Command (m for help): p
Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8476ef5a
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 60262399 60260352 28.8G 83 Linux
/dev/sda2 60264446 62912511 2648066 1.3G 5 Extended
/dev/sda3 60262400 60264445 2046 1023K 83 Linux
/dev/sda5 60264448 62912511 2648064 1.3G 82 Linux swap / Solaris
Any idea how can i add another partition with rest of 260 odd GB ?
linux partitioning debian vmware-player
add a comment |
Alright People be nice. First question here. I tried to search on blogs but could get anywhere.
I am using debian which is on vmware so case may be little different.
Situation :
This is machine setup in vmware environment in data center, So i can not put bootable disk.
Have two option :
1: resizing same dev/sda1 partition which seems impossible. So I have decided to do option 2.
2 : add another partition with remaining of disk space
Have already increased size on vmware to 300 GB (also tried adding another disk 1st 30 gb, second 200 gb)
+++++++++++++++
less /proc/version
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02)
/proc/version (END)
root@Penxxy3:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 29G 29G 0 100% /
udev 10M 0 10M 0% /dev
tmpfs 1.6G 29M 1.6G 2% /run
tmpfs 4.0G 12K 4.0G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 4.0G 0 4.0G 0% /sys/fs/cgroup
10.224.0.124:/data/backups/xxmer 11T 521G 11T 5% /homer
tmpfs 801M 4.0K 801M 1% /run/user/1000
root@PentahoSy3:/#
++++++++++++++
Command (m for help): p
Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors <<<<< 300 GiB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8476ef5a
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 60262399 60260352 28.8G 83 Linux
/dev/sda2 60264446 62912511 2648066 1.3G 5 Extended
/dev/sda5 60264448 62912511 2648064 1.3G 82 Linux swap / Solaris
Command (m for help): m
Command (m for help): n
Partition type
p primary (1 primary, 1 extended, 2 free)
l logical (numbered from 5)
Select (default p):
Using default response p.
Partition number (3,4, default 3):
First sector (60262400-629145599, default 60262400):
Last sector, +sectors or +size{K,M,G,T,P} (60262400-60264445, default 60264445):
Created a new partition 3 of type 'Linux' and of size 1023 KiB.
Command (m for help): p
Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8476ef5a
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 60262399 60260352 28.8G 83 Linux
/dev/sda2 60264446 62912511 2648066 1.3G 5 Extended
/dev/sda3 60262400 60264445 2046 1023K 83 Linux
/dev/sda5 60264448 62912511 2648064 1.3G 82 Linux swap / Solaris
Any idea how can i add another partition with rest of 260 odd GB ?
linux partitioning debian vmware-player
I added another HDD in vmware dev/sdb with 200 GB and was able to partition that using fdisk /dev/sdb but I can not see that shown. root@PentahoSy3:/# fdisk /dev/sdb Disk /dev/sdb: 200 GiB, 214748364800 bytes, 419430400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x28205cd1 Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 83 Linux
– Krishnam
Mar 23 '16 at 1:00
Oh I see, you tried to make a new partition, but it would only create 1023K partition?
– Paul
Mar 23 '16 at 1:03
1
When extending a partition the extended space in not automatically added to the exist space, instead it becomes unused space after the partition. You need to get an ISO copy of gparted or partedmagic or etc. Boot, and use it to increase the size of the existing partition to include the unused space.
– cybernard
Mar 23 '16 at 1:13
add a comment |
Alright People be nice. First question here. I tried to search on blogs but could get anywhere.
I am using debian which is on vmware so case may be little different.
Situation :
This is machine setup in vmware environment in data center, So i can not put bootable disk.
Have two option :
1: resizing same dev/sda1 partition which seems impossible. So I have decided to do option 2.
2 : add another partition with remaining of disk space
Have already increased size on vmware to 300 GB (also tried adding another disk 1st 30 gb, second 200 gb)
+++++++++++++++
less /proc/version
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02)
/proc/version (END)
root@Penxxy3:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 29G 29G 0 100% /
udev 10M 0 10M 0% /dev
tmpfs 1.6G 29M 1.6G 2% /run
tmpfs 4.0G 12K 4.0G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 4.0G 0 4.0G 0% /sys/fs/cgroup
10.224.0.124:/data/backups/xxmer 11T 521G 11T 5% /homer
tmpfs 801M 4.0K 801M 1% /run/user/1000
root@PentahoSy3:/#
++++++++++++++
Command (m for help): p
Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors <<<<< 300 GiB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8476ef5a
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 60262399 60260352 28.8G 83 Linux
/dev/sda2 60264446 62912511 2648066 1.3G 5 Extended
/dev/sda5 60264448 62912511 2648064 1.3G 82 Linux swap / Solaris
Command (m for help): m
Command (m for help): n
Partition type
p primary (1 primary, 1 extended, 2 free)
l logical (numbered from 5)
Select (default p):
Using default response p.
Partition number (3,4, default 3):
First sector (60262400-629145599, default 60262400):
Last sector, +sectors or +size{K,M,G,T,P} (60262400-60264445, default 60264445):
Created a new partition 3 of type 'Linux' and of size 1023 KiB.
Command (m for help): p
Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8476ef5a
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 60262399 60260352 28.8G 83 Linux
/dev/sda2 60264446 62912511 2648066 1.3G 5 Extended
/dev/sda3 60262400 60264445 2046 1023K 83 Linux
/dev/sda5 60264448 62912511 2648064 1.3G 82 Linux swap / Solaris
Any idea how can i add another partition with rest of 260 odd GB ?
linux partitioning debian vmware-player
Alright People be nice. First question here. I tried to search on blogs but could get anywhere.
I am using debian which is on vmware so case may be little different.
Situation :
This is machine setup in vmware environment in data center, So i can not put bootable disk.
Have two option :
1: resizing same dev/sda1 partition which seems impossible. So I have decided to do option 2.
2 : add another partition with remaining of disk space
Have already increased size on vmware to 300 GB (also tried adding another disk 1st 30 gb, second 200 gb)
+++++++++++++++
less /proc/version
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02)
/proc/version (END)
root@Penxxy3:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 29G 29G 0 100% /
udev 10M 0 10M 0% /dev
tmpfs 1.6G 29M 1.6G 2% /run
tmpfs 4.0G 12K 4.0G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 4.0G 0 4.0G 0% /sys/fs/cgroup
10.224.0.124:/data/backups/xxmer 11T 521G 11T 5% /homer
tmpfs 801M 4.0K 801M 1% /run/user/1000
root@PentahoSy3:/#
++++++++++++++
Command (m for help): p
Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors <<<<< 300 GiB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8476ef5a
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 60262399 60260352 28.8G 83 Linux
/dev/sda2 60264446 62912511 2648066 1.3G 5 Extended
/dev/sda5 60264448 62912511 2648064 1.3G 82 Linux swap / Solaris
Command (m for help): m
Command (m for help): n
Partition type
p primary (1 primary, 1 extended, 2 free)
l logical (numbered from 5)
Select (default p):
Using default response p.
Partition number (3,4, default 3):
First sector (60262400-629145599, default 60262400):
Last sector, +sectors or +size{K,M,G,T,P} (60262400-60264445, default 60264445):
Created a new partition 3 of type 'Linux' and of size 1023 KiB.
Command (m for help): p
Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8476ef5a
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 60262399 60260352 28.8G 83 Linux
/dev/sda2 60264446 62912511 2648066 1.3G 5 Extended
/dev/sda3 60262400 60264445 2046 1023K 83 Linux
/dev/sda5 60264448 62912511 2648064 1.3G 82 Linux swap / Solaris
Any idea how can i add another partition with rest of 260 odd GB ?
linux partitioning debian vmware-player
linux partitioning debian vmware-player
edited Dec 16 '18 at 19:11
Hennes
58.9k792141
58.9k792141
asked Mar 23 '16 at 0:48
KrishnamKrishnam
61125
61125
I added another HDD in vmware dev/sdb with 200 GB and was able to partition that using fdisk /dev/sdb but I can not see that shown. root@PentahoSy3:/# fdisk /dev/sdb Disk /dev/sdb: 200 GiB, 214748364800 bytes, 419430400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x28205cd1 Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 83 Linux
– Krishnam
Mar 23 '16 at 1:00
Oh I see, you tried to make a new partition, but it would only create 1023K partition?
– Paul
Mar 23 '16 at 1:03
1
When extending a partition the extended space in not automatically added to the exist space, instead it becomes unused space after the partition. You need to get an ISO copy of gparted or partedmagic or etc. Boot, and use it to increase the size of the existing partition to include the unused space.
– cybernard
Mar 23 '16 at 1:13
add a comment |
I added another HDD in vmware dev/sdb with 200 GB and was able to partition that using fdisk /dev/sdb but I can not see that shown. root@PentahoSy3:/# fdisk /dev/sdb Disk /dev/sdb: 200 GiB, 214748364800 bytes, 419430400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x28205cd1 Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 83 Linux
– Krishnam
Mar 23 '16 at 1:00
Oh I see, you tried to make a new partition, but it would only create 1023K partition?
– Paul
Mar 23 '16 at 1:03
1
When extending a partition the extended space in not automatically added to the exist space, instead it becomes unused space after the partition. You need to get an ISO copy of gparted or partedmagic or etc. Boot, and use it to increase the size of the existing partition to include the unused space.
– cybernard
Mar 23 '16 at 1:13
I added another HDD in vmware dev/sdb with 200 GB and was able to partition that using fdisk /dev/sdb but I can not see that shown. root@PentahoSy3:/# fdisk /dev/sdb Disk /dev/sdb: 200 GiB, 214748364800 bytes, 419430400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x28205cd1 Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 83 Linux
– Krishnam
Mar 23 '16 at 1:00
I added another HDD in vmware dev/sdb with 200 GB and was able to partition that using fdisk /dev/sdb but I can not see that shown. root@PentahoSy3:/# fdisk /dev/sdb Disk /dev/sdb: 200 GiB, 214748364800 bytes, 419430400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x28205cd1 Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 83 Linux
– Krishnam
Mar 23 '16 at 1:00
Oh I see, you tried to make a new partition, but it would only create 1023K partition?
– Paul
Mar 23 '16 at 1:03
Oh I see, you tried to make a new partition, but it would only create 1023K partition?
– Paul
Mar 23 '16 at 1:03
1
1
When extending a partition the extended space in not automatically added to the exist space, instead it becomes unused space after the partition. You need to get an ISO copy of gparted or partedmagic or etc. Boot, and use it to increase the size of the existing partition to include the unused space.
– cybernard
Mar 23 '16 at 1:13
When extending a partition the extended space in not automatically added to the exist space, instead it becomes unused space after the partition. You need to get an ISO copy of gparted or partedmagic or etc. Boot, and use it to increase the size of the existing partition to include the unused space.
– cybernard
Mar 23 '16 at 1:13
add a comment |
3 Answers
3
active
oldest
votes
You currently have a primary partition, and an extended partition.
You attempted to create a new primary partition, but there isn't very much space between the current primary partition and the extended.
An extended partition lets you create additional partitions beyond the four primaries permitted.
Instead of choosing p
when creating the partition, choose l
. This will let you use the remaining space.
also tried wit with adding diff partition. There is limit on characters left so I cant share output here. root@PentahoSy3:/# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 29G 29G 0 100% / udev 10M 0 10M 0% /dev tmpfs 1.6G 8.9M 1.6G 1% /run Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 5 Extended
– Krishnam
Mar 23 '16 at 1:10
@Krishnam And what happened?
– Paul
Mar 23 '16 at 1:11
Oh wait, I see. The extended partition was created when the disk was only 30GB, and so it doesn't know about the rest of the space.
– Paul
Mar 23 '16 at 1:11
You don't seem to be using sda2 and sda3, and sda5 is swap. Could you turn swap off, then delete these three partitions?
– Paul
Mar 23 '16 at 1:13
Ok searching on how to disable swap.
– Krishnam
Mar 23 '16 at 1:15
|
show 3 more comments
These operations come with risk - so back up your disk first.
Both options are possible. The first step is to increase the size of the disk outside the VM. I don't use VMWare, so can't advise, but you seem to have this in hand.
****Option 1 - Increase the size of the partition ****
- Boot the system
- Unmount swap using swapoff -a
Use FDISK to delete the swap partition (/dev/sda5). Then
delete and recreate the primary partition to the desired size, making
careful note to start it at the same block, use type 83 and make
it bootable. If you don't use swap often, and think you may need this
process again, you can create a swap file rather then disk, otherwise
you can create a new swap partition at the end of the disk - make sure its
type 82.(May not be needed) comment out the swap mounting from /etc/fstab
- Reboot the system.
- When the system comes up, you can grow the filesystem to take advantage
of the additional space with a command like resize2fs /dev/sda1 (some
distros its resize4fs /dev/sda1 - either is OK) - Create a swap file if you need one, for example dd if=/dev/zero of=/swap.file bs=102400 count=10240 [for a 1 gig file]
- Format swap file or partition mkswap /file/or/partition
- Add swap file/partition to /etc/fstab
- swapon -a to activate swap
** Option 2 - Create a new partition **
Follow the instructions above, except create a new partition for the new space rather then expand the existing partition. You will need to format the space rather then expand it. You will need to reformat recreated swap partition as well.
** Future Builds **
In future, consider using LVM - if you had an LVM install you could put swap and additional partitions on LVM, and simply add new LVM partitions - then use LVM to join partitions together into a single logical device.
add a comment |
My suggestion is to get a partition editor like gparted https://gparted.org/
- Put it on your datastore.
- Go into the properties of the VM and assign the ISO to the virtual CD/DVD
- Boot the VM, and press ESC and you should get a boot menu
- Select virtual CD/DVD
- Boot
- When loaded launch gparted, and you can then visually see what is going on.
- Delete,add, resize, or etc the necessary partitions.
- Commit your changes
- Wait for that to complete
- Reboot
- Don't press any key and it should boot normally.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1056217%2fincrease-size-in-dev-sda%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You currently have a primary partition, and an extended partition.
You attempted to create a new primary partition, but there isn't very much space between the current primary partition and the extended.
An extended partition lets you create additional partitions beyond the four primaries permitted.
Instead of choosing p
when creating the partition, choose l
. This will let you use the remaining space.
also tried wit with adding diff partition. There is limit on characters left so I cant share output here. root@PentahoSy3:/# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 29G 29G 0 100% / udev 10M 0 10M 0% /dev tmpfs 1.6G 8.9M 1.6G 1% /run Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 5 Extended
– Krishnam
Mar 23 '16 at 1:10
@Krishnam And what happened?
– Paul
Mar 23 '16 at 1:11
Oh wait, I see. The extended partition was created when the disk was only 30GB, and so it doesn't know about the rest of the space.
– Paul
Mar 23 '16 at 1:11
You don't seem to be using sda2 and sda3, and sda5 is swap. Could you turn swap off, then delete these three partitions?
– Paul
Mar 23 '16 at 1:13
Ok searching on how to disable swap.
– Krishnam
Mar 23 '16 at 1:15
|
show 3 more comments
You currently have a primary partition, and an extended partition.
You attempted to create a new primary partition, but there isn't very much space between the current primary partition and the extended.
An extended partition lets you create additional partitions beyond the four primaries permitted.
Instead of choosing p
when creating the partition, choose l
. This will let you use the remaining space.
also tried wit with adding diff partition. There is limit on characters left so I cant share output here. root@PentahoSy3:/# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 29G 29G 0 100% / udev 10M 0 10M 0% /dev tmpfs 1.6G 8.9M 1.6G 1% /run Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 5 Extended
– Krishnam
Mar 23 '16 at 1:10
@Krishnam And what happened?
– Paul
Mar 23 '16 at 1:11
Oh wait, I see. The extended partition was created when the disk was only 30GB, and so it doesn't know about the rest of the space.
– Paul
Mar 23 '16 at 1:11
You don't seem to be using sda2 and sda3, and sda5 is swap. Could you turn swap off, then delete these three partitions?
– Paul
Mar 23 '16 at 1:13
Ok searching on how to disable swap.
– Krishnam
Mar 23 '16 at 1:15
|
show 3 more comments
You currently have a primary partition, and an extended partition.
You attempted to create a new primary partition, but there isn't very much space between the current primary partition and the extended.
An extended partition lets you create additional partitions beyond the four primaries permitted.
Instead of choosing p
when creating the partition, choose l
. This will let you use the remaining space.
You currently have a primary partition, and an extended partition.
You attempted to create a new primary partition, but there isn't very much space between the current primary partition and the extended.
An extended partition lets you create additional partitions beyond the four primaries permitted.
Instead of choosing p
when creating the partition, choose l
. This will let you use the remaining space.
answered Mar 23 '16 at 1:07
PaulPaul
47.8k13121147
47.8k13121147
also tried wit with adding diff partition. There is limit on characters left so I cant share output here. root@PentahoSy3:/# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 29G 29G 0 100% / udev 10M 0 10M 0% /dev tmpfs 1.6G 8.9M 1.6G 1% /run Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 5 Extended
– Krishnam
Mar 23 '16 at 1:10
@Krishnam And what happened?
– Paul
Mar 23 '16 at 1:11
Oh wait, I see. The extended partition was created when the disk was only 30GB, and so it doesn't know about the rest of the space.
– Paul
Mar 23 '16 at 1:11
You don't seem to be using sda2 and sda3, and sda5 is swap. Could you turn swap off, then delete these three partitions?
– Paul
Mar 23 '16 at 1:13
Ok searching on how to disable swap.
– Krishnam
Mar 23 '16 at 1:15
|
show 3 more comments
also tried wit with adding diff partition. There is limit on characters left so I cant share output here. root@PentahoSy3:/# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 29G 29G 0 100% / udev 10M 0 10M 0% /dev tmpfs 1.6G 8.9M 1.6G 1% /run Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 5 Extended
– Krishnam
Mar 23 '16 at 1:10
@Krishnam And what happened?
– Paul
Mar 23 '16 at 1:11
Oh wait, I see. The extended partition was created when the disk was only 30GB, and so it doesn't know about the rest of the space.
– Paul
Mar 23 '16 at 1:11
You don't seem to be using sda2 and sda3, and sda5 is swap. Could you turn swap off, then delete these three partitions?
– Paul
Mar 23 '16 at 1:13
Ok searching on how to disable swap.
– Krishnam
Mar 23 '16 at 1:15
also tried wit with adding diff partition. There is limit on characters left so I cant share output here. root@PentahoSy3:/# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 29G 29G 0 100% / udev 10M 0 10M 0% /dev tmpfs 1.6G 8.9M 1.6G 1% /run Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 5 Extended
– Krishnam
Mar 23 '16 at 1:10
also tried wit with adding diff partition. There is limit on characters left so I cant share output here. root@PentahoSy3:/# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 29G 29G 0 100% / udev 10M 0 10M 0% /dev tmpfs 1.6G 8.9M 1.6G 1% /run Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 5 Extended
– Krishnam
Mar 23 '16 at 1:10
@Krishnam And what happened?
– Paul
Mar 23 '16 at 1:11
@Krishnam And what happened?
– Paul
Mar 23 '16 at 1:11
Oh wait, I see. The extended partition was created when the disk was only 30GB, and so it doesn't know about the rest of the space.
– Paul
Mar 23 '16 at 1:11
Oh wait, I see. The extended partition was created when the disk was only 30GB, and so it doesn't know about the rest of the space.
– Paul
Mar 23 '16 at 1:11
You don't seem to be using sda2 and sda3, and sda5 is swap. Could you turn swap off, then delete these three partitions?
– Paul
Mar 23 '16 at 1:13
You don't seem to be using sda2 and sda3, and sda5 is swap. Could you turn swap off, then delete these three partitions?
– Paul
Mar 23 '16 at 1:13
Ok searching on how to disable swap.
– Krishnam
Mar 23 '16 at 1:15
Ok searching on how to disable swap.
– Krishnam
Mar 23 '16 at 1:15
|
show 3 more comments
These operations come with risk - so back up your disk first.
Both options are possible. The first step is to increase the size of the disk outside the VM. I don't use VMWare, so can't advise, but you seem to have this in hand.
****Option 1 - Increase the size of the partition ****
- Boot the system
- Unmount swap using swapoff -a
Use FDISK to delete the swap partition (/dev/sda5). Then
delete and recreate the primary partition to the desired size, making
careful note to start it at the same block, use type 83 and make
it bootable. If you don't use swap often, and think you may need this
process again, you can create a swap file rather then disk, otherwise
you can create a new swap partition at the end of the disk - make sure its
type 82.(May not be needed) comment out the swap mounting from /etc/fstab
- Reboot the system.
- When the system comes up, you can grow the filesystem to take advantage
of the additional space with a command like resize2fs /dev/sda1 (some
distros its resize4fs /dev/sda1 - either is OK) - Create a swap file if you need one, for example dd if=/dev/zero of=/swap.file bs=102400 count=10240 [for a 1 gig file]
- Format swap file or partition mkswap /file/or/partition
- Add swap file/partition to /etc/fstab
- swapon -a to activate swap
** Option 2 - Create a new partition **
Follow the instructions above, except create a new partition for the new space rather then expand the existing partition. You will need to format the space rather then expand it. You will need to reformat recreated swap partition as well.
** Future Builds **
In future, consider using LVM - if you had an LVM install you could put swap and additional partitions on LVM, and simply add new LVM partitions - then use LVM to join partitions together into a single logical device.
add a comment |
These operations come with risk - so back up your disk first.
Both options are possible. The first step is to increase the size of the disk outside the VM. I don't use VMWare, so can't advise, but you seem to have this in hand.
****Option 1 - Increase the size of the partition ****
- Boot the system
- Unmount swap using swapoff -a
Use FDISK to delete the swap partition (/dev/sda5). Then
delete and recreate the primary partition to the desired size, making
careful note to start it at the same block, use type 83 and make
it bootable. If you don't use swap often, and think you may need this
process again, you can create a swap file rather then disk, otherwise
you can create a new swap partition at the end of the disk - make sure its
type 82.(May not be needed) comment out the swap mounting from /etc/fstab
- Reboot the system.
- When the system comes up, you can grow the filesystem to take advantage
of the additional space with a command like resize2fs /dev/sda1 (some
distros its resize4fs /dev/sda1 - either is OK) - Create a swap file if you need one, for example dd if=/dev/zero of=/swap.file bs=102400 count=10240 [for a 1 gig file]
- Format swap file or partition mkswap /file/or/partition
- Add swap file/partition to /etc/fstab
- swapon -a to activate swap
** Option 2 - Create a new partition **
Follow the instructions above, except create a new partition for the new space rather then expand the existing partition. You will need to format the space rather then expand it. You will need to reformat recreated swap partition as well.
** Future Builds **
In future, consider using LVM - if you had an LVM install you could put swap and additional partitions on LVM, and simply add new LVM partitions - then use LVM to join partitions together into a single logical device.
add a comment |
These operations come with risk - so back up your disk first.
Both options are possible. The first step is to increase the size of the disk outside the VM. I don't use VMWare, so can't advise, but you seem to have this in hand.
****Option 1 - Increase the size of the partition ****
- Boot the system
- Unmount swap using swapoff -a
Use FDISK to delete the swap partition (/dev/sda5). Then
delete and recreate the primary partition to the desired size, making
careful note to start it at the same block, use type 83 and make
it bootable. If you don't use swap often, and think you may need this
process again, you can create a swap file rather then disk, otherwise
you can create a new swap partition at the end of the disk - make sure its
type 82.(May not be needed) comment out the swap mounting from /etc/fstab
- Reboot the system.
- When the system comes up, you can grow the filesystem to take advantage
of the additional space with a command like resize2fs /dev/sda1 (some
distros its resize4fs /dev/sda1 - either is OK) - Create a swap file if you need one, for example dd if=/dev/zero of=/swap.file bs=102400 count=10240 [for a 1 gig file]
- Format swap file or partition mkswap /file/or/partition
- Add swap file/partition to /etc/fstab
- swapon -a to activate swap
** Option 2 - Create a new partition **
Follow the instructions above, except create a new partition for the new space rather then expand the existing partition. You will need to format the space rather then expand it. You will need to reformat recreated swap partition as well.
** Future Builds **
In future, consider using LVM - if you had an LVM install you could put swap and additional partitions on LVM, and simply add new LVM partitions - then use LVM to join partitions together into a single logical device.
These operations come with risk - so back up your disk first.
Both options are possible. The first step is to increase the size of the disk outside the VM. I don't use VMWare, so can't advise, but you seem to have this in hand.
****Option 1 - Increase the size of the partition ****
- Boot the system
- Unmount swap using swapoff -a
Use FDISK to delete the swap partition (/dev/sda5). Then
delete and recreate the primary partition to the desired size, making
careful note to start it at the same block, use type 83 and make
it bootable. If you don't use swap often, and think you may need this
process again, you can create a swap file rather then disk, otherwise
you can create a new swap partition at the end of the disk - make sure its
type 82.(May not be needed) comment out the swap mounting from /etc/fstab
- Reboot the system.
- When the system comes up, you can grow the filesystem to take advantage
of the additional space with a command like resize2fs /dev/sda1 (some
distros its resize4fs /dev/sda1 - either is OK) - Create a swap file if you need one, for example dd if=/dev/zero of=/swap.file bs=102400 count=10240 [for a 1 gig file]
- Format swap file or partition mkswap /file/or/partition
- Add swap file/partition to /etc/fstab
- swapon -a to activate swap
** Option 2 - Create a new partition **
Follow the instructions above, except create a new partition for the new space rather then expand the existing partition. You will need to format the space rather then expand it. You will need to reformat recreated swap partition as well.
** Future Builds **
In future, consider using LVM - if you had an LVM install you could put swap and additional partitions on LVM, and simply add new LVM partitions - then use LVM to join partitions together into a single logical device.
answered Mar 23 '16 at 1:28
davidgodavidgo
42.9k75289
42.9k75289
add a comment |
add a comment |
My suggestion is to get a partition editor like gparted https://gparted.org/
- Put it on your datastore.
- Go into the properties of the VM and assign the ISO to the virtual CD/DVD
- Boot the VM, and press ESC and you should get a boot menu
- Select virtual CD/DVD
- Boot
- When loaded launch gparted, and you can then visually see what is going on.
- Delete,add, resize, or etc the necessary partitions.
- Commit your changes
- Wait for that to complete
- Reboot
- Don't press any key and it should boot normally.
add a comment |
My suggestion is to get a partition editor like gparted https://gparted.org/
- Put it on your datastore.
- Go into the properties of the VM and assign the ISO to the virtual CD/DVD
- Boot the VM, and press ESC and you should get a boot menu
- Select virtual CD/DVD
- Boot
- When loaded launch gparted, and you can then visually see what is going on.
- Delete,add, resize, or etc the necessary partitions.
- Commit your changes
- Wait for that to complete
- Reboot
- Don't press any key and it should boot normally.
add a comment |
My suggestion is to get a partition editor like gparted https://gparted.org/
- Put it on your datastore.
- Go into the properties of the VM and assign the ISO to the virtual CD/DVD
- Boot the VM, and press ESC and you should get a boot menu
- Select virtual CD/DVD
- Boot
- When loaded launch gparted, and you can then visually see what is going on.
- Delete,add, resize, or etc the necessary partitions.
- Commit your changes
- Wait for that to complete
- Reboot
- Don't press any key and it should boot normally.
My suggestion is to get a partition editor like gparted https://gparted.org/
- Put it on your datastore.
- Go into the properties of the VM and assign the ISO to the virtual CD/DVD
- Boot the VM, and press ESC and you should get a boot menu
- Select virtual CD/DVD
- Boot
- When loaded launch gparted, and you can then visually see what is going on.
- Delete,add, resize, or etc the necessary partitions.
- Commit your changes
- Wait for that to complete
- Reboot
- Don't press any key and it should boot normally.
answered Aug 10 '18 at 17:34
cybernardcybernard
9,99931525
9,99931525
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1056217%2fincrease-size-in-dev-sda%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I added another HDD in vmware dev/sdb with 200 GB and was able to partition that using fdisk /dev/sdb but I can not see that shown. root@PentahoSy3:/# fdisk /dev/sdb Disk /dev/sdb: 200 GiB, 214748364800 bytes, 419430400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x28205cd1 Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 419430399 419428352 200G 83 Linux
– Krishnam
Mar 23 '16 at 1:00
Oh I see, you tried to make a new partition, but it would only create 1023K partition?
– Paul
Mar 23 '16 at 1:03
1
When extending a partition the extended space in not automatically added to the exist space, instead it becomes unused space after the partition. You need to get an ISO copy of gparted or partedmagic or etc. Boot, and use it to increase the size of the existing partition to include the unused space.
– cybernard
Mar 23 '16 at 1:13