[PLUG] parted advice, please
Richard Steffens
rsteff at attbi.com
Thu Sep 5 00:37:19 UTC 2002
For some reason, when I set up the partitions for my new Debian install,
I made a poor choice regarding the sizes of /usr and /home. I've
installed parted (I guessed that apt-get -install parted would do it,
and it did!) and now I'm studying the instructions for how to change
things. I have some questions about what I'm planning to do:
1. Unless I decide to change the size of the Windows partition, do I
need to do anything about the warning I get when I start parted?
Using /dev/hda
Warning: The operating system thinks the geometry on /dev/hda is
1583/255/63. Therefore, cylinder 1024 ends at 8032.499M. You have
Windows FAT partition(s) that are not using LBA. If your BIOS
supports LBA, then you should switch to LBA by setting the LBA flag
on all FAT partitions. Otherwise, make sure the operating system and
the BIOS have the same geometry before resizing any FAT partitions.
2. Is what I describe below correct, or did I miss something important?
Also, is 1G reasonable for /home, or should I be planning something more
involved?
When I created the partitions, I made /usr 1G and /home 4G. I should
have done that the other way around, but since they are adjacent, it
should be relatively painless to fix. From what I'm reading at:
http://www.gnu.org/manual/parted-1.6.1/html_node/parted_32.html
I should be able to shrink /home, create a new partition at the end of
/home's old space, copy /home to that partition, delete the old /home,
and then add the leftover space from the to /usr. Have I missed anything
important that would prevent me from doing that, or cause me serious
grief?
Here's the details:
Parted's print command reports:
Disk geometry for /dev/hda: 0.000-12419.056 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 4141.757 primary FAT boot
2 4141.758 4235.888 primary ext2
3 4235.889 12417.429 extended
5 4235.919 4361.396 logical linux-swap
6 4361.427 5334.082 logical ext2
7 5334.113 9240.512 logical ext2
8 9240.543 9287.578 logical ext2
9 9287.609 12417.429 logical ext2
df -h reports:
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 91M 28M 58M 33% /
/dev/hda6 957M 772M 137M 85% /usr
/dev/hda7 3.8G 271M 3.2G 8% /home
/dev/hda8 45M 22k 43M 1% /tmp
/dev/hda9 3.0G 89M 2.7G 4% /var
The sequence of instructions would be as follows:
Shrink /home to about 1G.
(parted) resize 7 5334.113 6358.113
Make a new, 1G partition at the end of the free space. It will be #10.
(parted) mkpartfs logical ext2 8216.512 9240.512
Copy the old /home to its new location.
(parted) cp 7 10
Delete the old /home.
(parted) rm 7
Resize /usr to use up the newly available space.
(parted) resize 6 4361.427 8216.511
Quit parted and edit /etc/fstab.
Since deleting the old #7 caused 8, 9, and 10 to be renumbered 7, 8, and
9, then the new /home is 9, /tmp is 7, and /var is 8. So, I'd need to
change some lines in fstab from:
/dev/hda7 /home ext2 defaults 0 2
/dev/hda8 /tmp ext2 defaults 0 2
/dev/hda9 /var ext2 defaults 0 2
to:
/dev/hda9 /home ext2 defaults 0 2
/dev/hda7 /tmp ext2 defaults 0 2
/dev/hda8 /var ext2 defaults 0 2
Then, after I reboot, I should have more room in /usr, less room in
/home, and everybody else stayed the same.
--
Regards,
Dick Steffens
"Quando Omni Flunkus Moritati"
http://rsteff.home.attbi.com/
More information about the PLUG
mailing list