Hay, my PC has 2 hard drives and I would like Linux to see it as one, is it possible to to it?
I do not quite understand what you mean by “seeing as one”?
In Unix/linux all partititions are mounted somewhere in one big directory tree (starting at /). As normal user you will see this as “one” lump of disk space and will normaly not know when you cross from one partition to the other.
See also SDB:Basics of partitions, filesystems, mount poin - openSUSE
When you mean you want to create partitions crossing disks you could use Locigal Volume Manager. Is a layer that at the bottom grabs together a number of disks into one lump of diskspace. At the top it presents this space as a disk where you can carve partitions from. Further you can use RAID methods on these partitions (like mirroring).
But again, what do you mean by “seeing as one”?
when I go to my computer I can see two disks : /home and /local. I want my two hard drives to virtually become one hard drive.
jola k wrote:
> when I go to my computer I can see two disks : /home and /local. I want
> my two hard drives to virtually become one hard drive.
Mmm… if you are talking about some kind of advanced partitioning scheme
(LVM, RAID or spanning) you will need to redefine better (in a precisely
manner) your goals
Greetings,
–
Camaleón
They are NOT two hard drives, they are partitions. These partitions MAY be each on a separate disk, they may be on the same disk. Did you study the Wiki SDB page I gave you a link to? So that at least we talk the same words and mean the same things?
Also about /local. It is not very usual to have that, but it may be for a good reason. Also I am missing / in your story. Can you please past here the output of the following three statements (as root):
fdisk -l
cat /etc/fstab
mount
Again, please explain what you mean by “seeing” them. Of course whe you have two partitions mounted, that can be “seen” somewhere. Especialy by the system administrator (root). For the normal user this has no significance. When he logs in he is in his home directory (on the /home partition in your case) and can manouevre from there to any place he is allowed to go to, either in the CLI (with e.g. the cd command) or by using a “file manager” in a GUI, without even having an idea if at one point in time he is executing a program on the / partition using data on the /home partition, writing out data to the /local partion.
And having a separate /home partition has many pros. It comes e.g. very handy when you update/reinstall your system, because not touching the /home partition then migrates all user data to the upgraded/new system automaticaly. Also when some user fills up all available space (by accident, we hope) only /home will be full and the system can still function.
my goal is to be able to have my home folder on one big virtual disk, so that I can save files on both disks within my home folder. passing between harddrives is a pain in… I dont want any partition, I want suse to think there is one big 600GB hard drive, not two seperate 300GB’s
so I dont have to have sudo powers to place files in the other hard drive. as my home folder is only on one
have you read up on mount? under mount you can reposition partitions and physical drives such they appear in your home folder.
If that doesn’t work for you you can also create a link in your home folder to the other partitions and drives.:\
linux-1rjj:~ # fdisk -l
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x48000000
Device Boot Start End Blocks Id System
/dev/sda1 2 38913 312560640 83 Linux
Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000081
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 262 2104483+ 82 Linux swap / Solaris
/dev/sdb2 263 2873 20972857+ 83 Linux
/dev/sdb3 2874 38913 289491300 83 Linux
linux-1rjj:~ # cat /etc/fstab
/dev/disk/by-id/ata-WDC_WD3200AAKS-75L9A0_WD-WCAV24273601-part1 swap swap defaults 0 0
/dev/disk/by-id/ata-WDC_WD3200AAKS-75L9A0_WD-WCAV24273601-part2 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/ata-WDC_WD3200AAKS-75L9A0_WD-WCAV24273601-part3 /home ext3 acl,user_xattr 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/disk/by-id/ata-WDC_WD3200AAKS-75L9A0_WD-WCAV24333525-part1 /local ext3 defaults 1 2
linux-1rjj:~ # mount
/dev/sdb2 on / type ext3 (rw,acl,user_xattr)
/proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sdb3 on /home type ext3 (rw,acl,user_xattr)
/dev/sda1 on /local type ext3 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
linux-1rjj:~ #
The Link you mentioned is not working
How did you try to create a link to the other harddisk?
Also have you got root permissions in effect on the /local drive?
If root only permissions are present they will have to be changed or a regular user can’t get access.
Just had a thought here, your not talking about having the drives function together such that files can span Hdisks! Cause that just won’t work.
Sorry but have to go till tonight. I will check back in then.
jola k wrote:
> my goal is to be able to have my home folder on one big virtual disk, so
> that I can save files on both disks within my home folder. passing
> between harddrives is a pain in… I dont want any partition, I want
> suse to think there is one big 600GB hard drive, not two seperate
> 300GB’s
Wait, wait… Unless you want to configure any LVM volume for both hard disk
to be managed and acting as one big volume (640 GiB.), you cannot get “per
se” the whole sum of both drives to be attached just “magically”
First, carefully analyze your space requirements for your /home, that is,
how many space has now and how many space do you need (open konsole and
type “df -H” so we can get an idea). The lacking of space is one the things
I do not like partitioning so much, unless be strictly necessary.
Anyway, I’m almost sure you can use the whole /dev/sda1 partition (320 GiB.)
to be used (mounted) as your /home directory but that way you will not get
the 640 GiB you are thinking on, just 320 GiB of space.
> so I dont have to have sudo powers to place files in the other hard
> drive. as my home folder is only on one
Better than having the “sudo” power is having the power of “root”
Greetings,
–
Camaleón
Sorry about that, I seemingly missed the ts at the end while copy/pasting. My fault.
I have seen the output of the statements I asked for. I now see your /local. Now why is that one there? I do not mean “why does it exist?”, but I do mean “why is that partition mounted on /local?”. I suppose you did this yourself or is somebody else responsibel for this?
Now you know the best what you want to achieve (it is a llittle bit clearer, but not much). So what follows is a bit guessing, a bit of contemplating to give you an idea what you might do.
I suppose you are talking about one user (I do not know if you have more users installed and using the system regularly, but from what I read here, no). This means that this users data is best in /home/<the-user>/.
When you want to use the big amount of space inside sda (now on /local) inside your /home/<the-user>/ you can mount it somewhere there. E.g. When you want to have your movies on them, mount it at /home/<the-user>/movies/. This is of course an example (maybe you do not like movies and are doing architectural drawings). But taking this as an example you could achive this by:
create (as <the-user> the directory movies. That is standing in your home directory:
mkdir movies
This will create /home//movies where is the owner and may read/write/search the directory…
Now, as root, edit* /etc/fstab* and change the line:
/dev/disk/by-id/ata-WDC_WD3200AAKS-75L9A0_WD-WCAV24333525-part1 /local ext3 defaults 1 2
into:
/dev/disk/by-id/ata-WDC_WD3200AAKS-75L9A0_WD-WCAV24333525-part1 /home/<the-user>/moviesl ext3 defaults 1 2
I hope you understand that in all the above text you must read/type <the-user> as the username you are using (which I do not know of course)
Last step is to reboot your sysem. When you log in again as <the-user> you will se that everything you earlier fouund/did in /local is now in movies starting from your home directory. That means that when you start a File manager it will open in your home directory and you will see movies in there. You can click on movies and … I suppose you know how to do any further work.
When I did completely misunderstand you, forigive me. You could try to better explain what you want (and I still do not understand the ‘seeing’, when I go to my computer I see a black box, a monitor, a keyboard and a mouse, not two disks )
Next part of my story.
What I offered in my last post still has the problem that when your movies partition is full, you may have plenty of room in your home partition.
What you most probably want then is having the 350Gb of sda and the ±300Gb left over in sda (after swap and / taken off) in one big lump. The state your system is in now does not allow this. To achieve this you must (as several others and I already said) use something like LVM. This takes about the following steps:
- remove the three partitions on sdb and create one partition containing all of sdb (like the one partition on sda);
- use LVM to join those two partitions in one logical volume (or does LVM take the raw disks, I am not sure here);
- partition this logical volume into three partitions for swap (same size as before), / (same size as before) and /home (will be about 750Gb now).
- restore data and adapt /etc/fstab.
The number 4 above shows that this will involve in destroying everything in the disks. So fiind a method to backup all of / and all of /local and all of /home to restore it later. When you do a fresh install only backups of /home and /local ar needed. New install has also the advantage that your fstab will be created correct and that you might do step 2 and 3 during installation.
However, using LVM during install might be a bit tricky when you have never done this. I did not on Linux (though on several Unix systems), but there may be others here to help you.
Yes thinking about how one wants to use ones diskspace before doing any partitioning is one of the grater headaches of a system manager.
Thanks for help, it’s working fine now