help with partition problems, disklabel and growfs
terrellm at esper.com
Tue May 13 14:39:36 PDT 2003
I need some help with my FreeBSD 5.0 system and disklabel.
I had to replace my hard disk because it was going bad. I got
everything over but there are some small problems I would like
to correct. I believe I will need to use disklabel and growfs
to fix things, but need someone to make sure I am not going
to really hose things.
On the original disk, the BSD partition was 4. On my new one it
got moved to 3, and it is a little larger. I used ghost to
copy all my partitions. Everything boots and seems to run
However, at boot time I get messages about MBREXT and
ad0s4a and ad0s4b. That was where the system originally
was. From the disklabel output below, you can see the
"disk" field for ad0s3 (my new partition) has ad0s4 in it.
Ghost copied the old disk label over. Even though it appears
to work correctly, are these error messages I should be concerned
about? It seems rewriting the label with the correct information
should fix it.
That brings me to the fact that the partition is slightly larger.
I should be able to use growfs to use that extra space.
From fdisk the partition is 17055360 blocks, but the disklabel
has it at 16642395 blocks. I think there will be a problem though.
The 'a' partition in that slice is where I mount '/'. The 'b'
partition is 'swap'. From what I have found, I cannot grow
'a' because 'b' is in the way. Will I need to delete the 'b'
partition, grow 'a', then recreate 'b'. Since it is just swap,
when running in single user will that be a safe operation.
Does the swap partition have any information that is saved across
If I am on the right track, could I get a little guidance on
using these tools properly?
p.s. Does anyone know is any of the regular tools like
PartitionMagic, Ranish or that ilk plan on supporting
the partions in BSD slices like they do other file systems?
A nice tool for moving them around would be nice.
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s3a 7657390 3284390 3760410 47% /
devfs 1 1 0 100% /dev
/dev/ad0s5 8163106 1902274 6260832 23% /mnt/work
/dev/ad0s3a 15314780 6568804 7520796 47% /
devfs 2 2 0 100% /dev
/dev/ad0s5 16326212 3804552 12521660 23% /mnt/work
--fdisk -v -s
/dev/ad0: 93015 cyl 16 hd 63 sec
Part Start Size Type Flags
1: 63 45297 0x78 0x00
2: 45360 16390080 0x0c 0x00
3: 16435440 17055360 0xa5 0x80
4: 33490800 40975200 0x0f 0x00
--disklabel -r ad0s3
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
# size offset fstype [fsize bsize bps/cpg]
a: 15564800 16435440 4.2BSD 2048 16384 28512 # (Cyl. 1023*-
b: 1077595 32000240 swap # (Cyl. 1991*-
c: 16642395 16435440 unused 0 0 # (Cyl. 1023*-
Warning, partition c doesn't start at 0!
Warning, partition c doesn't cover the whole unit!
Warning, An incorrect partition c may cause problems for standard system
More information about the freebsd-questions