This shows you the differences between two versions of the page.
os:solaris:lowlevel [2009/01/05 21:48] 127.0.0.1 external edit |
os:solaris:lowlevel [2009/02/28 15:21] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | //This article contains my personal notes regarding low level configuration of Solaris hosts. | + | //This article contains my personal notes regarding "low level" configuration of Solaris hosts. |
- | Hmm, "low level" is quite unprecise... Well I mean stuff concerning boot loaders, partitioning, mounting partitions, creating file systems... // | + | I mean stuff that help the operating system boot correctly (except hardware and drivers issues to be found in [[os:solaris:hardware|this page]]: boot loaders, partitioning, mounting partitions, creating file systems... // |
====== Boot sectors, boot manager ====== | ====== Boot sectors, boot manager ====== | ||
To restore GRUB (and be able to boot Solaris) when @## someone/something has scratched it, do: | To restore GRUB (and be able to boot Solaris) when @## someone/something has scratched it, do: | ||
- | * boot from the install CD of Solaris | + | * boot from the install CD of Solaris 10 |
* select "6" for a prompt, single user mode | * select "6" for a prompt, single user mode | ||
* restore the boot loader: | * restore the boot loader: | ||
Line 22: | Line 22: | ||
Slices of a given partition may be listed with **format**. | Slices of a given partition may be listed with **format**. | ||
+ | :!: On Solaris 10, use the command 'print' to show the current layout of a given disk. | ||
<code> | <code> | ||
partition> print | partition> print | ||
Line 69: | Line 70: | ||
Enter 8-character volume name (remember quotes)[""]:secondar | Enter 8-character volume name (remember quotes)[""]:secondar | ||
Ready to label disk, continue? yes | Ready to label disk, continue? yes | ||
+ | </code> | ||
+ | |||
+ | :!: On OpenSolaris, use **verify**. | ||
+ | <code> | ||
+ | axelle@boureautic:~# format | ||
+ | Searching for disks...done | ||
+ | AVAILABLE DISK SELECTIONS: | ||
+ | 0. c3d0 <DEFAULT cyl 6373 alt 2 hd 255 sec 63> | ||
+ | /pci@0,0/pci-ide@12/ide@0/cmdk@0,0 | ||
+ | Specify disk (enter its number): 0 | ||
+ | [...] | ||
+ | format> verify | ||
+ | Primary label contents: | ||
+ | |||
+ | Volume name = < > | ||
+ | ascii name = <DEFAULT cyl 6373 alt 2 hd 255 sec 63> | ||
+ | pcyl = 6375 | ||
+ | ncyl = 6373 | ||
+ | acyl = 2 | ||
+ | bcyl = 0 | ||
+ | nhead = 255 | ||
+ | nsect = 63 | ||
+ | Part Tag Flag Cylinders Size Blocks | ||
+ | 0 root wm 1 - 6371 48.80GB (6371/0/0) 102350115 | ||
+ | 1 unassigned wm 0 0 (0/0/0) 0 | ||
+ | 2 backup wu 0 - 6372 48.82GB (6373/0/0) 102382245 | ||
+ | 3 unassigned wm 0 0 (0/0/0) 0 | ||
+ | 4 unassigned wm 0 0 (0/0/0) 0 | ||
+ | 5 unassigned wm 0 0 (0/0/0) 0 | ||
+ | 6 unassigned wm 0 0 (0/0/0) 0 | ||
+ | 7 unassigned wm 0 0 (0/0/0) 0 | ||
+ | 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 | ||
+ | 9 unassigned wm 0 0 (0/0/0) 0 | ||
</code> | </code> | ||
====== ZFS ====== | ====== ZFS ====== | ||
+ | |||
+ | //ZFS is awesome !// | ||
+ | |||
+ | ===== Pools ===== | ||
The good news about ZFS is that it's as great as expected. | The good news about ZFS is that it's as great as expected. | ||
Line 113: | Line 151: | ||
Note before creating the pool, the two slices c0d0s6 & c0d0s7 should be backuped, unmounted and removed from /etc/vsftab. Then, once the pool is created, the original content can be restored. | Note before creating the pool, the two slices c0d0s6 & c0d0s7 should be backuped, unmounted and removed from /etc/vsftab. Then, once the pool is created, the original content can be restored. | ||
Also, mountpoints are acceptable only if they exist: make sure /export/home/axelle exists first. | Also, mountpoints are acceptable only if they exist: make sure /export/home/axelle exists first. | ||
+ | |||
+ | ===== Snapshots ===== | ||
+ | |||
+ | * Setting up snapshots: time-slider-setup | ||
+ | * Mounting a ZFS pool: | ||
+ | <code> | ||
+ | zfs import -r <poolname> | ||
+ | </code> | ||
+ | * Listing snapshots in a given pool: | ||
+ | <code> | ||
+ | zfs list -t snapshot | ||
+ | </code> | ||
+ | * Restoring a given snapshot: | ||
+ | <code> | ||
+ | zfs rollback -rRf <name> | ||
+ | </code> | ||
Line 138: | Line 192: | ||
To mount a file as a filesystem, use lofiadm (loopback file driver). I haven't tried that yet, but [[http://blogs.sun.com/reed/entry/lofiadm_loopback_file_driver|see instructions here]]. | To mount a file as a filesystem, use lofiadm (loopback file driver). I haven't tried that yet, but [[http://blogs.sun.com/reed/entry/lofiadm_loopback_file_driver|see instructions here]]. | ||
+ | * Samba: this is a nice solution to mount remote Windows shares. | ||
+ | <code> | ||
+ | pfexec mount -f smbfs //host/share /mntpoint | ||
+ | </code> | ||
+ | To do so, the samba client service must be started: | ||
+ | <code> | ||
+ | pfexec svcadm enable svc:/network/smb/client:default | ||
+ | </code> | ||
====== Mounting a USB card ====== | ====== Mounting a USB card ====== | ||
Plug it in, and then check where it has been mounted using **df -h**. My mobile phone is mounted in /rmdisk/noname . | Plug it in, and then check where it has been mounted using **df -h**. My mobile phone is mounted in /rmdisk/noname . | ||
+ | |||
+ | ====== Mounting a USB IOMEGA drive ====== | ||
+ | |||
+ | Plug it in. It automatically mounts in /media/IOMEGA_HDD on my system. | ||
+ | |||
+ | ====== Zones ====== | ||
+ | |||
+ | My husband's installed a Solaris Zone containing Linux. | ||
+ | |||
+ | TODO | ||
+ | [[http://wikis.sun.com/display/chosug/Installing+a+Linux+Zone|Linux Zone]] | ||
+ | |||
+ | {{tag>solaris opensolaris usb iomega card linux zone rmdisk grub boot sector loader installgrub installboot slices device disk partition format print cylinder verify zfs pool raid mirror quota compression snapshot rollback time-slider-setup mount UFS FAT pcfs ntfs pfexec lofiadm loopback filesystem}} | ||
+ | |||
+ |