Linux - HardwareThis 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.
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.
I've been struggling with this one for a while - I have three SATA hard drives installed on my system:
/dev/sda - an 80 GB disk with three partitions, one NTFS for WinXP, one ext4 for Fedora 11 x86_64, and a boot partition
/dev/sdb - a 250 GB disk with one partition, ext4
/dev/sdc - a 250 GB disk with one partition, ntfs
I can mount any partition on /dev/sda without problems - everything works exactly as expected. Attempting to mount a partition from one of the other disks results in something like the following (this is for sdc1):
Code:
[User@machine ~]$ sudo mount -t ntfs /dev/sdc1 /mnt/shared
[sudo] password for User:
ntfs-3g: Failed to access volume '/dev/sdc1': No such file or directory
ntfs-3g 2009.11.14 integrated FUSE 27 - Third Generation NTFS Driver
XATTRS are on, POSIX ACLS are off
Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2009 Jean-Pierre Andre
Copyright (C) 2009 Erik Larsson
Usage: ntfs-3g [-o option[,...]] <device|image_file> <mount_point>
Options: ro (read-only mount), remove_hiberfile, uid=, gid=,
umask=, fmask=, dmask=, streams_interface=.
Please see the details in the manual (type: man ntfs-3g).
Example: ntfs-3g /dev/sda1 /mnt/windows
Ntfs-3g news, support and information: http://ntfs-3g.org
The /mnt/shared directory is created; the failed to access error is related to the disk.
Here is the output from fdisk:
Code:
[User@machine ~]$ sudo fdisk -l
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0f970f96
Device Boot Start End Blocks Id System
/dev/sdb1 1 30401 244196001 8e Linux LVM
Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1050104f
Device Boot Start End Blocks Id System
/dev/sdc1 1 30401 244196001 7 HPFS/NTFS
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8e538e53
Device Boot Start End Blocks Id System
/dev/sda1 1 6375 51200000 7 HPFS/NTFS
/dev/sda2 * 6375 6400 204800 83 Linux
/dev/sda3 6400 9729 26743361 8e Linux LVM
Disk /dev/dm-0: 21.4 GB, 21428699136 bytes
255 heads, 63 sectors/track, 2605 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 5955 MB, 5955911680 bytes
255 heads, 63 sectors/track, 724 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/dm-2: 250.0 GB, 250059348992 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0f970f96
Device Boot Start End Blocks Id System
/dev/dm-2p1 1 30401 244196001 8e Linux LVM
Disk /dev/dm-3: 250.0 GB, 250056705024 bytes
255 heads, 63 sectors/track, 30400 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-3 doesn't contain a valid partition table
And also from blkid (this does not match the output from above - but I don't know if this is actually related to the problem or how to fix it):
[User@machine ~]$ ls -al /dev/sd*
brw-rw----. 1 root disk 8, 0 2009-12-25 06:48 /dev/sda
brw-rw----. 1 root disk 8, 1 2009-12-26 14:52 /dev/sda1
brw-rw----. 1 root disk 8, 2 2009-12-25 11:48 /dev/sda2
brw-rw----. 1 root disk 8, 3 2009-12-25 06:48 /dev/sda3
brw-rw----. 1 root disk 8, 16 2009-12-25 06:48 /dev/sdb
brw-rw----. 1 root disk 8, 32 2009-12-25 06:48 /dev/sdc
sdb may or may not be partitioned - I've been having different issues with that - but I'm sure that sdc is partition correctly as I can access it from WinXP.
It doesn't seem that my system recognizes /proc/partitions:
Code:
[User@machine ~]$ /proc/partitions
bash: /proc/partitions: Permission denied
[User@machine~]$ sudo /proc/partitions
[sudo] password for User:
sudo: /proc/partitions: command not found
[User@machine~]$ cd /proc/partitions
bash: cd: /proc/partitions: Not a directory
I'll do some hunting and try to get this one working...
Thanks,
Kerry
Last edited by ETCKerry; 12-29-2009 at 10:35 AM.
Reason: missing spaces
Just reading over this I see the following. You have tried mounting /dev/sdc1? but from everything I see sdc1 doesn't exist, but sdc does.
Try this instead
Code:
sudo mount -t ntfs /dev/sdc /mnt/shared
I would not recommend this. Mounting /dev/sdc (if his system allows this) would completely bypass any partitioning on that hard drive and would like make it unreadable by WinXP. He needs to get his linux to see and show one or more /dev/sdbX and /dev/sdcX, where X is a single digit number.
[User@machine~]$ ls -al /dev/sd*
brw-rw----. 1 root disk 8, 0 2009-12-25 06:48 /dev/sda
brw-rw----. 1 root disk 8, 1 2009-12-26 14:52 /dev/sda1
brw-rw----. 1 root disk 8, 2 2009-12-25 11:48 /dev/sda2
brw-rw----. 1 root disk 8, 3 2009-12-25 06:48 /dev/sda3
brw-rw----. 1 root disk 8, 16 2009-12-25 06:48 /dev/sdb
brw-rw----. 1 root disk 8, 32 2009-12-25 06:48 /dev/sdc
sdb may or may not be partitioned - I've been having different issues with that - but I'm sure that sdc is partition correctly as I can access it from WinXP.
Thanks,
Kerry
A couple more questions: (1) what other storage devices are connected to your computer in addition to the 3 SATA hard drives and how are they connected to your computer?; (2) what OS was used to partition the "sdc" hard drive?
I tried this before reading xode's post, so this is what I get (in case it helps), but I don't want to make it unreadable by XP.
Code:
[User@machine ~]$ sudo mount -t ntfs /dev/sdc /mnt/shared
[sudo] password for User:
NTFS signature is missing.
Failed to mount '/dev/sdc': Invalid argument
The device '/dev/sdc' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
This does seem to indicate that I should be using sdc instead of sdc1, though. Strangely enough when I try to mount sdb, I get this:
Code:
[User@machine mnt]$ sudo mount -t ext4 /dev/sdb /mnt/data
mount: /dev/sdb already mounted or /mnt/data busy
I don't think /mnt/data is busy - if sdb is mounted, how can I figure out where it is? It's not in fstab.
In addition to the SATA hard drives, I have one SATA DVD burner, and all four devices are connected directly to the motherboard's SATA ports. sdc was partitioned in XP. There is nothing on sdb, so if it would be helpful to format/partition that to do some experimenting, that's fine with me. Obviously that one is ext4 so I partitioned that one with Linux.
The contents of fstab (which was indeed generated when Linux was installed):
Code:
#
# /etc/fstab
# Created by anaconda on Thu Nov 12 19:10:04 2009
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or vol_id(8) for more info
#
UUID=811bf259-33d5-4db2-9851-e93b47dcbcc8 /boot ext3 de faults 1 2
/dev/mapper/vg_machine-lv_root / ext4 defaults 1 1
/dev/mapper/vg_machine-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
#devpts options modified by setup update to fix #515521 ugly way
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
I'm not intentionally using encryption or LVM, although I believe this is something that Fedora 11 might use by default? I have definitely seen LVM mentioned (see output of fdisk -l in first post - sdb1 and sda3 use Linux LVM).
I scanned through "dmesg | less". Not really sure what I'm looking for, but these lines referred to the SATA devices (sorry - this is a little lengthy):
Code:
ata1: SATA max UDMA/133 irq_stat 0x00000040, connection status changed irq 26
ata2: SATA max UDMA/133 irq_stat 0x00000040, connection status changed irq 26
ata3: SATA max UDMA/133 irq_stat 0x00000040, connection status changed irq 26
ata4: SATA max UDMA/133 irq_stat 0x00000040, connection status changed irq 26
ata5: SATA max UDMA/133 abar m8192@0xfae76000 port 0xfae76300 irq 26
ata6: SATA max UDMA/133 abar m8192@0xfae76000 port 0xfae76380 irq 26
...
ata5: SATA link down (SStatus 0 SControl 300)
ata6: SATA link down (SStatus 0 SControl 300)
...
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.00: ATA-8: WDC WD800AAJS-19M0A0, 01.03E01, max UDMA/133
ata1.00: 156301488 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access ATA WDC WD800AAJS-19 01.0 PQ: 0 ANSI: 5
sd 0:0:0:0: Attached scsi generic sg0 type 0
ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-8: WDC WD2500AAJS-00L7A0, 01.03E01, max UDMA/133
ata2.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata3.00: ATA-8: WDC WD2500AAJS-00L7A0, 01.03E01, max UDMA/133
ata3.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access ATA WDC WD2500AAJS-0 01.0 PQ: 0 ANSI: 5
sd 1:0:0:0: Attached scsi generic sg1 type 0
sd 1:0:0:0: [sdb] 488397168 512-byte hardware sectors: (250 GB/232 GiB)
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb:<6>ata3.00: configured for UDMA/133
scsi 2:0:0:0: Direct-Access ATA WDC WD2500AAJS-0 01.0 PQ: 0 ANSI: 5
sd 2:0:0:0: Attached scsi generic sg2 type 0
sd 2:0:0:0: [sdc] 488397168 512-byte hardware sectors: (250 GB/232 GiB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdc: sdc1
sd 0:0:0:0: [sda] 156301488 512-byte hardware sectors: (80.0 GB/74.5 GiB)
sd 2:0:0:0: [sdc] Attached SCSI disk
sdb1
sd 0:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sdb] Attached SCSI disk
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda:<6>ata4.00: ATAPI: ATAPI iHAS124 Y, BL0W, max UDMA/100
ata4.00: configured for UDMA/100
scsi 3:0:0:0: CD-ROM ATAPI iHAS124 Y BL0W PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.20
sr 3:0:0:0: Attached scsi CD-ROM sr0
sr 3:0:0:0: Attached scsi generic sg3 type 5
sda1 sda2 sda3
sd 0:0:0:0: [sda] Attached SCSI disk
...
ata6: SATA link down (SStatus 0 SControl 300)
ata5: SATA link down (SStatus 0 SControl 300)
...
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata3.00: configured for UDMA/133
ata2.00: configured for UDMA/133
ata1.00: configured for UDMA/133
ata4.00: configured for UDMA/100
sd 0:0:0:0: [sda] Starting disk
sd 1:0:0:0: [sdb] Starting disk
sd 2:0:0:0: [sdc] Starting disk
You are using lvm2, and probably created logical volumes in a volume group.
You can use pvscan to scan for physical volumes. Lvscan will scan for logical volumes. They should give you a picture of which physical partitions are used to composed the volume group. A volume group is similar disk device and has partitions known as logical volumes. The two levels of abstraction add flexibility, allowing you to for example create a partition larger than a drive, and also growing the lvm volume size.
Pay attention to the vg_machine-lv_root volume group. It probably is made up of your sdb and sdc drives.
How can I tell for sure if sdb and sdc are already included in a logical volume group? I ran lvscan and pvscan, but it seems to indicate that they are not in a volume group (only sda3 comes up with pvscan):
Code:
[User@machine ~]$ sudo pvscan
[sudo] password for User:
PV /dev/sda3 VG vg_machine lvm2 [25.50 GB / 0 free]
Total: 1 [25.50 GB] / in use: 1 [25.50 GB] / in no VG: 0 [0 ]
[User@machine ~]$ sudo lvscan
ACTIVE '/dev/vg_machine/lv_root' [19.96 GB] inherit
ACTIVE '/dev/vg_machine/lv_swap' [5.55 GB] inherit
Even after successfully mounting sda1, it does not show up with a pvscan:
Code:
[User@machine ~]$ sudo mount -t ntfs /dev/sda1 /mnt/XPsys
[User@machine ~]$ sudo pvscan
PV /dev/sda3 VG vg_machine lvm2 [25.50 GB / 0 free]
Total: 1 [25.50 GB] / in use: 1 [25.50 GB] / in no VG: 0 [0 ]
I tried to follow step-by-step with the information here to delete and re-create the partition on sdb, but when I try pvcreate, I get this:
I don't think it's mounted, because this was immediately following a re-write of the partition table. They have you use pvdisplay to show physical volumes, and it seems to match the pvscan output (even this is after mounting sda1):
Code:
[User@machine ~]$ sudo pvdisplay
--- Physical volume ---
PV Name /dev/sda3
VG Name vg_machine
PV Size 25.50 GB / not usable 577.00 KB
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 6529
Free PE 0
Allocated PE 6529
PV UUID U3AJLH-Lhm1-b0lf-HDX9-ZK1V-ezqU-sb0YGQ
So how do I tell if a volume group contains the sdb and sdc disks? And how do I access them if they are included?
I appreciate all of the help so far - I'm learning a lot as I'm relatively new to Linux.
I found some more information about LVM troubleshooting hereand here, but haven't had much success. I thought I'd post some more information in case it is helpful.
Code:
[User@machine ~]$ sudo vgreduce vg_machine /dev/sdb
Physical Volume "/dev/sdb" not found in Volume Group "vg_machine"
[User@machine ~]$ sudo vgreduce vg_machine /dev/sdb1
Physical Volume "/dev/sdb1" not found in Volume Group "vg_machine"
[User@machine ~]$ sudo vgreduce vg_machine /dev/sdc
Physical Volume "/dev/sdc" not found in Volume Group "vg_machine"
[User@machine ~]$ sudo vgreduce vg_machine /dev/sdc1
Physical Volume "/dev/sdc1" not found in Volume Group "vg_machine"
I also tried to make a filesystem on sdb1, but that also told me that sdb was already in use. Immediately prior to this, I deleted the partition on sdb, rebooted, then recreated the partition. pvcreate issed the same error shown in my previous post, and mkfs showed this:
Code:
[User@machine ~]$ sudo mkfs -t ext4 /dev/sdb1
mke2fs 1.41.4 (27-Jan-2009)
/dev/sdb1 is apparently in use by the system; will not make a filesystem here!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.