Tag Info

New answers tagged

0

A small program that waits for the X server to notify it about changed monitor configuration, and then executes a given command (e.g. the autorandr mentioned in another answer) is available at: https://bitbucket.org/portix/srandrd/overview This seems to be a cleaner solution that using udev (where you have to worry about finding the right X server etc.)


0

I guess people looking at this question are not those that want to use GNOME, and those that use GNOME wouldn’t have to look at this question, but in the interest of completeness: GNOME has this functionality built-in. If you change the setup via gnome-control-center, gnome-settings-daemon remembers it (in .config/monitors.xml) and automatically applies it ...


0

One fairly fundamental way in which these /dev/.da device files differ that has not yet been mentioned is that they represent different kernel major numbers. If you follow that link you will land on a kernel source documentation page containing a table of mostly all of the allocated device major numbers. This same file is also very likely on your harddisk ...


5

/dev/sdx and /dev/hdx are physical (hard) disk drives or emulated physical (hard) disk drives. When the kernel or some program I/O's to these, it does all sorts of things like bringing the disk to the right spot and doing all sorts of physical-specific "stuff." /dev/vdx is for virtual (hard) disk drives. All the kernel does when it is I/O'd to is tell the ...


3

In the udev rules in /lib/udev/rules.d/* is defined which kind of hardware gets which name from the kernel. See the rules for /dev/vd*: # partitions do not have hardware identifiers ENV{DEVTYPE}!="disk", GOTO="persistent_storage_not_a_disk" # nor do paravirtualized hard disks KERNEL=="vd*", ...


2

/dev/ is the part in the unix directory tree that contains all "device" files -- unix traditionally treats just about everything you can access as a file to read from or write to. So in essence, the /dev/sda is all device files found in your Harddrive while the /dev/vda is all device files found in the space allocated for your virtual machine.


10

They're different devices. /dev/sda is the first disk that's either SCSI or (more likely) providing the SCSI drive API to user land. This includes SATA drives and IDE drives using libata. This can also be an IDE/SATA/SCSI/etc. drive emulated by the hypervisor. /dev/vda is the first disk using the virtualization-aware disk driver. The performance should be ...


0

Regarding the script running twice. This occurs because the script run for the sdc and the sdc1 events. To fix, use a udev rule with ATTR{partition}. i.e. : ACTION=="add", SUBSYSTEM=="block", ATTR{partition}=="*", RUN+=...


1

At least in my case, the problem was that the address needs to be in lower case! So, in your case, change ATTRS{address}==”00:1F:20:76:41:30” to the following: ATTRS{address}==”00:1f:20:76:41:30” In case that doesn't do it, I'd double check the permissions. Also, udev should set a DEVNAME variable (among others) which you can use, so you don't really ...


0

Do you really care about the drive letter, or is your problem with mounting the filesystems on them correctly and consistently? If the latter is the case maybe use the UUID in /etc/fstab instead of a device entry. UUID can be found with blkid /dev/sd[a-z]* and regardless you may want to check the /dev/disk/by-id/ directory. I noticed that in my RHEL 6 ...


1

Use Persistent naming, instead of using /dev/sdX you can use /dev/disk/by-id/scsi-SATA_MODELNUMBER_XXXXXXXX


0

You should have a file at /etc/udev/rules.d/70-persistent-net.rules which contains a line similar to the following:- SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="04:01:07:ab:6e:01", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" Make a backup of this file (outside of the rules.d) and edit the original to:- ...



Top 50 recent answers are included