linux – How to add unallocated free space using shell in Centos?

I have some free space unallocated and this problem affects more instances.

Number  Start   End     Size    Type     File system  Flags
        32.3kB  1049kB  1016kB           Free Space
 1      1049kB  1075MB  1074MB  primary  xfs          boot
 2      1075MB  34.4GB  33.3GB  primary               lvm
        34.4GB  53.7GB  19.3GB           Free Space

How can I fix this issue using shell scripting? It is impossible to do the operations using cfdisk on every instance.

terminal – Recover unallocated disk space

I would like to recover some unallocated (?) disk space on an external hard drive /dev/disk2 is 1TB but I only see a 250GB partition. Here is a terminal screenshot and a Disk Utility one.

Is there any way I could add the remaining 750 GB to the existing partition or create a new one?

Thank you

disk utility

partitioning – Is it safe to move unallocated space over boot partition in dual boot

I am trying to move unused space from my windows installation (/dev/nvme0n1p3) to my manjaro root partition (/dev/nvme0n1p8) using GParted. GParted image of my system’s partitions. To move the unallocated space there it must move past the manjaro boot partition. When trying to do so I get this warning informing me that moving the boot partition might render the system unable to boot. In my research I found information regarding moving past the swap-partition, but not much regarding the boot partition. My question is if this is a somewhat safe or stupid thing to do. Is it perhaps better to instead do a full manjaro re-installation some time in the future and then include the unallocated space instead?

disk utility – How to remove Bootcamp partition + unallocated space partition?

i’m having a problem with partitions on my High Sierra Mac OS.
I don’t have a regular bootcamp partition so trying to remove it with bootcamp app won’t work.
I wanted to add more space to my windows partition but then i changed idea and wanted to delete it and start a new install.
So Now I have a 200GB unallocated space took from my Macintosh partition and a Bootcamp partition.

I tried deleting the 200GB partition with disk utility but it gives me a MediaKit error where the disk map is too small or something similar.

How can i delete everything and have a single Macintosh partition from terminal? is it possible? thank you!

This is my diskutil output:

iMac-di-Giacomo:~ giacomo$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            588.0 GB   disk0s2
   3:                  Apple_HFS unallocated             200.3 GB   disk0s3
   4:         Microsoft Reserved                         16.8 MB    disk0s4
   5:       Microsoft Basic Data BOOTCAMP                211.0 GB   disk0s5
   6:           Windows Recovery                         471.9 MB   disk0s6
   7:                 Linux Swap                         133.2 MB   disk0s7

Static archive database: SQL Server cannot shrink it and leaves ~ 400 G of unallocated space

We are having a problem with our databases. Here's what's going on:

All databases have approximately 50% unallocated space and DBCC SHRINKDATABASE/SHRINKFILE will not reclaim space. These are archive databases that have been recently cleaned up and are supposed to be read only, so performance is not an issue (yes, I am fully aware of the fragmentation of collapsed and clustered indexes and I m & # 39; in file). The main objective here is to reduce all data files to save $$ on storage space. Again, I don't care about performance, these data files must be reduced at all costs! I'm talking about 800 GB, 1.5 TB and 2.1 TB databases. So nothing ordinary or small.


  • reduction database shows ~ 50% of space lost
  • a post-shrunk database with a mandatory page reorganization (NOTRUNCATE) and a mandatory free space of 1% continue to display with 50%
    unallocated space
  • so an 800 GB database appears in sp_spaceused as having ~ 410 GB of unallocated space even after shrinking
  • a reduced file recognized that the database only has 1% of free space
  • when we started using SELECT INTO to migrate tables to another database, we started to notice that the original tables occupied hundreds of thousands of pages, but after the migration, they didn't take more a few hundred pages
  • DBCC also shows that the original database (before SELECT INTO) uses a huge amount of extensions

My analysis of this is as follows:

  • shrinking does not free up unallocated space
  • SELECT INTO yes frees up a lot of space

What would I like to help with:

  • why the shrink doesn't work
  • why SELECT INTO works
  • why the original database has so much lost space (yes, automatic growth has been enabled for a long time before becoming an archive)

We're already looking at things like using fill factor, page and extent, but what we'd like to have is at least an explanation for so much wasted space and how to reclaim it. without SELECT-INTO all terabytes of data. Any help would be appreciated.

partitioning – How to add unallocated space to an encrypted partition (with Gparted help)

Sorry if it's a duplicate, but I think I have not seen this exact situation on askubuntu yet. I have an encrypted partition on a VPS running Ubuntu 18.04 that I would like to enlarge. I also have an unallocated space. However, using Gparted, I can not resize the partition. What can I do to solve this problem?


enter the description of the image here

partitioning – how to add unallocated space in the root partition of ubuntu

I know this question has been answered several times
but i have a different case enter the description of the image here

as in my case, I have an unallocated space of 97.66Gib and I want to add it to ext4 which is my root partition the unallocated space is above ext4 I can not resize it
as according to these tutorials

please guide me how can i do it

SQL 2017 Enterprise, DB has suspect_pages, GAM and SGAM unallocated – can I load it?

I realize that I can have a bit of "horror!" reactions, but support with me …

There is only one suspect_pages line, and I've plugged the info into DBCC PAGE (output below). When I saw that GAM and SGAM display "NOT ALLOCATED", my theory became: "I do not need to worry about it …"

We had the database up to 5 TB with a lot of data to check. At least 1 TB was Truncated at the exact time when the suspect_pages line was created, all from a table.

After suspect_pages lines appear during a similar exercise on the same DB several months ago, where DBCC PAGE showed that none of the pages mentioned existed in the database, we continued by deleting the lines suspect_pages.

The IndexID is -1, the ObjectID is 0. For me, it means "there is nothing to see here …"

In the opinion of the experts here present, do you seem to delete the suspect_pages line safely? is there DBCC REPAIR CHECKDB% option I should use?

With my thanks and in the hope of at least minimal "beautiful abuse" …


DBCC PAGE (& # 39; DB_US & # 39 ;, 1, 731783305, 3) WITH TABLERESULTS;

Produces an error:

(43 lines affected)
Msg 2514, Level 16, State 8, Line 6
A DBCC PAGE error occurred: invalid page metadata - dump style 3 not possible.

DBCC PAGE OUTPUT – using the ZERO output level and not WITH...:

PAGE: (1: 456793585)


BUF @ 0x000002F2DA54D680

bpage = 0x00000246815A2000 bhash = 0x0000000000000000 bpageno = (1: 731783305)
bdbid = 6 breferences = 0 bcputicks = 0
bsampleCount = 0 bUse1 = 56821 bstat = 0x809
blog = 0x15ab215a bnext = 0x0000000000000000 bDirtyContext = 0x0000000000000000
bstat2 = 0x0

Page header:

Page 0x00000246815A2000

m_pageId = (1: 456793585) m_headerVersion = 1 m_type = 2
m_typeFlagBits = 0x0 m_level = 0 m_flagBits = 0x2200
m_objId (AllocUnitId.idObj) = 235350m_indexId (AllocUnitId.idInd) = 256
Metadata: AllocUnitId = 72057609461825536 Metadata: PartitionId = 0
Metadata: IndexId = -1 Metadata: ObjectId = 0 m_prevPage = (1: 456793584)
m_nextPage = (1: 456793586) pminlen = 29 m_slotCnt = 168
m_freeCnt = 32 m_freeData = 7824 m_reservedCnt = 0
m_lsn = (722027: 450682: 278) m_xactReserved = 0 m_xdesId = (0: 0)
m_ghostRecCnt = 0 m_tornBits = -1231952543 Database fragment ID = 1

Allocation status

GAM (1: 731572992) = NO SGAM (1: 731572993) = NO PFS (1: 731777976) = 0x0 0_PCT_FULL
DIFF (1: 731572998) = CHANGED ML (1: 731572999) = NOT MIN_LOGGED 

Unallocated space

I've read the answers to other unallocated space issues, but with limited knowledge, I need specific instructions for my setup. Here is a ling to get into the description of the image above the output of lsblk

virtualbox – How to use gparted to allocate unallocated space from a vbox dynamic drive

I use VirtualBox with an Ubuntu 16.04 virtual machine on OS X High Sierra. I've increased the size of my dynamic storage and restarted the virtual machine with the help of a live iso and ran gparted.

gparted output

The two partitions that offer resizing when you right-click are / dev / sda1 and / dev / sda5, but the available space is not equal to the unallocated space … they are as follows:


enter the description of the image here

How to use the unallocated 40G space? An answer (1054352) first indicates increasing the size of the extended partition, but mine (sda2) does not have this option.