Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-26-2005, 06:02 AM
|
#1
|
LQ Newbie
Registered: Jan 2003
Location: Nevada
Distribution: Usually Arch
Posts: 22
Rep:
|
Restored backup, now new root partition reporting wrong size. [solved]
Hey all,
I have the following linux partitions:
hda5: XFS 78.83 GB
hda6: XFS 5.86 GB
hda7: swap 1 GB
Up until tonight, hda5 was running SuSE 9.2 and hda6 had Gentoo. I found that I was spending most of my time in Gentoo and didn't really care about SuSE all that much. I filled up hda6 and ran out of space, so I wanted to back it up and put it on hda5.
The back up and restore (using kdar/dar) went amazingly well, since I'm a total newb when it comes to backups. hda5 is booting up and everything. I thought at least the relocation of boot files and stuff in my /etc would have caused some problems. (Actually, I hda forgotten to update my fstab, but that wasn't hard to fix).
The only problem I'm having is that when I run df on my hda5, it still thinks it's 5.83 GB, with only 241 MB left. I know for a fact this is wrong. fdisk, cfdisk and qtparted are all reporting the correct size for the partition. Somehow, a file got included in my backup that is telling the kernel that my partition is still the smaller size.
I even thought maybe if I started fdisk and quickly saved without changing anything, that would update the filesystem with the partition table.
Is there a command that I can give to update the filesystem with the right partition size to pay attention to? I know for a fact I'm on hda5 and not the hda6 I was using.
I'm wondering if I just download 300+ MBs of stuff, I wonder if the filesystem will cut me off because it thinks it's outta room.
Anyway, thanks for any help anyone can give.
Wackman
Last edited by wackman; 05-28-2005 at 03:25 AM.
|
|
|
05-26-2005, 07:40 AM
|
#2
|
Senior Member
Registered: Oct 2003
Posts: 3,057
Rep:
|
You can resize the file system to fit the partition while booted in a livecd.
# Run the e2fsck with the force option.
e2fsck -f /dev/hda5
# Then run the resize operation.
resize2fs -f /dev/hda5
|
|
|
05-27-2005, 05:57 AM
|
#3
|
LQ Newbie
Registered: Jan 2003
Location: Nevada
Distribution: Usually Arch
Posts: 22
Original Poster
Rep:
|
Still no luck. No matter what filesystem I use, it refuses to take the whole size of the partition. I have well over 60 GB free, but it tells me with 5 GB installed, I only have about 100 MB free.
The partition was XFS, so I kinda adapted your suggestion for that fs. I tried using xfs_growfs on it, but it did nothing. Didn't touch it. I even tried using the -d option which tells it to fill the entire size of the partition, but it laughed at me.
So I thought it was just XFS being picky. I decided to try using ext2. If I got that to work, it wouldn't be hard to add a journal to it making it ext3 (not a huge fan of that fs, but it's better than nothing). resize2fs also refused to do anything to it.
Finally, I started over. I reformated /dev/hda5 as JFS. No change. It still thinks it's only got about 111MB left. This time, I told kdar to ignore extended attributes, thinking that there was some archive bit or attribute locking the size of the filesystem. That didn't help
This is frustrating me. I'm anxious to get everything working right. Please help.
|
|
|
05-27-2005, 08:49 AM
|
#4
|
Senior Member
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126
Rep:
|
I guess you happened to backup and restore not only the file system, but patitition table too, which may also contain partition size data.
If so, then I think you could safely resize the partition with e.g. qtparted.
|
|
|
05-27-2005, 07:59 PM
|
#5
|
LQ Newbie
Registered: Jan 2003
Location: Nevada
Distribution: Usually Arch
Posts: 22
Original Poster
Rep:
|
Well, this morning, I used systemrescuecd (forget the url right now) to try to use qtparted. It couldn't/wouldn't budge either hda5 (the new larger partition) or hda6 (the old small partition). All I could do was delete. So I deleted all my extended partitions and created hda2 (XFS, about 80 GB) and hda3 (swap, about 1 GB). When I left for work, I was restoring my dar backup.
I'm pretty much expecting to be in the same boat when I get home, with hda2 only having 111MB left. If that's the case, I may try to check out dar's website and see if there's a user forum there.
|
|
|
05-28-2005, 03:23 AM
|
#6
|
Senior Member
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126
Rep:
|
Well, I had a glance at the dar website, and realized that dar backups files and directories, and, as such, it should not backup (and restore) any partition size data.
So, I guess the only reason for your problem may be that though you restored the dar backup to /dev/hda5, your system was still booting up from /dev/hda6.
If so, then stiil /dev/hda6 was mounted to /, so the free space reported for / was the one on /dev/hda6. However, the device names should have revealed this fact for you - so I doubt whether this was the case.
If this is the problem, however, then your problem does not concern dar, but you should configure grub to boot up from /dev/hda5.
|
|
|
05-28-2005, 03:24 AM
|
#7
|
LQ Newbie
Registered: Jan 2003
Location: Nevada
Distribution: Usually Arch
Posts: 22
Original Poster
Rep:
|
It's fixed.
I don't know why, but as long as I had the original filesystem still on the computer, the backup to the larger partition still mirrored the state of the other one. as long as the small partition was still there, the large one reported that it only had 111MB left. Also, if I would update a file on one (EX: /etc/fstab) the same file would get updated on the other one. (I would be booted into one partition and have the other one mounted; updating, say, /mnt/hda6/etc/fstab would update /etc/fstab too).
Anyways, deleting and recreating partitions and restoring to that fixed it.
|
|
|
All times are GMT -5. The time now is 09:11 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|