From mboxrd@z Thu Jan 1 00:00:00 1970 From: "T. Horsnell" Date: Tue, 12 Dec 2006 17:51:33 +0000 Subject: Re: disk/by-label + label-change Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org >On 12/12/06, T. Horsnell wrote: >> If a disk with a persistence-entry in /dev/disk/by-label >> is re-labelled with tune2fs, the by-label entry isnt >> updated to match the new label and when the disk is mounted >> with a 'mount -L ', > >You are writing to a raw sector of the disk, no part of the system >will notice that you did this and have changed something. You need to >tell the kernel to emit an event by doing: > echo "add" > /sys/block/sda/uevent >and the link will get updated. OK, thanks. But shouldnt tune2fs do this when it updates the label? I guess I should make my own tune2fs script and do it there. > >> the mounted-device shows up as something >> like: >> >> [root@dev1 ~]# mount >> /dev/hdb2 on / type ext3 (rw) >> proc on /proc type proc (rw) >> sysfs on /sys type sysfs (rw) >> devpts on /dev/pts type devpts (rw,gid=3D5,modeb0) >> tmpfs on /dev/shm type tmpfs (rw) >> none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) >> sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) >> >>>> /dev/.tmp-8-17 on /test type ext3 (rw) >> >> Is this as it should be? > >Looks like you mounted the device with a PROGRAM rule, right? This is >definitely not what it "should be". :) I do no mounting in udev, its all in fstab. I never thought to do it in a udev PROGRAM rule... I'm experimenting with stuff at the moment, prior to setting up a set of rules for my production box. I currently use things like echo "scsi add-single-device BUSNO 0 UNITNO 0" > /proc/scsi/scsi echo "scsi remove-single-device BUSNO 0 UNITNO 0" > /proc/scsi/scsi in conjunction with a site-specific rules file to play with individual scsi disks on a running system. I mounted it with: mount -L whatever /test Cheers, Terry ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel