I am developing for a Linux based device for which the HOT PLUG option is deactivated. As part of optimizing the code, we also don't want to create device files for unused devices. We understand that both USB attached and fixec SCSI hard disks would create device files like /dev/sda,/dev/sda1 /dev/sdb, /dev/sdb1 etc. Is this understanding correct?
In the case of USB attached SCSI devices, would driver create this device file entry? How is it created? Can somebody please tell me how it is being created automatically. In case I attach a fixed SCSI hard disk before boot up(and create device file /dev/sda1), would USB SCSI device driver create device files starting from /dev/sdb, automatically.
In my understanding, the way /proc/scsi/scsi gets populated, /proc/paritions also gets populated in the same fashion. i.e. the description for first entry of /proc/scsi/scsi can be seen in the first entry of /proc/partitions and same for rest.
So, With this assumption, in my project, I used to relate first entry of /proc/scsi/scsi with first entry of /proc/partitions to get its total size and same for all entries.
But, I observed some differences in following scenario, where
1) The first 4 entries in /proc/scsi/scsi are SAN luns attached to my system and for which the actual device names in /dev/ are sda,sdb,sdc and sdd.
2) The last 4 entries are the internal HDDs on same system. In /dev/, their respective device names are sde,sdf,sdg & sdh.
(Output attached at end of the thread)
But in /proc/partitions, the device order is different.
You can see their respective sizes in /proc/partition output as well.
So, my question is, in this particular scenario, I can't relate the first entry of /proc/scsi/scsi with first entry of /proc/partition. i.e. scsi0:00:00:00 is not /dev/sde, because it is actually /dev/sda.
It seems that my assumption is wrong in this scenario.
Is there any way or mechanism to figure out actual device name for an entry in /proc/scsi/scsi in /dev/ directory?
How can my application should relate /proc/scsi/scsi entries with their respective device names and sizes?
I did an installation of SUSE 11.2 on a new SCSI hard drive. Keeping the old hard drive separate. I remembered there was some info on the old hard drive I wanted.
I added this to the system and mounted a partition. I then copied the data over. Then I umounted the partition rebooted the machine and removed the hard drive. However the machine will now not boot without this hard drive even though its not mounted. Not sure what the error message im given means I think it could be trying to fchk it.Do I need to do something more like remove /dev/sdd ?
Since May 12,2009. Our system lifekeeper has the error log "lifekeeper error: DEVICE FAILURE on SCSI device '/dev/add'", but it ran normally. Until last week, it failover to the standby server. The disk still running, the error still come out.
What I have 1- 1TB HDD. "has 2 partitions" 1.1- Data1 250GB NTFS. 1.2- Data2 750GB EXT4. "Content 4 folders" 1.2.1- Documents. 1.2.2- Music. 1.2.3- Pictures. 1.2.4- Videos.
2- Laptops with Ubuntu 10.10 Desktop 32bit. "I have 3 laptops" 2.1- TV-laptop."I connect to it TV, sound system and 1TB HDD" 2.2- MY-laptop. 2.3- MyWife-laptop.
What I Done so far is that: 1- I connect my 1TB HDD to TV-laptop. 2- I configure Samba on TV-laptop. "Add Samba share"
2.1- basic (/media/Data1,data1,,writable,visible) access(allow access to everyone). 2.2- basic (/media/Data2/Documents,documents,,writable,visible) access (allow access to everyone). 2.3- basic (/media/Data2/Music,music,,writable,visible access(allow access to everyone). 2.4- basic (/media/Data2/Pictures,pictures,,writable,visible) access(allow access to everyone). 2.5- basic (/media/Data2/Videos,videos,,writable,visible) access(allow access to everyone).
What I want is that: 1- I want to mount 1TB HDD to all laptops via network "Wireless" automatically when I connect 1TB HDD to TV-laptop. 2- I want all laptops to save data to 1TB HDD. such as all laptops Docs will be in Data2/Documents and so on. 3- I want the laptops synchronize the data. 4- I want some application add data from 1TB HDD such as Rhythmbox.
I am running the latest Ubuntu on a partition with windows 7 as my main OS. I got my wireless drivers installed and it seems to pick up on all the wireless networks, whenever i try to connect to mine it tires and then fails and asks for the password again, even though its definatly the right password for my wireless.
I am also having trouble connecting to my external hard drive, i am completely new with Linux and would appreshiate -retard proof- tutorials if you need me to run anything, and such. Its fully updated and drivers are up to date (apparently) so i cant understand what is wrong.
My friend has a Windows 7 desktop with a large data hard drive which is set up to allow other users to connect to remotely, such that they have read and write access. To set up a connection from another Windows machine, it is as simple as right clicking in the My Computer window and selecting "New Network Connection", then entering the information requested.
The information my friend as given me is: - The IP Address - The Hard Drive's Name - A Username and Password
I bought a WD My Book World Network Hard drive and are trying to connect it. I am using Suse 11.2 and have it connect wired through a Netgear WGR614 router.I believe I can use Samba?It is working under Windows and it connected as network drive.
I have a seagate SATA hard drive that was running a mythtv distro. It had 3 partitions, EXT3, swap, and XFS. I started having I/O errors on boot and saw error messages on both the EXT3 and the XFS partitions. I also heard some clunking sounds on the drive when it was reading, so I thought hell, the drive is dead.
I have since replaced the drive and everything is back up and running on the replacement drive. I thought hell, the seagate drive is toast, but I just want to verify it with some sort of tool. I have the hard drive in a Vantec NexStar external hard drive case (SATA->USB) and found there was a tool called badblocks. Ran badblocks on it, which ran for 24ish hours and found no bad blocks. I also didn't notice any clunking sounds while it was running.
I ran Code: badblocks -n -v /dev/sdb Is badblocks a proper test to run on external hard drives or was I just wasting my time? Is there any way that I can really test it without removing it and connecting it with SATA to the motherboard?
Now that we got that out of the way, here's the problem and I hope someone can help me. Before posting, I read everything I could find here about partitioning in gparted (at least what I think applied to my situation). I'm pretty sure that this has an easy answer (or I hope it does).
I originally installed Ubuntu 10.10 on a USB stick to try and retrieve files from a failed NAS drive. That worked pretty well a very smart guy who posted instructions on how to do the hex editing necessary to realign and enter a reiserfs disk) so I decided I'd jump in and play with Ubuntu. I decided to port my USB install to an 80GB USB drive I had kicking around, but the install didn't actually take the whole disk the way I thought it would, it only took the 7.xGB from the USB drive.
I didn't notice (I know, dumb) and then I did the 11.04 upgrade to it. I'm trying to recapture the other 65GB of unused space via gparted, but I can't for the life of me figure out how to extend the original boot partition (I have no /home partition). i tried to format the unused space to ext4, but no matter what i do I can't expand that original partition (I can shrink it if that matters). Just to be clear, I booted from a live cd 10.10, and I'm running gparted on the unmounted USB drive. The boot partition should not be active.
My screen shots capability is not working correctly right now, but I'll post one if I can. I can only get a full screen shot, and this is on a 30" monitor.. I just want the active window the /dev/sdj1 partition is on the left (7.11GiB) witha boot flag, then the Ext/Swap at 377MiB each /dev/sdj2 and 5) and then another 68,85 GiB partition, currently formatted to Ext4 on the right labeled /dev/sdj3. No other partitions. I can extend the Ext/swap, but not the boot partition.
I am setting up a Linux laptop for my parents, and want to also create some backup scripts to allow them to easily back up to an external hard drive. [And for them to be able to use it, it has to be super simple.]
For security purposes (should the external drive ever get lost or stolen), I want to encrypt the entire device using TrueCrypt. That means my scripts will have to use TrueCrypt to mount the backup volume using the device name. [Right?]
Now to the actual question(s): 1) Is there a way to ensure that an external hard drive will ALWAYS be assigned the same device name when plugged in? [That would be the simplest solution for me.]
2) Alternatively, is there a way (using bash scripting) to "find" the device name of a particular external hard drive, even if it might not be known in advance.
I am using software RAID in Ubuntu Server Edition 9.10 to mirror(RAID1) two 1TB harddrives. These are used for data storage and websites.I also have a 80GB harddrive for the operatigsystem. This drive has no backup or RAID at all. Should this drive crash and the system therefore to become no longer bootable, will I be able to recover the data the 1TB drives or should I backup the 80GB drive as well?
This isnt a linux related question as such, but I'd still like to ask.
I have purchased a 1tb external usb hard drive, which came with its own power supply, and the HD device is connected to the power mains 24/7.
However, there is no on/off switch on the actual device, and I dont want to have it permantly connected to my computer, perhaps only for an hour or so everyday.
Could I harm the usb HD by regularly pullling its usb cable from the computer usb port? (ofcourse I would unmount it first).
Any basic description of how linux assigns drive letters? I understand that a drive letter assignment is not static. If I add a drive between /dev/sda and /dev/sdb, my /dev/sdb will become /dev/sdc and the new drive will become /dev/sdb. I have a hot swap tray and have come into some unexpected behavior. I removed /dev/sde from the hot swap tray and then loaded another drive into this same tray. When I mounted the new drive with options in fstab, it wouldn't mount because the new drive was /dev/sdf, not /dev/sde. Apparently, linux is looking at the id of the drive in addition to it's place in the BIOS chain.
My fstab entry is: /dev/sde /backups auto noauto,rw,noexec,async,user 0 0 I was avoiding using UUIDs in the fstab so that new HDDs would not have to be "registered" in the fstab prior to use. Is there a way to tell linux (or fstab) whatever drive is plugged into SATA channel X mount to /mountpoint?
I got a sort of usb connected device(not an external enclosure) so i can connect a sata hard drive into a machine that only has ide connections but the drive is not mounting. I am not very good at mounting slave hard drives anyway ,,,,never been able to get one happening without help. I am wanting to read this drive as i killed another desktop machine(i think the mb) and i need the data off the hard drive. The drive is shown in a directory and in the media directory. Can't think of what else sorry as i am so tired from testing everything out of the machine that i killed.....
One of my servers contains two scsi enclosures. After hot removing a disk and hot adding another the new disk gets assigned a device file but the enclosure (in sysfs) doesn't want to see it.
How can I force the enclosure to recognise the hot added disk.
Situation in sysfs:
The link device is dead after hot removing the device and keeps vanished after hot adding the new device. The hot added device gets assigned a device file and it is reachable. Even
I am attaching a LTO-3 tape drivce into my RHEL5 linux machine. Every time i used to restart my machine to detect the tape drive is there any way to rescan the buses to detect the newly attached scsi devices. In solaris "devfsadm" and "iostat" is there. I need the same kind of thing in linux.
I have a Linux application(ProMAX 5000) running in a virtual Machine on my windows OS. I am using an external Hard drive of 250G in ext2 file system as my device for large data read, write & execute file system. I have already mounted the device from /etc/fstab. But i want my application to access this device as a Primary data storage device OR Secondary storage device. What command will i invoke to partition this 250G drive as my primary or secondary storage device.
I created a new disk on our scsi san. I then ran the following command: echo "- - -" > /sys/class/scsi_host/host1/scan. did that command for each host. and in dmesg, it shows it found a device /dev/sdg. but when i do a fdisk -l. It never lists /dev/sdg. I just did this other day on another server and it worked fine like that. This is RH 4.8.
The external hard drive which contains all my photos and where I backed-up all my important documents is no longer recognized. It is a three month old 500GB Iomage Prestige Desktop Hard Drive.When I plug it in, it is recognised as a USB device, because it shows up when I type lsusb, but dmesg gives this error message.
[19712.013250] usb 2-2: new high speed USB device using ehci_hcd and address 21 [19712.145347] usb 2-2: configuration #1 chosen from 1 choice [19712.147214] scsi25 : SCSI emulation for USB Mass Storage devices
[code]....
I popped the disk out of the casing put it on a SATA connect internally and then tried the file recovery programs testdisk/photorec and SpinRite, but both failed because they couldn't recognize the external hard disk.
2. lsscsi output -I installed lsscsi and here is the output: Code: Select all# lsscsi --device [0:0:0:0] cd/dvd LITEON CD-ROM LTN485S JKF1 /dev/sr0 [2:0:0:0] disk HP Net Mirror V1.0 /dev/sda [2:2:0:0] disk HP 9.10GB C 80-P94N P94N - [2:2:1:0] disk HP 9.10GB C 80-P94N P94N -
[Code] ....
3. force scsi scan -I tried to use this command to force a rescan for the hdds, but nothing happened: Code: Select allecho "- - -" > /sys/class/scsi_host/host3/scan
-no errors, but log says nothing -tried the above with host0 - 4, same result
4. fdisk -l Code: Select all# fdisk -l
Disk /dev/sda: 9098 MB, 9098887168 bytes 255 heads, 63 sectors/track, 1106 cylinders, total 17771264 sectors Units = sectors of 1 * 512 = 512 bytes
[Code] ....
5. tried to specifically add one device but it didn't work: Code: Select all# echo "scsi add-single-device 2 2 8 0" > /proc/scsi/scsi -bash: /proc/scsi/scsi: No such file or directory
I am trying to install Ubuntu to an external usb hard drive (WD Elements SE). I am also choosing to install the grub bootloader to this disk (/dev/sdb) because I do not want anything modified on the internal drive. The installation appears to go okay, but when I try to boot to the usb drive, I get the error, "no boot sector on usb device" and it immediately falls back to my interal drive. I have tried this installation with both 10.10 (amd64) and 11.04 (amd64). How can I fix this?
I got a dell inspiron 1501 laptop with a 80Gb sata drive what is the best solution to add data storage space for someone that love to have multiples operating systems at hand Note: I use mostly linux so I won't need to change my laptop for many years maybe ...
i m facing same error in most of the HCL servers. the problem is that it throws error while booting and sometimes not throws error. the error is :-
Feb 13 13:17:25 fe13s kernel: Adapter 0: Bus A: The SCSI controller was reset due to SCSI BUS noise or an invalid signal. Check cables, termination, termpower, LVDS operation, etc.
Feb 13 13:17:30 fe13s kernel: Adapter 0: Bus B: The SCSI controller successfully recovered from a SCSI BUS issue. The issue may still be present on the BUS. Check cables, termination, termpower, LVDS operation, etc
Feb 13 13:29:15 fe13s kernel: Adapter 0: Bus B: The SCSI controller successfully recovered from a SCSI BUS issue. The issue may still be present on the BUS. Check cables, termination, termpower, LVDS operation, etc code....
When I enter "cat /proc/scsi/scsi" I'm returned with "cat: /proc/scsi/scsi: No such file or directory". I've tried this on two different installs on two different machines.