Size of partition has changed

Issues related to applications and software problems
BaghdadIT
Posts: 18
Joined: 2020/05/13 19:29:45

Re: Size of partition has changed

Post by BaghdadIT » 2023/05/04 21:21:53

Trevor

It is a Centos5, it is a long story, I inherited them and they have an app on them called Aculab Prosody, it is a SIP processing app, that takes SIP and formats it. a couple years ago we were told by Aculab we needed to update it and change over, but the company was trying to save money and had some developers working on our own version so we did not. Needless to say it has not come to fruition and I have been working to keep these systems running and it will still be a while. I am using a CentOS 7 disk to boot into rescue mode. Aculab is so secure in in its proprietary measures you can't even reload the system on a new box and If you image it, the disks you put the new image on have to be in that server when put the image on them. I tried to squeeze some support out of them but no go. So anything I can do to keep them all up is beneficial to us

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Size of partition has changed

Post by TrevorH » 2023/05/04 22:40:54

Well if you have time and a USB disk then you could boot from optical media/rescue disk, plug the disk in and use dd to make an image backup of the entire disk to a file on the removable drive. If the machine is that old then you would probably be limited to USB 2.0 speeds, maybe 35MB/s on a good day with the wind behind you, 146GB = 149500MB / 35, maybe 80 minutes, probably more like 2 hours. Then you can fiddle with the partition table as you want and if it fails or destroys it all then at least you can dd it back from the USB disk.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

BaghdadIT
Posts: 18
Joined: 2020/05/13 19:29:45

Re: Size of partition has changed

Post by BaghdadIT » 2023/05/04 23:54:30

Yes I will do that first, And then figure out how to fix the partition. I have ot ask though is dd a command structure in the CentOS or a third part software?

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Size of partition has changed

Post by TrevorH » 2023/05/05 01:11:43

I booted the CentOS 7 install DVD in rescue mode and it has dd available at the command prompt you get to that way. Syntax would be something like

dd if=/dev/sda of=/mnt/usbdisk/backup.img bs=1M status=progress

That copies from the first sector of /dev/sda all the way to the end and writes the output to the file /mnt/usbdisk/backup.img (you need to mount your usb disk somewhere so you can write to it - change /mnt/usndisk to wherever you mount it). The bs= says copy blocks of 1MB at a time as the default is 512 bytes and can be slow. The status=progress runs a running total on screen while it does the copy showing the speed it's running at. To write a file > 2GB your disk cannot be using FAT or any FAT variant, it has to be a filesystem that can handle large files since you will be writing 146GB to one single file like this.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

BaghdadIT
Posts: 18
Joined: 2020/05/13 19:29:45

Re: Size of partition has changed

Post by BaghdadIT » 2023/05/05 17:35:24

Trevor
Thanks for that and I had no idea that functionality was there. Just mounted the USB and it copied the entire partition over, even has a command to restore.
I am assuming that error is the one I am getting when I boot up, I just need to get ta a point where I can rebuild the Journal.
I just wanted to add, I really appreciate all your assistance so far. It has been a tremendous help
Attachments
DD of 027 CentOS .png
DD of 027 CentOS .png (27.77 KiB) Viewed 39431 times

BaghdadIT
Posts: 18
Joined: 2020/05/13 19:29:45

Re: Size of partition has changed

Post by BaghdadIT » 2023/05/05 17:51:34

I wanted to ask if you had any recommendations on how the commands might look in order to do this:

"So you magically have 1330757 free sectors and your partition has shrunk by 1326365. I think someone with root access has tried to shrink it the wrong way. You will need to - carefully - delete the current sda5 then redefine it starting on exactly the same sector number as now but extending an extra 1326365. You can add more than that if there are more available to be safe. Then tag the partition as 8e LVM. "

I am reading some data ion how to do this, But having input who has a handle on what the issue actually is would be invaluable!

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Size of partition has changed

Post by TrevorH » 2023/05/05 18:02:21

That dd failed. It only read (and wrote) 2284 1MB blocks and then got an error. So your current copy of the 146GB disk is 2.4GB in size which is not much of a backup.

I'd try that again and see if it does any better but that does not look hopeful. You might want to google for something called systemrescuecd and see if it contains something called dd_rescue which is like dd but has better retry capabilities and tries much harder to read failing disks - which I am afraid is what you have.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

BaghdadIT
Posts: 18
Joined: 2020/05/13 19:29:45

Re: Size of partition has changed

Post by BaghdadIT » 2023/05/05 19:45:44

Yes, I see what you mean, It did fail. I will run it again and yes, I am afraid the same the disk is unreadable in some section, I will go out and find that systemrescuecd and see if I have any better luck

BaghdadIT
Posts: 18
Joined: 2020/05/13 19:29:45

Re: Size of partition has changed

Post by BaghdadIT » 2023/05/09 16:59:38

Hello again Trevor
Well I ran the systemrescue software and tried it and go the same error.

I am not familiar withtthe system rescue software, does it have a util that will check my disk and/or repair ir?
Attachments
systemrescue backup.png
systemrescue backup.png (44.5 KiB) Viewed 39371 times

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: Size of partition has changed

Post by tunk » 2023/05/09 17:55:26

I think the command is called ddrescue, not dd.

Post Reply