i am using Ubuntu 16.04 and want to access/use different disk in the server(following disks):
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 372G 0 disk
├─sda1 8:1 0 487M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 371.5G 0 part
├─CR2--vg-root 252:0 0 115.6G 0 lvm /
└─CR2--vg-swap_1 252:1 0 255.9G 0 lvm [SWAP]
sdb 8:16 0 12.7T 0 disk
└─sdb1 8:17 0 12.7T 0 part /mnt/storage
sdc 8:32 0 5.5T 0 disk
sdd 8:48 0 5.5T 0 disk
sde 8:64 0 5.5T 0 disk
sdf 8:80 0 5.5T 0 disk
sdg 8:96 0 5.5T 0 disk
sdh 8:112 0 5.5T 0 disk
sdi 8:128 0 5.5T 0 disk
sdj 8:144 0 5.5T 0 disk
sdk 8:160 0 5.5T 0 disk
sdl 8:176 0 5.5T 0 disk
sdm 8:192 0 5.5T 0 disk
sdn 8:208 0 5.5T 0 disk
sdo 8:224 0 5.5T 0 disk
sdp 8:240 0 5.5T 0 disk
sdq 65:0 0 5.5T 0 disk
sdr 65:16 0 5.5T 0 disk
sds 65:32 0 5.5T 0 disk
sdt 65:48 0 5.5T 0 disk
sdu 65:64 0 5.5T 0 disk
sdv 65:80 0 5.5T 0 disk
sdw 65:96 0 5.5T 0 disk
sdx 65:112 0 5.5T 0 disk
sdy 65:128 0 5.5T 0 disk
sdz 65:144 0 5.5T 0 disk
sr0 11:0 1 1024M 0 rom
nvme0n1 259:2 0 1.8T 0 disk
nvme1n1 259:1 0 1.8T 0 disk
nvme2n1 259:3 0 1.8T 0 disk
nvme3n1 259:0 0 1.8T 0 disk
I can only access/use the following:
df -h
Filesystem Size Used Avail Use% Mounted on
udev 126G 0 126G 0% /dev
tmpfs 26G 50M 26G 1% /run
/dev/mapper/CR2--vg-root 114G 83G 26G 77% /
tmpfs 126G 0 126G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 126G 0 126G 0% /sys/fs/cgroup
/dev/sdb1 13T 12T 0 100% /mnt/storage
/dev/sda1 472M 159M 289M 36% /boot
tmpfs 26G 0 26G 0% /run/user/1000
I also try follwoing :
sudo fdisk /dev/sdc
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
The size of this disk is 5.5 TiB (6001175126016 bytes). DOS partition table format can not be used on drives for volumes larger than 2199023255040 bytes for 512-byte sectors. Use GUID partition table format (GPT).
Created a new DOS disklabel with disk identifier 0x2a4732aa.
How can i use other disks sdc
, sdd
, sdf
...
You have the answer from Fdisk - MBR or DOS partitions can not be larger than 2TB. You need to change to GPT partitions.
You can make use of the additional disks by adding them to the file system table file
/etc/fstab
.But please note that you can only add disks that have file systems on them. Disks normally have a "partition table" that allows you to put multiple file systems on a single disk and Linux allows you to address such partitions in a partition table by adding a number after the SATA drive name -
/dev/sda1
for the first partition in the drive/dev/sda
(this is true for SATA drives and previously IDE drives, while for other drive technologies the kernel might use a more elaborate scheme - for example NVME drives use/dev/nvme<controller#>n<device#>p<partition#>
).To use such disks in Linux you have to:
fdisk
as you've shown, butgdisk
would probably be a better option as it supports nativelyGPT
type partitions which are now the industry standard, or better yet: use the much more complete toolgparted
. There are also graphical tools to do that, such as GNOME Disks or KDE partition manager.mkfs
programs such asmkfs.ext4
./etc/fstab
(see the man page for details).But you are not required to use partitions if you don't want to and it doesn't make sense to - maybe because you only ever plan to have one file system per device. You can just create a file system directly on the "raw" device. For example to use
/dev/sdc
as a new file system mounted on/mnt/storage2
, you can do:(the second step should better be done with an actual text editor -
cat
ing stuff on top of a very important system file such as/etc/fstab
is a horrible idea, this example is just so you understand what we are doing.)I suggest create RAID on this drives, this way you will not have separate folder for mounting each drive, improve stability or speed. Its possible to just replace hard disk if it fail without loosing data with RAID. There are few raid types, read about them and decide which one suits your needs. From the first link you'll learn how to setup raid.
^ https://help.ubuntu.com/community/Installation/SoftwareRAID
About RAID types: https://en.wikipedia.org/wiki/RAID#Standard_levels