How to add a new drive?

Asked by R2R

Hello there,

I am a bit embarassed.

I have installed a new drive. Unfortunately, I can only use it when being root. Already I have placed quite some information on it.
I have no idea how change the previlidges.

The idea is to install all my documents, images and music on it, and keeping the ssd for the OS.

Dolphin sees the disk. It has been formatted.
I understand it has to do with mounting, and configuring fstab....

I have no idea though what to do.

Please.... help...

Art

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
R2R
Solved:
Last query:
Last reply:
Revision history for this message
David Pires (slickymaster) said :
#1

Follow the instructions in https://help.ubuntu.com/community/Mount/USB it's pretty easy and you're good to go.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Add it in /etc/fstab
I assume you formatted it to Ext4.

What is the output of:

sudo fdisk -l; lsb_release -a; uname -a

Thanks

Revision history for this message
R2R (are-two-are) said :
#3

Strange, I though I converted to 4 kib sectors.

Waarschuwing: GPT (GUID-partitietabel) gevonden op '/dev/sda'!
(Warning guid partition table found on...

Het programma 'fdisk' ondersteunt GPT niet. Gebruik GNU 'parted'.

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 koppen, 63 sectoren/spoor, 9729 cilinders, totaal 156301488 sectoren
Eenheid = sectoren van 1 * 512 = 512 bytes
Sectorgrootte (logischl/fysiek): 512 bytes / 512 bytes
in-/uitvoergrootte (minimaal/optimaal): 512 bytes / 512 bytes
Schijf-ID: 0x00000000

 Apparaat Opstart Begin Einde Blokken ID Systeem
/dev/sda1 1 156301487 78150743+ ee GPT

Waarschuwing: GPT (GUID-partitietabel) gevonden op '/dev/sdb'!
Het programma 'fdisk' ondersteunt GPT niet. Gebruik GNU 'parted'.

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 koppen, 63 sectoren/spoor, 121601 cilinders, totaal 1953525168 sectoren
Eenheid = sectoren van 1 * 512 = 512 bytes
Sectorgrootte (logischl/fysiek): 512 bytes / 512 bytes
in-/uitvoergrootte (minimaal/optimaal): 512 bytes / 512 bytes
Schijf-ID: 0x00000000

 Apparaat Opstart Begin Einde Blokken ID Systeem
/dev/sdb1 1 1953525167 976762583+ ee GPT
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:cxx-3.0-amd64:cxx-3.0-noarch:cxx-3.1-amd64:cxx-3.1-noarch:cxx-3.2-amd64:cxx-3.2-noarch:cxx-4.0-amd64:cxx-4.0-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-3.1-amd64:desktop-3.1-noarch:desktop-3.2-amd64:desktop-3.2-noarch:desktop-4.0-amd64:desktop-4.0-noarch:desktop-4.1-amd64:desktop-4.1-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.0-amd64:graphics-3.0-noarch:graphics-3.1-amd64:graphics-3.1-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch:graphics-4.1-amd64:graphics-4.1-noarch:languages-3.2-amd64:languages-3.2-noarch:languages-4.0-amd64:languages-4.0-noarch:languages-4.1-amd64:languages-4.1-noarch:multimedia-3.2-amd64:multimedia-3.2-noarch:multimedia-4.0-amd64:multimedia-4.0-noarch:multimedia-4.1-amd64:multimedia-4.1-noarch:printing-3.2-amd64:printing-3.2-noarch:printing-4.0-amd64:printing-4.0-noarch:printing-4.1-amd64:printing-4.1-noarch:qt4-3.1-amd64:qt4-3.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID: Ubuntu
Description: Ubuntu Saucy Salamander (development branch)
Release: 13.10
Codename: saucy
Linux WARP1 3.11.0-8-generic #15-Ubuntu SMP Fri Sep 20 04:11:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

Why are you using Saucy when you are clearly new to Ubuntu?

Revision history for this message
R2R (are-two-are) said :
#5

was the only one which I managed to install with uefi.

issue is not saucy though, its lack of understanding of linux.

Revision history for this message
Thomas Krüger (thkrueger) said :
#6
Revision history for this message
R2R (are-two-are) said :
#7

Ah Thanks,

Seems that the issue is.... 20 years windows. Never used mounting.

- Is it most appropriate to hang it under /media or /dev?
- will info be lost when creating a mount point?

Revision history for this message
Thomas Krüger (thkrueger) said :
#8

/mnt is for fixed media
/media is for removable media
/dev is a system directory with device notes. Leave it as it is!

If you mount to a non-empty directory the content of the directory will be inaccessible until you unmount the device again. The content will not be changes. But it is best practice to mount to a empty mount point directory. Also be aware that mounting to system directories can make important files inaccessible and crash the system.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

What is the output of :

sudo blkid

And I will give you the line to add in /etc/fstab

Revision history for this message
R2R (are-two-are) said :
#10

OK, this helps.

So I have to:
- empty the disk
- mount it with /dev/<something>

Output blkd (I was searching for this command)
/dev/sdb1: UUID="d4bb795c-eb72-40a9-8cbb-2d1023c7004d" TYPE="ext4"
/dev/sda1: UUID="070D-3C96" TYPE="vfat"
/dev/sda2: UUID="df55ad81-0586-4eaa-9fd9-826de0a4c47e" TYPE="ext4"
/dev/sda3: UUID="2e3ca2da-7dcc-4171-b640-846006bc90cc" TYPE="ext4"
/dev/sda4: UUID="8b03bd04-d83b-4961-8d9b-a3532fe90d55" TYPE="swap"

AW

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

Assuming your username is 'dave' you want to use the 1000Mb partition as:

/home/dave/Data

Then run:

mkdir /home/dave/Data; gksudo gedit /etc/fstab

and add this line:

UUID=d4bb795c-eb72-40a9-8cbb-2d1023c7004d /home/dave/Data ext4 defaults 0 2

Save the new file, close gedit and run:

sudo mount /home/dave/Data; sudo chown -R dave:dave /home/dave/Data

And when you put data into /home/dave/Data it will be stored on the new storage.

OBVIOUSLY, change the word 'dave' in ALL cases to your user name. You can see this by running:

whoami

Revision history for this message
R2R (are-two-are) said :
#12

Andrew,

Thank you.

Point is there are 4 users (accounts) making use of the disk.

Should I mount all four names, or moun /home/data?

AW

Revision history for this message
R2R (are-two-are) said :
#13

For the sake of confirmation..

I can make the disk part of the main tree, by making it /home
Yet, that could render the files inaccessible after system crash....

or

as /mnt/Data1
Making it just another disk attached to the tree....

Revision history for this message
R2R (are-two-are) said :
#14

To summarise for others:

- used gparted to set gpt and define partition and filesystem
- used gdisk for checking alignment (gparted did not align correctly) set value to 8. First partition starting at sector 64.

Aterwards in shell:
- ~# mkdir /mnt/DATA1
- ~#vim /etc/fstab (added line in fstab; UUID - btrfs - defaults, noatime)
- ~#mount /mnt/DATA1
~# chown -R arthur:arthur /mnt/DATA1 (arthur is owner of disk)

In dolphin - on the left site - all disks/partitions are named as "linux filesystem". Not very practical.
Gparted -> unmounted -> added label by giving a name to the paritition-> mounted again.

Problem solved