Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Hey,, where's my C Drive?

  1. #1
    Join Date
    Jun 2008
    Location
    UK; deep south, far below Watford.
    Posts
    275

    Default Hey,, where's my C Drive?

    After a long while slowly getting used to Linux I suddenly realised that I haven't got a C-drive - and that's really a big problem for me because it means I haven't got a D drive either - and that's where I wanted to save my big files (raw photo images).

    This has now got my attention because I have built this new system (OS 11.1 and KDE 4.1) using old bits of computing hardware. I had 2 hard drives - one a reasonable size and reasonably quick one, on which I guessed the system would be built (a C drive equivalent). The other drive is old, small and slow and I wanted to use it only for a swap partition. It will be replaced once I have built a stable system with a much larger faster disk that I have been thinking of as my D drive and on which I can store my raw images.

    But when I use dolphin there is no indication of any physical drives at all and so I cannot really state where anything is. So a clumsy replacement of the small old disk with the big fast new one might just totally destroy my system

    Moreover, when I look at the 'Disk Information' in My Computer it seems that the larger of my 2 disks (on which I expected the system to be installed) seems to contain only a folder called /usr (or is this the name of the device? No, surely that's /dev/sda ?). The small old drive contains only a folder called / - but when I open it in a new konqueror window, it seems to contain all the key system folders that one finds in /root

    This is not what I expected at all.

    Can somebody tell me how I cab easily view what partitions, folders and files are on each of my 2 drives?
    They said I wasn't fit to live with a pig; my brother stood up for me and said I was.

  2. #2

    Default Re: Hey,, where's my C Drive?

    Open a konsole and post the output, as root, of:

    fdisk -l

    There you'll see your drives and partitions, then:

    cat /etc/fstab

    You'll see what and where's everything mounted.
    It is abhorrent the spiritual greed of those that knowing something, do not seek the transfer of such knowledge.

    Miguel de Unamuno - Writer (1864-1936)

  3. #3
    Join Date
    Jun 2008
    Location
    UK; deep south, far below Watford.
    Posts
    275

    Default Re: Hey,, where's my C Drive?

    That's nice and easy guidance to follow, but the output is such that I still cannot be sure that there is no vital data on the 2nd drive, which I want to replace. I have some further questions, if you don't mind, based on the output from the two commands, which is:

    LINEAR-1:/home/tony # fdisk -l

    Disk /dev/sda: 61.4 GB, 61492838400 bytes
    255 heads, 63 sectors/track, 7476 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xb7b2b7b2

    Device Boot Start End Blocks Id System
    /dev/sda1 * 2 7476 60042937+ 83 Linux

    Disk /dev/sdb: 40.0 GB, 40037760000 bytes
    255 heads, 63 sectors/track, 4867 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x1d161d15

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 4662 37447483+ 83 Linux
    /dev/sdb2 4663 4867 1646662+ 5 Extended
    /dev/sdb5 4663 4867 1646631 82 Linux swap / Solaris


    LINEAR-1:/home/tony # cat /etc/fstab
    /dev/disk/by-id/ata-MAXTOR_4K040H2_672123866134-part5 swap swap defaults 0 0
    /dev/disk/by-id/ata-MAXTOR_4K040H2_672123866134-part1 / ext3 acl,user_xattr 1 1
    /dev/disk/by-id/ata-IC35L060AVV207-0_VNVB05G2R4SMZH-part1 /usr 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


    Am I correct in thinking that the file system root is '/' and that it is on dev/sdb?

    If so, how can I move it to dev/sda so that I can easily replace dev/sdb?

    Where is my /home/tony folder?

    How do I work out how much space is used on each of these partitions? Disk Information in my computer shows usage at the disk level, not at the partition level.

    Does it all matter? Is there any advantage to me putting my photo collection master archive on a separate drive? And how wold I do that anyway?

    What happens when my home folder has consumed all the space on dev/sda (assuming that that is where it is)? Does the system automatically 'spill over' onto dev/sdb and write data files there until all that space is consumed?

    If so, doesn't this dramatically increase the risk of data loss? One of these 2 disks is going to fail some day. I assume that data is written in non-contiguous sectors using some algorithm defined by the files-system architecture. This could result in every file having sectors on both drives. By having data files that span across 2 drives, failure of either drive means total loss of all those files. By ensuring files are only on one drive, loss of that drive will not affect files on the other drive. Or am I talking bovine ordure here?
    They said I wasn't fit to live with a pig; my brother stood up for me and said I was.

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Hey,, where's my C Drive?

    Yes, the installer has put / on sdb, and /usr on sda. /home is part of /, if it isn't given a partition of its own so it's on sdb too. The installer did this on the basis of the sizes of the disks. Unfortunately it wasn't smart enough to know of your plans for sdb.

    No there isn't spillover when a partition fills up of the sort you surmise. When a partition fills up it fills up. (There is LVM, but that is another story not relevant at the moment, and you would have had to set it up at install anyway.)

    My advice would be to reinstall openSUSE, this time taking control by using the expert partitioner so that you can put both / and /home on sda. 60GB is sufficient for that, give 20GB to / and the rest to /home.

    FYI, if you want to find out what partition a particular directory is in, do something like this command:

    df /home/tony

    PS: There is another way to get a setup closer to your final goal, and that is to disable sdb during installation. Then you will pretty much automatically get /, /home and swap on sda. That swap on sda isn't a big deal, it will only 1-2GB max, and swap is a last resort anyway so it doesn't matter that much that it's on the same disk.

  5. #5
    Join Date
    Jun 2008
    Location
    UK; deep south, far below Watford.
    Posts
    275

    Default Re: Hey,, where's my C Drive?

    <Gulp>
    I suppose it's good to learn this now, rather than in a week's time when I have transferred all my stuff from Windows to this system.

    A little tourist info. please:

    What is significant about /usr that the installer decided to put this on a separate drive to /?

    If I re-install, with sdb not connected, /home will be on /sda (obviously) but what directory(ies) will be on /sdb, once it is connected and detcted by the kernel? You can see I still expecting to address it as Dsomething! Because individual drives are not identified in the file managers (and are really irrelevant I suppose to Linux), how will I ever be certain that my files are being written to /sdb?

    Finally, what do I do to clean up /sdb in preparation to re-installing suse 11.1? If I don't do anything, install will get confused, I'm sure. I suppose this can only be done when I have booted from the install DVD because otherwise I'll be in danger of operating on my own brain (which, I'm told, is quite successful until you get to the mo..............
    They said I wasn't fit to live with a pig; my brother stood up for me and said I was.

  6. #6
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Hey,, where's my C Drive?

    Quote Originally Posted by XEyedBear View Post
    What is significant about /usr that the installer decided to put this on a separate drive to /?
    No idea why the installer split it up that way, perhaps on the basis of distributing the partitions to give you more room in / and hence /home.

    If I re-install, with sdb not connected, /home will be on /sda (obviously) but what directory(ies) will be on /sdb, once it is connected and detcted by the kernel? You can see I still expecting to address it as Dsomething! Because individual drives are not identified in the file managers (and are really irrelevant I suppose to Linux), how will I ever be certain that my files are being written to /sdb?
    None. sdb will not be assigned to anything. To do anything with it, you have to go into the partitioner in YaST and you can mount the partitions on it, or rebuild the partitions.

    Finally, what do I do to clean up /sdb in preparation to re-installing suse 11.1? If I don't do anything, install will get confused, I'm sure. I suppose this can only be done when I have booted from the install DVD because otherwise I'll be in danger of operating on my own brain (which, I'm told, is quite successful until you get to the mo..............
    You should physically disconnect the drive cable before installing. It's not enough to disable it in BIOS because Linux can still detect and access it.

    Since you were going to replace sdb anyway, I suggest you don't muck with it anymore. Otherwise you will have to migrate any data you have on it later. As it is you will have to migrate /home off sda when you get your big disk for sdb.

    You might want to read up on the Unix/Linux concept of mounting filesystems, and how they form a tree. No addressing physical drives, it's all one tree. Try the rute guide to linux, search for rute guide linux.

  7. #7

    Default Re: Hey,, where's my C Drive?

    I had similar problems when I made the switch many years ago. It would still be wise to post the output of /etc/fstab.

    I have a hard time believing the Suse installer would put /usr on a separate hard drive unless the primary hard drive (/dev/sda) were too small to hold an entire system. But stranger things have happened. It's not exactly for newbies, but you can do custom disk partitioning from within the Suse installer. Simply tell Suse to put "/" on /dev/sda and /home/Toni on /dev/sdb. Then you can save all your raw camera images to a folder in /home/toni, like /home/toni/raw_camera_images.

    Or if you prefer not to make your home folder the entire second drive, you can simply make /dev/sdb mount onto a folder in your home folder (this is why the output of /etc/fstab would be helpful). Assuming there is a valid filesystem present on /dev/sdb, you could create a folder called 'raw' in your home folder and add the following line to /etc/fstab:

    /dev/sdb /home/toni/raw defaults,users 0 0

    Everything in Unix/Linux is a file. That was one of the hardest things to wrap my head around when I switched to Linux ten years ago. If you're stuck on physical devices, you could change /home/toni/raw to /mnt/drive_d. /mnt was the place where you mounted "external" devices like your CD or DVD drive, or a Zip drive. Nowadays those things are usually auto-mounted and are accessed in the /media folder. Still, /mnt can serve as a useful transitional bridge for former Windows users who miss accessing all their separate storage devices via C,D,E, "/etc."

  8. #8

    Default Re: Hey,, where's my C Drive?

    In linux there is no "C" drive, or any other windows terminology for labeling disk drives.
    But there is something simular, in linux primary drives are labeled HD/SD (Heard this means Hard drive/ Sata drive) A
    Secondary drives are usually labeled HD/SD B C and sofourth are usually CD drives, external hard drives, DVD drives etc.
    Then there are other things to consider like primary drives with numbers (SD/HDA1) these are partitions on the main drive, SD/HDA1 usually is root, SD/HDA3 is usually home
    SD/HDA5 is often Swap space.
    But this varies for each linux distro, in my case my CD/DVD drives are labeled SR0, 1 I assume SR means Sata removable or some **** like that.
    OpensSuse labels my primary drives as SDA, and CD/DVD drives as SR.

  9. #9
    Join Date
    Jun 2008
    Location
    UK; deep south, far below Watford.
    Posts
    275

    Default Re: Hey,, where's my C Drive?

    Quote Originally Posted by ken_yap View Post
    .... sdb will not be assigned to anything. To do anything with it, you have to go into the partitioner in YaST and you can mount the partitions on it, or rebuild the partitions.
    Aha! Now we get to the real issue: this is just what I guessed, looking at what happened when I put a 2nd hard disk into another Linux machine that I use. So, assuming I've got a basic install working with just /dev/sda - and all openSUSE placed there (obviously) - can I then do an equivalent of fdisk in YAST on dev/sdb, destroy its partition table (or whatever it's called), define and name a partition - say, FRED? But then how do I actually use FRED - surely I need a part of the file tree structure to be mounted there (or is it the other way round - FRED to be mounted on part of the tree structure?)?


    Since you were going to replace sdb anyway, I suggest you don't muck with it anymore. Otherwise you will have to migrate any data you have on it later. As it is you will have to migrate /home off sda when you get your big disk for sdb.
    Yes, quite correct. In fact, having discovered that one of my feet is bleeding from a bullet wound, I think I am going to bite said bullet (partly in a fit of pique) and start all over again, wiping both disks. This raises a question in my mind, on which I invite some advice:

    I'm now thinking of using the big SATA disk (from my Windows machine D drive) as sda, with / on it, because it will run a little quicker than my current PATA (133) 60 GB sda - because of transfer rate and because it has a much larger buffer. So my system will run a little quicker, both to start up and to load applications on demand. But 60 GB at /dev/sdb isn't going to hold my raw image files plus my collection of music snatched from FM broadcasts. Both of them are probably therefore going to have to be in /home/tony on /dev/sda. But I don't want 60 GB of sdb sitting there enjoying a nice quiet spin-free holiday. What part of the file system tree should I put on there, without defeating the idea of exploiting as much as possible of the fast SATA drive at /dev/sda?

    You might want to read up on the Unix/Linux concept of mounting filesystems, and how they form a tree. No addressing physical drives, it's all one tree. Try the rute guide to linux, search for rute guide linux.
    Excellent advice. Starting tonight.
    They said I wasn't fit to live with a pig; my brother stood up for me and said I was.

  10. #10
    Join Date
    Jun 2008
    Location
    UK; deep south, far below Watford.
    Posts
    275

    Default Re: Hey,, where's my C Drive?

    Quote Originally Posted by nalf38 View Post
    I had similar problems when I made the switch many years ago. It would still be wise to post the output of /etc/fstab.
    OK; this is what I have - I trust I have used the correct command (as user, not root):

    tony@LINEAR-1:~> cat /etc/fstab
    /dev/disk/by-id/ata-MAXTOR_4K040H2_672123866134-part5 swap swap defaults 0 0
    /dev/disk/by-id/ata-MAXTOR_4K040H2_672123866134-part1 / ext3 acl,user_xattr 1 1
    /dev/disk/by-id/ata-IC35L060AVV207-0_VNVB05G2R4SMZH-part1 /usr 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


    Comments?
    They said I wasn't fit to live with a pig; my brother stood up for me and said I was.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •