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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-09-2021, 08:23 AM
|
#1
|
Member
Registered: Oct 2019
Distribution: centos7
Posts: 52
Rep: 
|
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!!!
|
|
|
08-09-2021, 08:55 AM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,673
|
Quote:
Originally Posted by hatfani
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.
|
|
|
08-09-2021, 08:59 AM
|
#3
|
Moderator
Registered: Aug 2002
Posts: 26,757
|
Does the directory name have any meaning? If /home/raid is actually a raid then we need more information as to type etc.
|
|
|
08-09-2021, 09:01 AM
|
#4
|
Senior Member
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: KDE Neon
Posts: 1,271
|
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.
|
|
|
08-09-2021, 09:02 AM
|
#5
|
Member
Registered: Oct 2019
Distribution: centos7
Posts: 52
Original Poster
Rep: 
|
Quote:
Originally Posted by TB0ne
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?
|
|
|
08-09-2021, 09:04 AM
|
#6
|
Member
Registered: Oct 2019
Distribution: centos7
Posts: 52
Original Poster
Rep: 
|
Quote:
Originally Posted by uteck
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
|
|
|
08-09-2021, 09:06 AM
|
#7
|
Member
Registered: Jun 2021
Distribution: Slackware Linux, LMDE5, Porteus
Posts: 166
Rep:
|
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
|
|
|
|
08-09-2021, 10:03 AM
|
#8
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,673
|
Quote:
Originally Posted by hatfani
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.
|
|
|
08-13-2021, 11:16 AM
|
#9
|
Senior Member
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
|
Quote:
Originally Posted by TB0ne
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
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.
|
|
|
08-14-2021, 08:33 AM
|
#10
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,976
|
Member Response
Hi,
Quote:
Originally Posted by zeebra
/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'?

|
|
|
08-14-2021, 09:27 AM
|
#11
|
Senior Member
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
|
Quote:
Originally Posted by onebuck
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.
|
|
|
All times are GMT -5. The time now is 06:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|