LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   FreeBSD fdisk problem (https://www.linuxquestions.org/questions/%2Absd-17/freebsd-fdisk-problem-357343/)

morko 08-26-2005 05:17 PM

FreeBSD fdisk problem
 
Hello.

Here is what I did. I transfered FreeBSD 5.4 from 8 G to 40 G disk. Command was:

dd if=/dev/hd0 of=/dev/hd1 bs=16384

New disk can boot normal. Now I want to use free space on 40 G disk for growing /usr, because it is almost full. This is my 40 G disk !

FreeBSD# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 248M 198M 30M 87% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ad0s1e 248M 39M 189M 17% /tmp
/dev/ad0s1f 6.5G 5.4G 530M 91% /usr
/dev/ad0s1d 248M 104M 124M 46% /var
linprocfs 4.0K 4.0K 0B 100% /usr/compat/linux/proc

I found instructions on net how to grow /usr using growfs, but first I must create new partition. But fdisk wont let me ........

FreeBSD# fdisk -s
/dev/ad0: 77545 cyl 16 hd 63 sec
Part Start Size Type Flags
1: 63 16514001 0xa5 0x80

FreeBSD# fdisk -u
fdisk: cannot open disk /dev/ad0: No such file or directory

What is this? ad0 is there, of course. Any ideas, how can I grow my existing /usr?

N|k0N 08-26-2005 05:29 PM

have you tried using sysinstall to make the space larger? If i am correct, you cant use fdisk to change anything on a hd when it is in use. If i am wrong, im sure someone will correct me.

morko 08-26-2005 05:51 PM

Yes I tried sysinstall, but with no luck.

Says something like "ERROR: Unable to write data to disk ad0!" "Disk partition write returned an error status!"

Is it possible that I have problems because of wrong gemetry Warning:

WARNING: A geometry of 77545/16/63 for ad0 is incorrect. Using │
│a more likely geometry. If this geometry is incorrect or you │
│are unsure as to whether or not it's correct, please consult │
│the Hardware Guide in the Documentation submenu or use the │
│(G)eometry command to change it now.

I am lost, but the machine is up and running! :-)

N|k0N 08-26-2005 06:12 PM

It can only be the wrong geometery if you set it that way, you can always take a look by typing fdisk, then p and see if it is set up similarly, you could also use the "a" command to set up up your disk partitions automatically.


All times are GMT -5. The time now is 08:40 AM.