|scan hd script
|Page 1 of 1|
|Author:||wpsd [ Sun Aug 23, 2009 8:56 pm ]|
|Post subject:||scan hd script|
How do I check which mount point a portable harddisk using the ID ? is there a way do this in bash shell script
I know I can find the harddisk using their vendor product id like this "lsusb -d [vendor:product]"
can i find the harddisk mount point using the vendor product id ?
It's for backing up purpose the ftp is not my option because internet so slow and we need to backup 10 more gigs
so I will bring a portable usb Harddisk plug it in in the server
and on plug in the server will check that this is the harddisk for backup or not ( using vendor product id that define in the sh script )
if it's different than do not backup, but if it's the same
copy the data from server to harddisk ( here i need to know where's the mount point otherwise how do i copy it over ? )
and umount the partition on finish copying the file
I'm still newbie here and I only manage to find the lsusb -d, the rest kind of blank.....
|Author:||fredrik.eriksson [ Mon Aug 24, 2009 1:32 am ]|
|Post subject:||Re: scan hd script|
Well the device name shouldn't change unless you forcefully remove it, meaning you don't umount it.
Otherwise it should assume the same device name (eg. /dev/sdb and /dev/sdb1).
An fstab entry can make sure that it mounts properly.
(I don't have a linux box close by so can't check what the output of lsusb -d is so if my above solution isn't any good i'll check on it when i have time)
|Page 1 of 1||All times are UTC - 6 hours|
|© 2000, 2002, 2005, 2007 phpBB Group • http://www.phpbb.com|