# Adding a new partition on an existing slice of a HDD



## sergn (Feb 27, 2013)

FreeBSD 8.3. I have HDD(1,8TB), that contains one slice (1,8 TB). The slice has 700 GB free space. It has several partitions /dev/ar0s1a - /dev/ar0s1e. I tried to create a new partition on an existing slice of the HDD - /dev/ar0s1f

*mkdir* the new mount point /reposit
On sysinstall menu select Configure->Label->select the slice and press C->specify the created mountpoint and partition size->press W
*I*n the second step when *I* press w it gives an error:


```
Unable to add /dev/ar0s1b as swap device busy
```

Then I choose OK and then I get:


```
Error mounting /dev/ar0s1f on /reposit: No such file or directory
```

After exit from sysinstall, the /dev/ar0s1f was not created. After rebooting the /dev/ar0s1f was not created.

Therefore *I* can not use `newfs /dev/ar0s1f` to format the new partition of the slice of the HDD.

Any suggestions?


----------



## wblock@ (Feb 27, 2013)

Do not use sysinstall(8) any more.  For anything.  It's obsolete and the disk partitioning was never very safe for existing partitions.

Please show the output of gpart show.


----------



## sergn (Feb 28, 2013)

Today gpart show command result

```
=>         0  3907007937  ar0s1  BSD  (1.8T)
           0     3907007      1  freebsd-ufs  (1.9G)
     3907007    24903100      2  freebsd-swap  (11G)
    28810107    25878197      4  freebsd-ufs  (12G)
    54688304  2352319633      5  freebsd-ufs  (1.1T)
  2407007937  1000000000      6  freebsd-ufs  (476G)
  3407007937   500000000         - free -  (238G)
```

476G - the new partition
And newfs /dev/ar0s1f formatted it.
It surprise for me.

The yesterday newfs /dev/ar0s1f does not work, as since /dev/ar0s1f was absent

But how to create a disk partition without bsdlabel -e and sysinstall?


----------



## wblock@ (Feb 28, 2013)

gpart(8) is the new way to create partitioning schemes and partitions.  See the man page at that link, and examples are shown in Disk Setup On FreeBSD.


----------



## sergn (Feb 28, 2013)

Thank you for answer


----------

