Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
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.
Won't Mount Second Hard Drive!
Ok, background information here:
I installed Mandriva 2006 yesterday, and spent today getting everything working. At the start, I had a 160GB HD used for storage (NTFS) and my C drive (NTFS). Of course, this meant that Mandrake couldn't write to either (I am constantly updating the contents of my storage drive, so I needed write access). So, I split the partition 75GB/75GB. I formatted the second half of the drive and made it ext3. Then I moved the contents of the NTFS partition to the ext3 and then formatted the NTFS part as ext3. So now the whole drive is formatted as ext3. Upon reboot, both partitions are loaded, along with my C drive...GREAT! Now I try to combine the two partitions, but start coming into problems. I move the data from the second half of the drive to the first half, format the second half and resize the first half to take up the whole Storage drive. So now hdb has one partition, hdb1. Files are stored correctly, accessible and writable. Everything seems to be good. I umount -a and then mount -a to attempt to remount all the drives. And I get nothing. the console says that they were mounted successfully, but upon looking in the Devices area, only my C drive is showing (hda1). Weird. So I do a mount /dev/hdb1 /mnt/win_c2 Mount tells me that 'special device hdb1 does not exist'. WEIRD. I open up DiskDrake and it says that hdb1 is mounted. Unmount, remount (via DiskDrake) and the drive is still not showing up in my devices area. Have I royally f*cked things here or what? My fstab is as follows:
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/hda5 / ext3 defaults 1 1
/dev/hda7 /home ext3 defaults 1 2
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0
/dev/hdd /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0
none /mnt/floppy supermount
dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,sync,codepage=850 0 0
/dev/hda1 /mnt/win_c ntfs umask=0,nls=iso8859-1,rw 0 0
/dev/hdb1 /mnt/win_c2 ext3 umask=0,nls=iso8859-1,rw 0 0
none /proc proc defaults 0 0 /dev/hda6 swap swap defaults 0 0
For now, I am accessing the files by going to /mnt/win_c2 and they are there and accessible. What does that mean?
Urgently awaiting help
Thanks
Kevin UPDATE: If I go to 'Storage Media' instead of Devices, my hard drive is listed there. GREAT! However, upon viewing its properties, I am told that the disk is only 75 GB. Opening up DiskDrake, I am told that the drive is made up of one huge partition, totalling around 155GB (which is indeed how large it should be). What is the deal here?
After you reboot, the partion information should show up correctly. It is probably caching the old partition information.
If you want to share that data between Windows & Linux, you should reformat it as FAT32. According to Microsoft, fat32 will support drives up to 2 terabytes, but XP won't create fat32 drives bigger than 32G (They want you to use NTFS), so you'll have to create the partition in linux using mkfs.vfat. You should be able to create it using the same method you described to back up your data and convert it to ext3.
The reason it doesn't show up in the Devices, is that it is now a native filesystem. Devices is for non-linux native file systems (CD/DVD, Windows file systems, removable media, etc).
After you reboot, the partion information should show up correctly. It is probably caching the old partition information.
If you want to share that data between Windows & Linux, you should reformat it as FAT32. According to Microsoft, fat32 will support drives up to 2 terabytes, but XP won't create fat32 drives bigger than 32G (They want you to use NTFS), so you'll have to create the partition in linux using mkfs.vfat. You should be able to create it using the same method you described to back up your data and convert it to ext3.
The reason it doesn't show up in the Devices, is that it is now a native filesystem. Devices is for non-linux native file systems (CD/DVD, Windows file systems, removable media, etc).
Thank you. I have no desire to share the data with windows systems. The drive is used for my private storage. Now that is very interesting that it doesn't show up in the devices area. I guess I learn something new every day huh :-) Are there any benefits or drawbacks to changing the format to fat32 instead of ext3?
Thanks for your reply.
Kevin
Also, why does mount tell me that special device hdb1 not exist? Is there a change I need to make to fstab here?
Kevin
Just as an update: I have rebooted, gone to media:/ and checked out the properties for my storage drive. It is still reporting that it is only 72.3 GB. This is really starting to bug me.
What did you use to resize the partition? It sounds like it didn't resize properly. From the command line, the first step would be to delete all the partitions on this drive using fdisk, then recreate the first partition with the same starting sector as it was before, just with a larger size. Then you use resize2fs to enlarge the actual file system. resize2fs will only enlarge or shrink the filesystem inside a partition, not redefine the partition size. Another option would be to convert it to reiserfs. This has the benefit of being able to resize the partition & filesystem on the fly. Read the man page on resize2fs ("man resize2fs").
The only real advantage to using fat32 would be sharing data between Linux & Windows on the same computer (has nothing to do with file sharing between computers or users). Disadvantages would be file ownership permissions (not a big deal in a single user environment).
If you are going to use the space exclusively for Linux, you might as well mount it permanently in a different location. If this is a single user system, you could just move all your other stuff under /home to this drive, then mount it as /home. Linux and Unix don't care about drive letters. Everything is a directory for them at the user level (as it should be). Use /mnt or /media for removable media devices or foreign media (NTFS or fat32 partitions).
I used parted to resize the drive. This is really turning into a nightmare. I'm not really getting what you're suggesting I do. Right now, /home is mounted on hda7, and has right at 50 gigs dedicated to it. I guess what you're saying it to mount hdb1 as /home and then use the rest of the space on hda as /? The sounds like a feasable plan. So what I need to do is this:?
Move files from hdb1 (since it seems that the partitions are messed up) to hda7 (plenty of storage on hda7 for my files).
Format hdb1 completely...erase everything, and make a new partition, ext3.
Move all files from hda7 to hdb1 (Including the /home/kevin linux files)
Combine hda6 with hda5 to increase the capacity of /
Mount hdb1 to /home
Right? I can handle the partitioning, formatting, and mounting of hdb1, but I really need to know exactly how to go about combining hda6 (/) and hda5 (/home) into one partition (/)
To start with, using parted was half of the solution. parted resized the partition, but the filesystem still needs to know that it is on a bigger partition. think of the partition as a pice of canvas, and the filesystem is the painting on the canvas. You can enlarge the painting by adding to the canvas, but the painting will be the same size until it is expanded to fill the added canvas.
To expand the filesystem, you now need to use resize2fs. To do this, you need to unmount the partition, then type "resize2fs -p /dev/hdb1" to resize the filesystem. It will automatically detect the partition size, and expand the filesystem to use it (the -p will give you a percent complete display). Unfortunately, it will only work on a non-mounted filesystem, so combining your / partition with your existing /home partition would be difficult without a live cd.
Basically, what resizing the filesystem does, is add more entries to the filesystem space allocation tables, which it uses to track which file owns each block on the drive. If you have the space, I'd do another reshuffle and get the drive running with the reiserfs, as the resizing steps can be done while the drive is in use. Hope this is more helpful.
You are absolutely awesome! I am learning so much here. I have plenty of space to move things, and have a knoppix CD. Think I could manage it without messing up too horribly? I'm really starting to understand partitioning. Might give it a go later tonight.
Thanks for all your help.
Kevin
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.