Add partition to existing disk
Jerry McAllister
jerrymc at clunix.cl.msu.edu
Wed Mar 29 15:51:42 UTC 2006
Hi,
> I have an existing system which I cannot reinstall and sysinstall seems like
> too much of a wizard to use on a well running existing system. When I built
> the system 2 years ago I decided to leave about 25GB of unpartitioned space
> for future unknown projects, I now have a use for the space but I can't for
> the life of me figure out exactly what steps are needed to use the space.
>
> The system is configured as follows:
> Dell PE 2650 with 3x36GB drives in a Hardware RAID 5 on a PERC controller
> 4.11-STABLE
>
> And the currect disklabel is:
> #disklabel aacd0s1
> # /dev/aacd0s1c:
> type: ESDI
> disk: aacd0s1
> label:
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 8849
> sectors/unit: 142175187
> rpm: 3600
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0 # milliseconds
> track-to-track seek: 0 # milliseconds
> drivedata: 0
>
> 8 partitions:
> # size offset fstype [fsize bsize bps/cpg]
> a: 4096000 0 4.2BSD 2048 16384 90 # (Cyl. 0 - 254*)
> b: 3072000 4096000 swap # (Cyl. 254*- 446*)
> c: 142175187 0 unused 0 0 # (Cyl. 0 -
> 8849*)
> e: 12288000 7168000 4.2BSD 2048 16384 89 # (Cyl. 446*-
> 1211*)
> f: 4096000 19456000 4.2BSD 2048 16384 90 # (Cyl. 1211*-
> 1466*)
> g: 61440000 23552000 4.2BSD 2048 16384 89 # (Cyl. 1466*-
> 5290*)
>
> As you can see I have space available from 84992000 through 142175187. I
> have done similar things in Solaris and other OS's but I'm just not sure
> exactly what the FreeBSD steps are to utilize this space.
>
> Any pointers are appreciated.
Go to single user mode.
do:
fsck -p (shouldn't be needed, but just in case)
mount -u /
mount -a
swapon -a
run disklabel -e on the drive
disklabel -e [-r] aacd0s1
Add the following line in the edit file it gives you.
h: * * 4.2BSD 2048 16384 89
(I am not sure about that 89 for bps/cpg. Just use what it wants to)
Write and quit the edit session.
Then to an newfs on the /dev/aacds1h partition
newfs -b 16384 -f 2048 -i 2048 /dev/raacd0s1h
(You could just take the defaults for the newfs, but I like to specify
block and frag the same as in the disklabel and the -i causes it to
make more inodes which I seem to need on larger file systems)
Add a mount point for it however you want, for example
mkdir /work
add a line to your /etc/fstab
/dev/ad0s3h /work ufs rw 2 2
Substitute your own mount point if you created one with a different name.
Type mount -a and voila, you have it.
You might have to run an fsck on it.
>
>
> Thanks,
> Scott
>
>
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>
More information about the freebsd-questions
mailing list