LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-10-2013, 11:57 AM   #1
manuel19
Member
 
Registered: May 2010
Distribution: Fedora Core 8 (Werewolf)
Posts: 40

Rep: Reputation: 0
Easy way to Expand my /


Hi.
As you know, when you make a backup of a full disk using DD, it include the size disk of the source.

So, let's imagine to made a backup of a 10GB Disk.

If you restore that image to a 1TB Disk, this 1TB disk will be transformed to a 10GB disk.

So, How can I expand the disk to it real size?

I use lvm:

This is my out put

Code:
[root@CS ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       10G  5.0G   5.0G   50% /
/dev/sda1             190M  188M     0 100% /boot
tmpfs                 498M     0  498M   0% /dev/shm
[root@CS ~]#
Please, post me the easy way to do it.

Thanks
 
Old 06-10-2013, 11:59 AM   #2
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 654

Rep: Reputation: 53
How about doing everything you describe above and then using gparted to expand the size of the disk (partition)?
 
Old 06-10-2013, 12:11 PM   #3
manuel19
Member
 
Registered: May 2010
Distribution: Fedora Core 8 (Werewolf)
Posts: 40

Original Poster
Rep: Reputation: 0
The system doesn't have X.
I'm not physically in the client office, i'm working remotly.
 
Old 06-10-2013, 12:19 PM   #4
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 654

Rep: Reputation: 53
GParted has a non-graphical version, Parted.

I found this thread, which appears to be similar to your situation.

http://ubuntuforums.org/archive/index.php/t-796334.html
 
Old 06-10-2013, 12:36 PM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by manuel19 View Post
If you restore that image to a 1TB Disk, this 1TB disk will be transformed to a 10GB disk.
There are some situations in which that occurs, but it seems very unlikely in your case. Let us assume that is not the case, until/unless evidence shows otherwise.

Quote:
How can I expand the disk to it real size?
Assuming the disk size is OK, your issue is with the partition size. So you might want to expand the partition to fill the disk.

But that requires booting from some other media, which usually requires being there, which you say you are not. So skip the idea of expanding the partition.

Quote:
I use lvm:
So you don't need to expand the partition. Instead you can create another partition, and use lvm to use that space for more room in /

Quote:
Originally Posted by manuel19 View Post
The system doesn't have X.
I'm not physically in the client office, i'm working remotly.
So you need to find out what non GUI partitioning tool (parted of fdisk, etc.) is available (typically in /sbin). Or if there is a non GUI partitioning tool you prefer to use and it isn't there, I assume you know how to use the non GUI package management tool.

Get a partition list from that tool. Post it here, if you aren't experienced with such things. With fdisk that command (as root) is
/sbin/fdisk -l

Then that same non GUI partitioning tool has commands to create the desired new partition.
(See man pages for that tool).
Then lvm can be told to use that space (see man pages. I have no clue about lvm).

Last edited by johnsfine; 06-10-2013 at 12:42 PM.
 
Old 06-10-2013, 07:13 PM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
SIGH

dd is the wrong tool for these kind of operations. It is a tool to make images. If you image a 10 GB disk, you get a 10 GB disk. Don't complain about it.

The steps to transfer the OS to a larger disk:
- Partition the new disk as you wish
- Mount the new disk in the directory tree of the old disk
- use rsync or tar to copy all the files from the old partitions to the new partitions with the proper parameters to preserve ownership and permissions
- Get the UUID of the new partitions, adjust /etc/fstab and grub.conf or menu.lst accordingly
- chroot into the root of the new disk and install grub

This is all done using standard tools. More sophisticated tools exist.

There are a gazillion manuals on how to do this in detail on Google. Therefor I only gave a coarse outline.

jlinkels
 
Old 06-12-2013, 12:07 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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 should be closed because it is a duplicate.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to expand who command? SentralOrigin Linux - Newbie 7 08-27-2010 12:38 PM
Easy-use, easy-install, fast, minimal KDE distro? lukeprog Linux - Distributions 8 09-08-2007 04:21 PM
LXer: Systems Solutions Teams with Open-Xchange to Deliver Easy-to-Deploy, Easy-to-Use Collaboration Server LXer Syndicated Linux News 0 02-22-2006 10:46 PM
Easy urpmi ,no easy send mail. akihandyman Linux - General 2 12-27-2004 02:15 PM
Linux4RegularGuys - EASY FTP setup using vsftpd - READ THIS FOR EASY HELP DropHit Linux - Networking 4 11-25-2004 02:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration