new hdd booting using old hdd mbr and partition tables
new hdd booting using old hdd mbr and partition tables
sir,
i have one centos 7 server (not raid) and it is running fine . I have copied its mbr and partition tables to a new hdd. now i want to boot new Hard disk(size-320GB) with all things as old Hard disk(size -1TB). How it can be done and what i will do for that ..please any help
i have one centos 7 server (not raid) and it is running fine . I have copied its mbr and partition tables to a new hdd. now i want to boot new Hard disk(size-320GB) with all things as old Hard disk(size -1TB). How it can be done and what i will do for that ..please any help
Re: new hdd booting using old hdd mbr and partition tables
320GB -> 1TB YES
1TB -> 320GB NO
you can´t copy 1TB structure to a 320GB disk
you can dd a 320GB to a 1TB then expand LVM
1TB -> 320GB NO
you can´t copy 1TB structure to a 320GB disk
you can dd a 320GB to a 1TB then expand LVM
Re: new hdd booting using old hdd mbr and partition tables
Show us the output from fdisk -lu /dev/xda from the server with the to-be-copied disk and also the same for the target disk. You'll need to change /dev/xda in that command to the device name for the correct disks.
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Re: new hdd booting using old hdd mbr and partition tables
sir
thank you for quick reply ... i have already copied mbr and partition tables (512) to target disk
below the to-be-copied disk------
[root@BACKUP-SRV admin]# fdisk -lu /dev/sda
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x0002d51d
Device Boot Start End Blocks Id System
/dev/sda1 2048 6143 2048 83 Linux
/dev/sda2 * 6144 4102143 2048000 83 Linux
/dev/sda3 4102144 1953523711 974710784 8e Linux LVM
and the target disk
[root@BACKUP-SRV admin]# fdisk -lu /dev/sdb
Disk /dev/sdb: 320.1 GB, 320072933376 bytes, 625142448 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
Disk label type: dos
Disk identifier: 0x0002d51d
Device Boot Start End Blocks Id System
/dev/sdb1 2048 6143 2048 83 Linux
/dev/sdb2 * 6144 4102143 2048000 83 Linux
/dev/sdb3 4102144 1953523711 974710784 8e Linux LVM
Re: new hdd booting using old hdd mbr and partition tables
So, the other poster is correct. You cannot coerce 1TB of data into 320GB of space so it's not possible to directly copy from A to B. Since the 3rd partition on A is an LVM PV, maybe you can shrink the used space inside that so that it uses less than ~300GB and then you can pvresize that to occupy less space and then reduce the size of the partition so that it will all fit on the new disk. Or just get a similarly sized 1TB disk and copy to that! What you want to do may be possible but only with a lot of effort and danger..
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Re: new hdd booting using old hdd mbr and partition tables
sir,TrevorH wrote: ↑2023/05/13 10:38:38So, the other poster is correct. You cannot coerce 1TB of data into 320GB of space so it's not possible to directly copy from A to B. Since the 3rd partition on A is an LVM PV, maybe you can shrink the used space inside that so that it uses less than ~300GB and then you can pvresize that to occupy less space and then reduce the size of the partition so that it will all fit on the new disk. Or just get a similarly sized 1TB disk and copy to that! What you want to do may be possible but only with a lot of effort and danger..
sorry for late.
operating system of disk A is not recoverable(say) and i need to access database of it . Hence, if I copy all from disk-A to disk-B so far i know , Disk-B also not be accessable through operating system. At this point what I will do. Is there any solution? ..please
Re: new hdd booting using old hdd mbr and partition tables
try to install that disk as secundary and dump your data base to another place
Re: new hdd booting using old hdd mbr and partition tables
Or if you want to clone a larger disk to a smaller one, make sure you do not use any of the space on the larger one that won't fit on the smaller one!
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Re: new hdd booting using old hdd mbr and partition tables
How to dump database to another place.? I have already installed it as secondary had disk and can access it as secondary. I have only idea to take backup of database after accessing operating system of that particular Hard disk. Hence, i cannot access operating system of that Disk. So please help to recover database so that i can take backup of it.
Re: new hdd booting using old hdd mbr and partition tables
A disk has partition/volume(s). Those have filesystem. Filesystem has files.
When you say that you "can access the secondary disk", we do assume that you mean
that you have mounted the filesystem that is on the disk and therefore can access the files.
A database engine is an application that reads/writes files of specific (database format).
The files have the data. If you can install the same (or compatible) database application
to you functional operating system and configure the engine to use the existing files, then
you should have access to the data.
Assuming the 1TB disk is unreliable or to be decommissioned, the first step would be to copy
the files of the database into the 320GB disk. Then configure the database engine.
You did not tell which database engine was used in the old system, so we can't even start
to guess where within the filesystem the database files are.
When you say that you "can access the secondary disk", we do assume that you mean
that you have mounted the filesystem that is on the disk and therefore can access the files.
A database engine is an application that reads/writes files of specific (database format).
The files have the data. If you can install the same (or compatible) database application
to you functional operating system and configure the engine to use the existing files, then
you should have access to the data.
Assuming the 1TB disk is unreliable or to be decommissioned, the first step would be to copy
the files of the database into the 320GB disk. Then configure the database engine.
You did not tell which database engine was used in the old system, so we can't even start
to guess where within the filesystem the database files are.