I am working on a linux OS based device and writing a script to mount the USB Most of my working devices are having Filesystem with "/dev/sdb1" and I could mount them to the USB using a script. (as below)
Filesystem Size Used Available Use% Mounted on
tmpfs 1.0G 82.5M 987.3M 8% /tmp
tmpfs 1.0G 8.0K 1.0G 0% /dev/shm
tmpfs 1.0G 0 1.0G 0% /mnt
/dev/mmcblk0p2 5.4G 48.3M 5.1G 1% /mnt/ffs
/dev/mmcblk0p1 487.9M 432.0K 451.7M 0% /mnt/ffs/permanent
/dev/sda1 923.8G 23.9G 899.8G 3% /mnt/hd
/dev/sda2 4.5G 261.3M 4.2G 6% /mnt/data
/dev/loop0 19.6G 407.8M 19.1G 2% /mnt/logstorage
/dev/loop0 19.6G 407.8M 19.1G 2% /log
But lately, I've noticed one of these devices got diff label as indicated below
~ # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 1.0G 61.7M 1008.1M 6% /tmp
tmpfs 1.0G 8.0K 1.0G 0% /dev/shm
tmpfs 1.0G 0 1.0G 0% /mnt
/dev/mmcblk0p2 5.4G 210.7M 4.9G 4% /mnt/ffs
/dev/mmcblk0p1 487.9M 432.0K 451.7M 0% /mnt/ffs/permanent
**/dev/sdb1 923.8G 20.0G 903.8G 2% /mnt/hd**
**/dev/sdb2 4.5G 219.2M 4.3G 5% /mnt/data**
/dev/loop0 19.6G 110.5M 19.4G 1% /mnt/logstorage
/dev/loop0 19.6G 110.5M 19.4G 1% /log
Is there any way to rename the file systems names to the prior stated (i.e. change or rename /dev/sdb1 and /dev/sdb2 to /dev/sda1 and /dev/sda2)?
I've tried checking /etc/fstab, but there is no such file in the device. What else I could do here? Please advise
sdb
, that means there is something else already mounted assda
.