Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
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-12-2014, 08:21 PM
|
#1
|
Member
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 754
Rep:
|
already got 4 primary partitions
Hi,
Brief history: I have 3 HDDs on my PC. sdb contains Centos6, sda is my old backup drive (soon to become Centos7 - I want to be able to dual boot), sdc is my new backup drive.
Quote:
Filesystem Size Used Avail Use% Mounted on
/dev/sdb5 8.2G 4.5G 3.3G 58% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
devpts 0 0 0 - /dev/pts
tmpfs 947M 144K 947M 1% /dev/shm
/dev/sdb1 243M 125M 106M 55% /boot
/dev/sdb2 1.8T 173G 1.6T 11% /home
/dev/sda1 1.8T 1.4T 337G 81% /mnt/extend
/dev/sdc1 2.7T 1.4T 1.2T 54% /data
none 0 0 0 - /proc/sys/fs/binfmt_misc
|
The /home partition on sdb is huge and contains my samba shares. I want to move them out of this partition so that they will be visible to Centos7. My original plan was to resize the /home partition and create a new partition for general use/samba shares. But, I already have 4 primary partitions on sdb.
Quote:
Number Start End Size Type File system Flags
1 1049kB 263MB 262MB primary ext4 boot
2 263MB 1982GB 1982GB primary ext4
3 1982GB 1991GB 9227MB primary linux-swap(v1)
4 1991GB 2000GB 9100MB extended
5 1991GB 2000GB 8913MB logical ext4
|
I am using gparted. Are there solutions where I can add an extra storage area to sdb2 without having to reinstall centos6? From a quick poke around the net I should be able to create an extended partition? But gparted won't let me add anything to sdb2.
I suppose if all else fails I can resize the sda partition to contain the samba stuff. Then slice 'n' dice the rest of sda when I install centos7.
Cheers
|
|
|
08-12-2014, 08:39 PM
|
#2
|
Member
Registered: Oct 2009
Distribution: Slackware
Posts: 534
|
You already have an extended partition with one logical partition (/dev/sdb5).. Unfortunetly, you can not do anything with /dev/sdb2.. All logical partition need to be in the extended space, which in your case can't be expanded because of your swap partition (/dev/sdb3)... In theory, you could delete sdb2 and sdb3.. Then extend your extended partition to cover the newly free space and subdevide that space however you like, but that would also mess with the device names of your partitions.. I'm also unsure that gparted or any other partition manager could handle that.. Actually, I even had a problem with fdisk handling blank space of an extended partition before an actual logical one..
|
|
|
08-12-2014, 08:46 PM
|
#3
|
Member
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 754
Original Poster
Rep:
|
I just had a thought. How about, after I install Centos7, I create a mount point which mounts sdb (this drive being unused in Centos7)? I can then reference the shares from the mount point.
Should I need to boot into Centos6 the current fstab defines the relevant locations.
|
|
|
08-12-2014, 08:48 PM
|
#4
|
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 3,348
Rep:
|
Rezising the /home partition (/dev/sdb2) will create free space between /dev/sdb2 and /dev/sdb3. You cannot create a new primary partition from that space since you already have 4 such partitions, and you cannot directly use the free space for a logica partition either, because logical partition can only use the space allocated to the extended partition (/dev/sdb4).
You could probably use a partitioning tool to move /dev/sdb3 to start immediately after the shrunk /dev/sdb2 partition and then move/resize /dev/sdb4 to make it take up all the remaining space.
Another option would be to put the swap partition elsewhere and delete /dev/sdb3. You could then create a new /dev/sdb3 partition to hold your Samba shares.
This is precisely why people use LVM. If all the disk space was allocated to an LVM Volume Group, you could grow and shrink existing Logical Volumes to your heart's content, as well as create any number of new Logical Volumes as long as there's free space in the Volume Group.
And yes, you could obviously just mount the partition directly from CentOS, as long as you don't mind file owners and groups getting slightly mixed up.
Last edited by Ser Olmy; 08-12-2014 at 08:50 PM.
|
|
1 members found this post helpful.
|
08-12-2014, 08:55 PM
|
#5
|
Member
Registered: Oct 2009
Distribution: Slackware
Posts: 534
|
Well, I've just re-read your first post.. Basically, if you just want to install CentOS and dual boot, you don't need to repartition anything.. Every partition will be accesible to you from CentOS7
You can just mount it as /myotherhome (or whatever you like) and point samba to those shares.. Or even use /dev/sdb2 as your /home (but I wouldn't recommend that, specially with the same username -- otherwise fine)
|
|
1 members found this post helpful.
|
08-13-2014, 05:54 PM
|
#6
|
Member
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 754
Original Poster
Rep:
|
thanks for the feedback. I'll just accept that I didn't think through my original partitioning. I'll play around with different partitioning methods in VirtualBox before I go any further. I'll need to read up on LVM first as I am not familiar with this.
Cheers
|
|
|
All times are GMT -5. The time now is 06:06 PM.
|
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
|
|