Format hard drive ubuntu server

Asked by raossabe

I have a ubuntu server that runs samba on it and i have recently added a second hard drive to it. My question is how do i format the hard drive and how do i make it automatically mount so i can use it for samba?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
raossabe
Solved:
Last query:
Last reply:
Revision history for this message
raossabe (raossabe) said :
#1

These are my two hard drives, ubuntu is installed on /dev/sdb. /dev/sda is the hard drive that i have added and want to use.

  *-disk
       description: ATA Disk
       product: HDS722516VLAT80
       physical id: 0.0.0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: V34O
       serial: VN643ECDDTGRYD
       size: 153GiB (164GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=f470f470
  *-disk
       description: ATA Disk
       product: WDC WD3200KS-00P
       vendor: Western Digital
       physical id: 0.0.0
       bus info: scsi@4:0.0.0
       logical name: /dev/sdb
       version: 21.0
       serial: WD-WCAPD2429331
       size: 298GiB (320GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=000d5bbc

Revision history for this message
mycae (mycae) said :
#2

From the command line, fdisk (or my personal favourite, cfdisk) and mkfs will do the trick
https://help.ubuntu.com/community/InstallingANewHardDrive#Command_Line_Partitioning

Further down the page on that link describes the procedure for making it auto-mount

Revision history for this message
houstonbofh (leesharp) said :
#3

As an alternative, gparted is a gonme app for manipulating hard drives. https://help.ubuntu.com/community/InstallingANewHardDrive#Partitioning_Using_GParted

Revision history for this message
raossabe (raossabe) said :
#4

Thanks for the feedback, i managed to solve my little problem.