LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Issue after restore image using dd (http://www.linuxquestions.org/questions/linux-desktop-74/issue-after-restore-image-using-dd-4175465567/)

manuel19 06-11-2013 10:20 AM

Issue after restore image using dd
 
I made a backup of my 10GB disk using dd "Linux":
dd if=/dev/sda of=/media/external/imagename.img

Now, I bought a NEW disk. This new disk have 250GB, I restored the image to my NEW disk:
dd if=/media/external/imagename.img of=/dev/sda

Perfect. The system boot without any issues.

The problem: I boot from the NEW disk and when i execute: "fdisk -l" it says it is 250GB, but when: "df -h" it says 10GB.
The linux system in the NEW disk, keep the disk size of the source disk (10GB).

The system work perfectly, but I want the system use the real size: 250GB.

I don't want to loose any data in the process.
Please, can you post a step-by-step guide?

schneidz 06-11-2013 10:32 AM

Quote:

Originally Posted by manuel19 (Post 4969605)
I made a backup of my 10GB disk using dd "Linux":
dd if=/dev/sda of=/media/external/imagename.img

Now, I bought a NEW disk. This new disk have 250GB, I restored the image to my NEW disk:
dd if=/media/external/imagename.img of=/dev/sda

Perfect. The system boot without any issues.

The problem: I boot from the NEW disk and when i execute: "fdisk -l" it says it is 250GB, but when: "df -h" it says 10GB.
The linux system in the NEW disk, keep the disk size of the source disk (10GB).

The system work perfectly, but I want the system use the real size: 250GB.

I don't want to loose any data in the process.
Please, can you post a step-by-step guide?

that is the intended purpose of using disk duplicator (it made a byte for byte image copy of the disk).

you can try booting a live-usb (e.g. gparted-live) and try resizing the partition that way.

it may very well be better to have a 10 gb system partition and create a 240 gb data partition ?

manuel19 06-11-2013 10:42 AM

When I run: fdisk -l it says: 250GB
When I run: df -h It says: 10GB


I want it says:
When I run: fdisk -l it says: 250GB
When I run: df -h It says: 250GB

Rearden888 06-11-2013 10:58 AM

When you backed up your disk with dd, you also backed up the partition table which had only one 10gb partition. You need to do what the other poster said and boot into a live CD distro, like SystemRescueCD, unmount your 250gb drive, and use a partition editor to expand the 10gb partition to fill the entire disk. Then you'll have access to all the space.

manuel19 06-11-2013 12:07 PM

But I did this:
- Boot from LiveCD
- Unmount the 250GB Disk
- parted /dev/sda
- delete the lvm partition
- create a new lvm partition using the 100% disk space

But when I boot, the df -h
keep saying 10GB

michaelk 06-11-2013 12:30 PM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Did you read the reply by jlinkels in your other thread?
parted does not have support for lVM

manuel19 06-11-2013 12:53 PM

I delete the partition#2 and create a new one to complete the full disk:
Check my outputs:


Quote:

[root@Linux ~]# parted /dev/sda
GNU Parted 1.8.6
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA ST320413A (scsi)
Disk /dev/sda: 20.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 24.7MB 24.6MB primary ext3
2 24.7MB 250.0GB 250.0GB primary lvm

(parted)







fdisk -l

Quote:

[root@Linux ~]# fdisk -l

Disk /dev/sda: 250.0 GB, 250020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000e90fb

Device Boot Start End Blocks Id System
/dev/sda1 1 3 24066 83 Linux
/dev/sda2 4 2434 249527007+ 8e Linux LVM

Disk /dev/dm-0: 3388 MB, 3388997632 bytes
255 heads, 63 sectors/track, 412 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 536 MB, 536870912 bytes
255 heads, 63 sectors/track, 65 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30307800

Disk /dev/dm-1 doesn't contain a valid partition table
[root@Linux ~]#


df -h

Quote:

[root@Linux ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
10.0G 5.0G 5.0G 50% /
/dev/sda1 23M 18M 4.4M 80% /boot
tmpfs 220M 0 220M 0% /dev/shm
[root@Linux ~]#

This keep showing 10GB

What else?? What is the next step?

unSpawn 06-12-2013 12:05 PM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.


All times are GMT -5. The time now is 11:36 PM.