LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-02-2016, 02:52 PM   #1
cellranking
Member
 
Registered: Jan 2016
Location: washington
Posts: 51

Rep: Reputation: Disabled
Red face fdish


hello room i want to permanent mount my extra 15999.8GB disk space any idea and how to?

fdisk -l

Disk /dev/sdb: 15998.8 GB, 15998753177600 bytes
255 heads, 63 sectors/track, 1945070 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000abb9c
 
Old 02-02-2016, 03:10 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
First you need to partition it, then format it, then you can add it to /etc/fstab to auto-mount. Do you know what filesystem type you want to use?
 
Old 02-02-2016, 03:17 PM   #3
cellranking
Member
 
Registered: Jan 2016
Location: washington
Posts: 51

Original Poster
Rep: Reputation: Disabled
hello

most Linux partition is ext4 right if so i want ext4 partition

thank you
 
Old 02-02-2016, 03:22 PM   #4
JockVSJock
Senior Member
 
Registered: Jan 2004
Posts: 1,420
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
More information...what distro of Linux is this?
 
Old 02-02-2016, 03:24 PM   #5
cellranking
Member
 
Registered: Jan 2016
Location: washington
Posts: 51

Original Poster
Rep: Reputation: Disabled
Hello

I am run Redhat 6.7
 
Old 02-02-2016, 03:31 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
You'll need to use parted, since fdisk doesn't support partitions larger than 2 TB. If you like you can use gparted to do it, or you can do it on the command line:
Code:
parted /dev/sdb
mklabel gpt
mkpart primary ext4 2048s -1
quit
2048 sector offset is usually good, but you can verify using this as a guide:
http://rainbow.chard.org/2013/01/30/...-using-parted/

Then build the filesystem with:
Code:
mkfs.ext4 /dev/sdb1
You're right at the 16 TB limit of 32-bit ext4, so if it complains you may have to switch it to 64-bit.

Last edited by suicidaleggroll; 02-02-2016 at 03:33 PM.
 
Old 02-02-2016, 03:39 PM   #7
cellranking
Member
 
Registered: Jan 2016
Location: washington
Posts: 51

Original Poster
Rep: Reputation: Disabled
my OS is 64-bit if i use 32-bit partitions would not has a problems?

thank you
 
Old 02-02-2016, 04:40 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
It has nothing to do with your processor architecture.
 
Old 02-02-2016, 04:57 PM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
this is what I put in fstab for my extra LT/HDD.

I created a directory in /media ~ called data then add this to my fstab, then sudo mount -a after all of the formating stuff of course.

Code:
/dev/sdb1  /media/data  ext4 defaults 0 0

its that simple

Last edited by BW-userx; 02-02-2016 at 04:58 PM.
 
Old 02-02-2016, 08:26 PM   #10
MrTux
Member
 
Registered: Dec 2015
Posts: 131

Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
You'll need to use parted, since fdisk doesn't support partitions larger than 2 TB. If you like you can use gparted to do it, or you can do it on the command line:
Code:
parted /dev/sdb
mklabel gpt
mkpart primary ext4 2048s -1
quit
2048 sector offset is usually good, but you can verify using this as a guide:
http://rainbow.chard.org/2013/01/30/...-using-parted/

Then build the filesystem with:
Code:
mkfs.ext4 /dev/sdb1
You're right at the 16 TB limit of 32-bit ext4, so if it complains you may have to switch it to 64-bit.
What does -1 mean in the parted command?
 
Old 02-02-2016, 08:58 PM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by MrTux View Post
What does -1 mean in the parted command?
mkpart part-type [fs-type] start end
indicating the entire HDD
 
Old 02-02-2016, 09:14 PM   #12
MrTux
Member
 
Registered: Dec 2015
Posts: 131

Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
mkpart part-type [fs-type] start end
indicating the entire HDD
Isn't the whole hdd 0 100%?
 
Old 02-03-2016, 07:19 AM   #13
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Yes, -1 is a shortcut, it does the same thing as 100%.
 
Old 02-03-2016, 09:27 AM   #14
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
If you are going to put the entire disk in one partition, you have no need to partition it.
 
Old 02-03-2016, 08:05 PM   #15
cellranking
Member
 
Registered: Jan 2016
Location: washington
Posts: 51

Original Poster
Rep: Reputation: Disabled
hello
I following steps by steps ran the command on my test BOX (my LIVE SERVER Disk /dev/sdb: 15998.8 GB, 15998753177600 bytes) following error on my output please help
thank you

root@localhost ~]# parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
-----------------------------------------------------------------------------
[root@localhost ~]# parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
Warning: Partition(s) on /dev/sdb are being used.
Ignore/Cancel? I
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes
Error: Partition(s) 1, 2 on /dev/sdb have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old
partition(s) will remain in use. You should reboot now before making further changes.
Ignore/Cancel? I
(parted) ^C
(parted)
---------------------------------------------------------------------------------------------------
(parted) mkpart primary ext4 2048s -1
Error: Partition(s) 1, 2 on /dev/sdb have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old
partition(s) will remain in use. You should reboot now before making further changes.
Ignore/Cancel? I
(parted)
----------------------------------------------------------------------------------------------------------
mkfs.ext4 /dev/sdb1
mke2fs 1.42.9 (28-Dec-2013)
/dev/sdb1 is mounted; will not make a filesystem here!
[root@localhost ~]#




fdisk -l

Disk /dev/sda: 200.0 GB, 200049647616 bytes, 390721968 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xa5fb4e2a

Device Boot Start End Blocks Id System
/dev/sda1 2048 390721967 195359960 83 Linux
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sdb: 320.1 GB, 320072933376 bytes, 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt


# Start End Size Type Name

Disk /dev/mapper/centos-swap: 10.5 GB, 10485760000 bytes, 20480000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-usr: 52.4 GB, 52428800000 bytes, 102400000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-root: 52.4 GB, 52424605696 bytes, 102391808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-var: 31.5 GB, 31457280000 bytes, 61440000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-home: 157.3 GB, 157286400000 bytes, 307200000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb2 centos lvm2 a-- 283.20g 4.00m
[root@localhost ~]#
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration