LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-09-2021, 08:23 AM   #1
hatfani
Member
 
Registered: Oct 2019
Distribution: centos7
Posts: 52

Rep: Reputation: Disabled
Unhappy partitioning dev/sdb


Hello everyone,

I have a /dev/sdb disk with 2T.
It is already partitioned to sdb1 which is mount on the directory /home/raid
/home/raid directory has 2T and is currently using 15gb.
I want to have a new partition called sdb2 without harming the information on sdb1.
I want sdb2 to have 1.5T out of that 2T.

I saw that I can use parted command or fdisk for that, but I'm not sure how to do it without ruining the server or harming the 15gb on sdb1.
how do I create that sdb2 partition? what should I notice?

Any suggestions?

Thank you!!!
 
Old 08-09-2021, 08:55 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,673

Rep: Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153
Quote:
Originally Posted by hatfani View Post
Hello everyone,

I have a /dev/sdb disk with 2T. It is already partitioned to sdb1 which is mount on the directory /home/raid /home/raid directory has 2T and is currently using 15gb. I want to have a new partition called sdb2 without harming the information on sdb1. I want sdb2 to have 1.5T out of that 2T.

I saw that I can use parted command or fdisk for that, but I'm not sure how to do it without ruining the server or harming the 15gb on sdb1. how do I create that sdb2 partition? what should I notice?

Any suggestions?
Did you try putting "how to use parted to resize a partition" into a search-engine? That would be a good first suggestion.
https://www.tecmint.com/parted-comma...sk-partitions/

Beyond that, the question itself seems pointless, because before doing ANYTHING of that nature, you should first take backups of your data...meaning if you already HAVE a backup of your data, you can just format the drive and re-partition it as you want to. Then copy your data back to it.
 
Old 08-09-2021, 08:59 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,757

Rep: Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318
Does the directory name have any meaning? If /home/raid is actually a raid then we need more information as to type etc.
 
Old 08-09-2021, 09:01 AM   #4
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: KDE Neon
Posts: 1,271

Rep: Reputation: 525Reputation: 525Reputation: 525Reputation: 525Reputation: 525Reputation: 525
You don't mention how the disk is formatted. You have it mounted in /home/raid, so is this part of raid array?
If it is not part of a raid, then resizing is easy, take a look at gparted, the graphical fronted to parted. If is part of a raid, then you have more work to do.
 
Old 08-09-2021, 09:02 AM   #5
hatfani
Member
 
Registered: Oct 2019
Distribution: centos7
Posts: 52

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Did you try putting "how to use parted to resize a partition" into a search-engine? That would be a good first suggestion.
https://www.tecmint.com/parted-comma...sk-partitions/

Beyond that, the question itself seems pointless, because before doing ANYTHING of that nature, you should first take backups of your data...meaning if you already HAVE a backup of your data, you can just format the drive and re-partition it as you want to. Then copy your data back to it.
Thank you for that, I have backup of my files. I have delete them from /home/raid. I was actually thinking if I just change the mounting point in /etc/fstab from /home/raid to /mnt, will it change the mounting point?
 
Old 08-09-2021, 09:04 AM   #6
hatfani
Member
 
Registered: Oct 2019
Distribution: centos7
Posts: 52

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by uteck View Post
You don't mention how the disk is formatted. You have it mounted in /home/raid, so is this part of raid array?
If it is not part of a raid, then resizing is easy, take a look at gparted, the graphical fronted to parted. If is part of a raid, then you have more work to do.
it is the only partition on the disk and it's mounted on /home/raid. thank you
 
Old 08-09-2021, 09:06 AM   #7
knet
Member
 
Registered: Jun 2021
Distribution: Slackware Linux, LMDE5, Porteus
Posts: 166

Rep: Reputation: 13
gparted

@hatfani you can try Gparted

Quote:
GParted is a free partition editor for graphically managing your disk partitions.

With GParted you can resize, copy, and move partitions without data loss, enabling you to:

Grow or shrink your C: drive
Create space for new operating systems
Attempt data rescue from lost partitions
 
Old 08-09-2021, 10:03 AM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,673

Rep: Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153Reputation: 8153
Quote:
Originally Posted by hatfani View Post
Thank you for that, I have backup of my files. I have delete them from /home/raid. I was actually thinking if I just change the mounting point in /etc/fstab from /home/raid to /mnt, will it change the mounting point?
Yes...changing the mount point will indeed *CHANGE THE MOUNT POINT*; that would seem obvious. And why /mnt?? Does that exist on your system? And if so, other things may mount under it..is it a blank directory?

And why bother changing the mount point at all? That does absolutely NOTHING to change the partitions. Again, do some basic research...you were given a link that answers your question, so you can use the commands you didn't look up for yourself, or backup your data and format/partition the drive. Your choice.
 
Old 08-13-2021, 11:16 AM   #9
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
Blog Entries: 17

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
Quote:
Originally Posted by TB0ne View Post
Yes...changing the mount point will indeed *CHANGE THE MOUNT POINT*; that would seem obvious. And why /mnt?? Does that exist on your system? And if so, other things may mount under it..is it a blank directory?
/mnt is normally for temporary manual mounts and is not a good choice.

Things these days normally get mounted under /var/run/media/user.. I don't find this a good solution, quite annoying to be frank. And many times I've heard users who can't access their /var/run/media/user/disk due to wrong permissions in that folder.
In that case I prefer /mnt/something which is much shorter, and have the same permission issue as /var/run/media/user.

Quote:
Originally Posted by hatfani View Post
I was actually thinking if I just change the mounting point in /etc/fstab from /home/raid to /mnt, will it change the mounting point?
You COULD mount something permanently under /mnt/somedisk, but that is not the optimal place to mount something. It is normally used as manual mount location.

But probably if is is a USER disk, the better place would be to mount it somewhere in /home/user/*/. Or you could mount it with group access in /home/*

Last edited by zeebra; 08-13-2021 at 11:25 AM.
 
Old 08-14-2021, 08:33 AM   #10
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,976
Blog Entries: 46

Rep: Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202
Member Response

Hi,
Quote:
Originally Posted by zeebra View Post
/mnt is normally for temporary manual mounts and is not a good choice.

Things these days normally get mounted under /var/run/media/user.. I don't find this a good solution, quite annoying to be frank. And many times I've heard users who can't access their /var/run/media/user/disk due to wrong permissions in that folder.
In that case I prefer /mnt/something which is much shorter, and have the same permission issue as /var/run/media/user.

You COULD mount something permanently under /mnt/somedisk, but that is not the optimal place to mount something. It is normally used as manual mount location.

But probably if is is a USER disk, the better place would be to mount it somewhere in /home/user/*/. Or you could mount it with group access in /home/*
Care to share as to why one should not use '/mnt' as a mount point. I create a '/mnt/sdc2' to do a lot of work on that partition. As the user I cannot see an issue with creating a mount point under '/mnt'. Be it permanent or just for maintenance issues the mount point would be workable. As the user it is my awareness and root privilege to use my hardware and OS as I see fit to do. I have never seen any reason to use '/mnt' only for temporary use. I can use it as I see fit without issues.

I will follow norms when installing packages but that to can use '/mnt' when doing the install '/mnt' mount point can be used as the source.
I have multiple mount points under '/mnt' but if someone other that me tries to just mount at '/mnt' then issues will occur. But that too can be protected/prevented from happening by setting permissions. Not being argumentative but query as too why you state that mount points at '/mnt' should not be used normally by users.

Just a friendly request as to your 'why'?
 
Old 08-14-2021, 09:27 AM   #11
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
Blog Entries: 17

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
Quote:
Originally Posted by onebuck View Post
Hi,

Care to share as to why one should not use '/mnt' as a mount point. I create a '/mnt/sdc2' to do a lot of work on that partition. As the user I cannot see an issue with creating a mount point under '/mnt'. Be it permanent or just for maintenance issues the mount point would be workable. As the user it is my awareness and root privilege to use my hardware and OS as I see fit to do. I have never seen any reason to use '/mnt' only for temporary use. I can use it as I see fit without issues.

I will follow norms when installing packages but that to can use '/mnt' when doing the install '/mnt' mount point can be used as the source.
I have multiple mount points under '/mnt' but if someone other that me tries to just mount at '/mnt' then issues will occur. But that too can be protected/prevented from happening by setting permissions. Not being argumentative but query as too why you state that mount points at '/mnt' should not be used normally by users.

Just a friendly request as to your 'why'?
I use /mnt/ as a mountpoint all the time with subfolders and all, it's generally my favourite place to mount things (manually).. So I don't know why exactly. But according to Linux Filesystem Hierarchy Standard you're not suppose to use /mnt in that way

I mean, they even created /media to make us stop doing that. Then that was moved into /var and some weird folders.. Automounting I mean. But then again, I don't generally use automounting.

Last edited by zeebra; 08-14-2021 at 09:32 AM.
 
  


Reply

Tags
partition, storage


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
device order (dev/sdb,dev/sdd) changes why ? comtmr Linux - Enterprise 5 06-26-2012 04:28 AM
Can i dd if=/dev/sdb of=/dev/sdc if hdsize(sdb)>hdsize(sdc) & size(sdb)<hdsize(sdc) ? ununun Linux - Software 6 06-28-2011 11:48 AM
[SOLVED] Grub: If exists sdb, then boot sdb, else sda defaultyeti Linux - Desktop 6 06-28-2011 02:38 AM
Copying from /dev/sda to /dev/sdb fof3 Linux - Newbie 8 07-04-2006 06:19 AM
forcing the order of /dev/sda /dev/sdb etc.. jdaniel Linux - Software 5 05-23-2006 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:41 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