|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Programming & Scripting A place to discuss website design, programming, shell scripts, etc |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi all.
We do our nightly backups to USB hard disks, at the moment the disks have 4 partitions on them, one for / of the server, one for our main internal network drive, one for our SVN tree and one for the backup of data from the workstations on the network. with Suse 9.2 things were OK, the disks would mount in /media/usb-Y64X5T7E:0:0:0p6 (using the serial of the disk, and the pX for the partition) and this was then linked to /backup/{day}/{partition} with going to suse 10.3, all our backup disks mount as /media/disk /media/disk-1 /media/disk-2 /media/disk-3 Given all of the disks mount to the same place, from the other side of the office I can never tell which disk is plugged in, and users that grab files off their backups (which happens a supprising amount of times) don't know which disk is on either. I used fstab with the UUID to mount the disk in /backup/{day}/{partition} - this work very well, for a week.... but because we format the partition every night, the UUID changes, so week 2, backups failed because the disk wasn't mounted (the backup script handles the mounting of devices) round 2 of this was to play with udev, I've snipped all of this so only Monday's disk shows first off I added this line to my udev rules: Code:
SUBSYSTEM=="block", ATTRS{serial}=="Y691M9GE", NAME="monday"
Code:
SUBSYSTEM=="block", ATTRS{serial}=="Y691M9GE", NAME="monday" OPTIONS+="all_partitions"
this was OK, because at least I could access the partitions on the disk, then I modified fstab to look like the following: Code:
#Monday# /dev/monday5 /backup/monday/toplevel************ext2****noauto,defaults,users** 0 0 /dev/monday6 /backup/monday/devt****************ext2****noauto,defaults,users** 0 0 /dev/monday7 /backup/monday/pcs**************** ext2****noauto,defaults,users** 0 0 /dev/monday8 /backup/monday/svn**************** ext2****noauto,defaults,users** 0 0 all of this has been working fine, and still is, apart from the fact that the "devt" part of the disk is almost full, so I went to re-partition the disk, I figured I could script this so the backup system partitions the disk to the size it needs for all the information it's going to put on it, after getting the script tested on my local machine with a test USB disk, I ran fdisk on /dev/monday back on the server - and it saw no partitions... running "parted -l" to list all the devices, it picks up all the SCSI disks in the server, but not the USB Backup Disk. I'm guessing this is a problem with the udev rule, but I'm a bit lost as to what to do now, I could manually re-partition each disk we use for backups on my workstation, but if I could get this build into the backup script, I won't even have to blink when we upgrade the disks, or replace a disk, all I'll have to change is a Disk serial number somewhere, and it carries on. any help on this issue would be really appreciated, and hopefully before we use the last 7GB on the devt partition. Thanks in advanced. Jason |
|
|||
|
Just a guess... Have you made sure this rule gets processed early? Maybe use udevtest to check the operation of the rule. Udev testing how to.
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|