On Wed 12 Dec 2012 01:44:01 PM CST, stumacgee wrote:

Need some command line help. Simple request really. I want to perform
the operation of adding new disk into SLES 11 SP1. Thereafter
partitioning the whole disk and giving it a label and use this as the
mount option in /etc/fstab. And do it all from the command line.
These are my steps and what results with

1. Add disk hardware to the server OS and display the hardware

# dmesg | tail -100 | grep Attached
# fdisk -l

2. Create a partition using the whole disk as partition 1

# fdisk /dev/sdx

3. Make a filesystem and label it at the same time and do not
reserve any blocks for superuser (-m)

# mkfs -t ext3 -L sapdatan /dev/sdx1 -m 0

4. Create a directory to mount the filesystem on

# mkdir /oracle/SID/sapdatan

5. Edit /etc/fstab and put the entry

LABEL=sapdatan /oracle/SID/sapdatan ext3
acl,user_xattr 1 2

6. Mount the filesystem

# mount -t ext3 LABEL=sapdatan /oracle/SID/sapdatan

root> mount /oracle/SID/sapdatan
mount: special device LABEL=sapdatan does not exist

At this point I have checked /dev/disk/by-label/ and there exists no
symlink entry for sapdatan, of which I would expect for this to work. So
what is populating this device tree structure and how to do at the CLI.

root> blkid
The output of this command shows that the device has LABEL=sapdatan

root> tune2fs -l /dev/sdx1
This shows that the filesystem volume name field : sapdatan

root> findfs LABEL=sapdatan
This command returns that its unable to find also.

How can I complete this at the command line so I can mount the
filesystem by label.

I have to resort to using the partitioner GUI to get this final piece
done. Pain.

Is it to do with running "udevadm trigger" command and if so what
options should I use?

Mount via the device name, when/if you reboot the system it will come
up as the label.

Run the mount command it will show the device label.
mount /dev/sdc1  /oracle/SID/sapdatan
mount -l
/dev/sdc1 on /oracle/SID/sapdatan type ext3 (rw,acl,user_xattr) [sapdatan]
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 13:59, 3 users, load average: 0.13, 0.06, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU